1 import pydefx.configuration
2 import pydefx.salome_proxy
7 # get the job parameters
8 salome_parameters = pydefx.configuration.loadJobConfig()
10 launcher = pydefx.salome_proxy.getLauncher() # CORBA or not CORBA
12 # have a different working directory for each computation
13 resource = salome_parameters.resource_required.name
14 default_wd = pydefx.configuration.defaultWorkingDir(resource)
15 new_wd = os.path.join(default_wd, "myjob_"+str(n))
16 salome_parameters.work_directory = new_wd
18 # create and launch the job
19 job_id = launcher.createJob(salome_parameters)
20 launcher.launchJob(job_id)
22 # wait for the end of the job
23 jobState = launcher.getJobState(job_id)
24 while jobState != "FINISHED" and jobState != "FAILED" :
26 jobState = launcher.getJobState(job_id)