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 17 Next »

Next, we need to write the ecf script for the task t1. By default ECF expects files to be in a directory structure below ECF_HOME that reflect the hierarchy of the suites. The task t1 being in the suite test, the ecf script for the task t1 must be in a sub-directory test.

  • In ECF_HOME, create a directory test:

    > mkdir test
  • In test, create a file name t1.ecf with the following contents:

    %include "../head.h"
    echo "I am part of a suite that lives in %ECF_HOME%"
    %include "../tail.h"

Although similar an ecf script is not a unix script. It contains pre-processing directives. Those directives are specified using the character %. Before submitting the task, the ECF will scan the script and substitute the following strings:

  • %include ”../head.h” will be substituted by the content of the file head.h. Note that the file name is given relatively to the file t1.ecf, i.e. in the directory above the one containing t1.ecf
  • %ECF_HOME% will be substituted by the value of the ECF variable ECF_HOME
  • %include ”../tail.h” will be substituted by the content of the file tail.h

The output of job creation is known as the job file, and is usually a unix script, although not necessarily. This is the script that ECF will submit to your system.

The workings of the files head.h and tail.h are described inline. head.h contains code to set-up the job environment so that it can work with ECF and also includes the required error trapping to report any script errors to the ECF server. The file tail.h contains clean up code.

What to do:

  1. Type in the ecf script t1.ecf
  • No labels