ecFlow's documentation is now on readthedocs!

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Text

Automated job creation checking is only available with Python.

If the ecflow_server can’t locate the ecf script, please see ecf file location algorithm

Python

The process of job creation can be checked before the suite definition
is loaded into the ecflow_server. The following checks are done:
When the suite definition is large and has many ecf script this
checking can save a lot of time.
It should be noted that job creation checking will generate a job file
with the extension .job0, whereas the server will always generate
jobs with a extension .job<1-n>. See ECF_TRYNO

Checking is done using ecflow.Defs.check_job_creation

#!/usr/bin/env python2.7
import os
import ecflow 
   
print "Creating suite definition"   
defs = ecflow.Defs()
suite = defs.add_suite("test")
suite.add_variable("ECF_HOME", os.getenv("HOME") + "/course")
suite.add_task("t1")

print "Checking job creation: .ecf -> .job0"   
print defs.check_job_creation()

# We can assert, so that we only progress, once all job creation works
# assert len(defs.check_job_creation()) == 0, "Job generation failed"

Note

It is highly advisable that job creation checking is enabled for all subsequent examples.

What to do:

  1. Add job creation checking.
  2. Examine the job file $HOME/test/t1.job0
  • No labels