Page MenuHomec4science

createRuns.py
No OneTemporary

File Metadata

Created
Sun, Dec 1, 01:59

createRuns.py

#!/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