Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93735062
createRuns.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Dec 1, 01:59
Size
949 B
Mime Type
text/x-python
Expires
Tue, Dec 3, 01:59 (2 d)
Engine
blob
Format
Raw Data
Handle
22645451
Attached To
R3127 blackdynamite
createRuns.py
View Options
#!/usr/bin/env python
# First we need to set the python headers
# and to import the blackdynamite modules
import
BlackDynamite
as
BD
# import a runparser (instead of a generic BD parser)
parser
=
BD
.
RunParser
()
params
=
parser
.
parseBDParameters
()
# Then we can connect to the black dynamite database
base
=
BD
.
Base
(
**
params
)
# create a run object
myrun
=
BD
.
Run
(
base
)
# set the run parameters from the parsed entries
myrun
.
setEntries
(
params
)
# add a configuration file
myrun
.
addConfigFiles
(
"doIt.py"
)
# set the entry point (executable) file
myrun
.
setExecFile
(
"launch.sh"
)
# create a job selector
jobSelector
=
BD
.
JobSelector
(
base
)
# select the jobs that should be associated with the runs about to be created
job_list
=
jobSelector
.
selectJobs
(
params
)
# create the runs
for
j
in
job_list
:
myrun
[
'compiler'
]
=
'gcc'
myrun
.
attachToJob
(
j
)
# if truerun, commit the changes to the base
if
(
params
[
"truerun"
]
is
True
):
base
.
commit
()
Event Timeline
Log In to Comment