Page MenuHomec4science

createRuns.py
No OneTemporary

File Metadata

Created
Thu, Jun 20, 04:11

createRuns.py

#!/usr/bin/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("launch.sh")
#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 abse
if ("truerun" in params):
base.commit()

Event Timeline