Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The ECFLOW script describing the task t1, as defined in the previous section, refers to an '.ecf' file. This is similar to a UNIX shell script. The differences, however, includes the addition of "C" like pre-processing directives and ECFLOW variables.
By default the ECFLOW pre-processing directives are specified using the % character. A simple example task file is given below.

Code Block
%include <head.h>
echo "I am testing

...

 anECFLOW script in %ECF_HOME%"
%include <tail.h>

Before submitting the task, ECFLOW will parse the script for ECFLOW directives and substitute relevant strings.
In the example above the %include command will be substituted with the content of the file head.h and %ECF_HOME% will be substituted with the ECFLOW variable ECF_HOME
ECFLOW scripts communicate with ECFLOW server via child commands, the head.h file can be used to send relevant child commands to inform ecFlow of the job status, set up error trapping (ecflow_client --abort) and define variables relating to the job environment. The tail.h file can contain related child commands (ecflow_client --complete) and information on how to clean up after the task.
Operationally at ECMWF we also include a number of header files that also setup relevant information for job scheduling via external queuing systems (such as loadleveler on IBM systems) and suite configuration.

...