Option 2: Member State ecFlow suites monitored by ECMWF:
Option 3: Member State ecFlow suites managed by ECMWF:
The main characteristics of Member State time-critical work are:
Within this Framework, Member State users can use the general purpose server ecgate" and the High Performance Computing Facility (HPCF), provided they have access to the HPCF resources. In general, users should minimise the number of systems they use. For example, they should use ecgate" only if they need to post-process data, which is not excessively computationally intensive. Similarly, they should only use the HPCF if they need to run computationally intensive work (e.g. a numerical model) and do not need to post-process their output graphically before it is transferred to their Member State. Member State time-critical work may also need to use additional systems outside ECMWF after having done some processing at ECMWF: for example to run other models using data produced by their work at ECMWF. It is not the purpose of this document to provide guidelines on how to run work which does not make use of ECMWF computing systems.
Every registered user of ECMWF computing systems is allowed to run work using öption 1" of this Framework and no formal request is required. Note that the access to our realtime operational data is restricted. Users interested in running this kind of work should refer to the document entitled "Simple time-critical jobs - ECaccess". See http://software.ecmwf.int/wiki/display/USS/Simple+time-critical+jobs. To run work using option 2" or option 3" you will need to submit an official request to the Director of Forecasting Department at ECMWF, signed by the TAC representative of your Member State. Before submitting a request we advise you to discuss the time-critical work you intend to run at ECMWF with your User Support contact point. Your official request will need to provide the following information:
ECMWF will consider your request and reply officially within three months taking into account, in particular, the resources required for the implementation of your request.
As this work will be monitored by ECMWF staff (User Support during the development phase; the operators, once your work is fully implemented), the only practical option is to implement time-critical work using a suite under ecFlow, ECMWF's monitoring and scheduling software packages. Given that SMS will gradually be phased out, we ask new developers of Option 2 activities to use ecFlow Bologna - New Data Centre. We will therefore only refer to ecFlow in the remaining part of this document. The suite must be developed according to the technical guidelines provided in this document. General documentation, training course material, etc ... on ecFlow can be found at: http://software.ecmwf.int/wiki/display/ECFLOW/Home. No on call support will be provided by ECMWF staff but the ECMWF operators can contact the relevant Member State suite support person, if this is clearly requested in the suite man pages.
In this case, the Member State ecFlow suite will be managed by ECMWF. The suite will usually be based on either a suite previously developed in the framework of option 2" or on a similar suite already used to run ECMWF operational work. The suite will be run using the ECMWF operational userid and will be managed by staff in the production section at ECMWF. The suite will generally be developed following similar guidelines to option 2". The main technical differences are that option 3" will have higher batch scheduling priority than option 2" work and that the ECPDS system (ECmwf Product Dissemination System) will normally be used to transfer products obtained by option 3" work. With option 3", your time-critical work will also benefit from first level on call support from the ECMWF Production Section staff.
You are advised to discuss the requirements of your work with User Support before you start any implementation. You should test a first rough implementation under your normal Member State userid, using the file systems normally available to you and standard batch job classes/queues, etc ... following the technical guidelines given in this document. You should proceed with the final implementation only after your official request has been agreed by ECMWF.
A specific UID will be created to run a particular suite under option 2". This UID will be set up as an application identifier": such UIDs start with a "z", followed by two or three characters. No password will be assigned and access to the UID will be allowed using a strong authentication token (ActivIdentity token). A person responsible will be nominated for every application identifier" UID. A limited number of other registered users can also be authorized to access this UID and a mechanism to allow such access under strict control will be available. The person associated with the UID and other authorised users have responsibility for all changes made to the files owned by the UID. The UID will be registered with a specific "policy" ("timecrit") which allows access to restricted batch classes, restricted file systems.
As mentioned earlier, öption 2" work must be implemented, unless otherwise previously agreed, by developing an ecFlow suite. The ecFlow environment is not set up by default for users on ecgate or on the HPC systems. Users will have to load the ecFlow environment with a module: module load ecflow
The ecFlow port number for the suite has the format "1000+<UID>", where <UID> is the numeric UID number of the userid used to run the work. The script to start the ecFlow server is available on ecgate and is called ecflow_start.sh". A second ecFlow server can be started up for backup or development purposes. This second ecFLow server will be started with the '-b' option and will use the port number "500+<UID>". The syntax of the ecflow_start.sh command is: Usage: /usr/local/apps/ecflow/4.0.6/bin/ecflow_start.sh [-b] [-d ecf_home directory] [-f] [-h] -b start ECF for backup server or e-suite -d <dir> specify the ECF_HOME directory - default /home/us/usl/ecflow_server -f forces the ECF to be restarted -v verbose mode -h print this help page -p <num> specify server port number(ECF_PORT number) - default 1000+<UID> - 500+<UID> for backup server Note that the port number allocation convention doesn't guarantee that the two numbers associated with your UID are free. A port number may already be used by another user for ecFlow or it may be used by another application. If 'your' default port number is not free, you will have to start the ecFlow server by specifying your own port number, using the option '-p'. Authorised port numbers are between 1024 and 65536. We advise you to choose higher numbers. The ecFlow server will run on ecgate and can be started at system boot time. Please ask User Support at ECMWF if you want us to start your ecFlow server at boot time. A cron job which regularly checks the presence of the ecFlow server process should also be implemented. The above script ecflow_start.sh can also be used to run this check under cron, e.g. like in: 5,20,35,50 * * * * /cronrun.ksh ecflow_start.sh 1> /ecFlow_start.out 2> 1 with the script $HOME/cronrun.ksh containing: #!/bin/ksh export PATH=/usr/local/bin:PATH. /.profile. /.kshrcmodule load ecflow@ Depending on your activity with ecFlow, the ecFlow log file (~/ecflow_server/ecgb.*.log) will grow steadily. We recommend that you install either a cron job or an administration task in your suite to clean these ecFlow log files. This can be achieved with the command ecflow_client: ecflow_client -port
We recommend the usage of the simple log server (Perl script) to access the output files of jobs running on the HPCF. This log server requires another port number, which will have the format "35000+<UID>", where <UID> is the numeric uid of the userid used to run the work. The log server will run on the HPCF and can be started after system boot. The script /usr/local/bin/start_logserver should be used to start the log server on the HPCF. The syntax of the command start_logserver is: Usage: /usr/local/bin/start_logserver [-d <dir>] [-m <map>] [-h] -d <dir> specify the directory name where files will be served from - default is $HOME -m <map> give mapping between local directory and directory where ecFlow server runs - default is <dir>:<dir> -h print this help page The mapping can consist of a succession of mappings. Each individual mapping will first give the directory name on the ecFlow server, followed by the directory name on the HPC system, like in the following example: -m <dir_ecgate>:<dir1_hpc>:<dir_ecgate>:<dir2_hpc> We recommend that you implement a cron job or define an administration task in your suite to check the presence of the log server process. The above script /usr/local/bin/start_logserver can be used for this purpose. Note that the job output files of running jobs on HPC are kept on a local spool, which is not visible from the interactive nodes (cca and ccb). In order to see the job output files of running jobs, you will therefore need to start the logserver on cca-log and ccb-log. See further for more details.
EcFlow will manage your jobs. Three main actions on the ecFlow tasks are required: one to submit, one to check and one to kill a task. These three actions are respectively defined through the ecFlow variables ECF_JOB_CMD, ECF_KILL_CMD and ECF_STATUS_CMD. You can use any script to take these actions on your tasks. We recommend that you use the commands provided by ECMWF with the schedule module which is available on ecgate. To activate the module, you will run: module load schedule The command called 'schedule' can then be used to submit, check or kill a task: Usage: /usr/local/apps/schedule/1.4/bin/schedule <user> <host> [<requestid>] <jobfile> <joboutput> [kill - status] Command used to schedule some tasks to ecflow <user>: <host>: <requestid>: <jobfile>: <joboutput>: By default /usr/local/apps/schedule/1.4/bin/schedule will submit a task. An example is given in the sample suite in ~usx/time_critical/sample_suite.def. Alternatively, you can use the commands task_submit or task_status and task_kill.
EcFlow allows access to be restricted to one ecFlow server, using the ecf.list file in the $ECF_HOME directory. We recommend that you set up and use this file, mainly to allow ECMWF staff to monitor your suite and to prevent unintentional access by other users. A sample file is available in ~usx/time_critical/ecflow/ecf.list.
Some key points to keep in mind when designing your suite:
One key point in the successful communication between the jobs running on the HPCFs systems or ecgate and your ecFlow server is the error handling. We recommend the use of a trap, as illustrated in the sample suite in ~usx/time_critical/include/head.h. The shell script run by your batch job should also use the set -ue" options.
A sample suite illustrating the previous recommendation is available in ~usx/time_critical/sample_suite.def.
The UID used to run the work will be given a quota in $HOME (on the High Availability NFS server) and $SCRATCH on ecgate. Ffile systems have been set-up on ecgate and on the HPCF clusters for time critical applications: they are called /ms_crit on ecgate and /sc1/tcwork and /sc2/tcwork on the current HPC systems (cca and ccb). These file systems are quota controlled and therefore you will need to provide User Support with an estimate of the total size and number of files which you need to keep on this file system. This file system should be used to hold both your binaries/libraries and input and output data. No select/delete process will run on this file system and you will be required to regularly remove any unnecessary files as part of your suite. You will also be required to safely backup copies of your binaries, etc into ECFS. It is recommended to include a task at the beginning of your suite, not to be run every day, that will restore your environment, in case of emergency ("restart from scratch" functionality). If there is a need for a file system with different characteristics (e.g. to hold safely on line files for several days), these requirements can be discussed with User Support and a file system with the required functionalities can be made available.
A specific batch job queue has been set up on ecgate: it is called "timecrit" and access is restricted to the UIDs authorised to run option 2" work only. This is the class/queue you should use to run any time-critical work on ecgate. If there are any non time-critical tasks in your suite (e.g. archiving tasks), these can use the other classes/queues normally available to users. Similarly, on both HPCF clusters different specific batch job queues have been set up. They are called "ts", "tf" and "tp", respectively for sequential work, fractional work (work using less than half of one node) and parallel work (work using more than 1 node). Again, you can use the other classes/queues for any non time-critical work. When you develop or test a new version of your time-critical suite, we advise you to use the standard classes or queues available to all users. In this way, your time-critical activity will not be delayed by these testing or developments.
Your work will normally require some input data before processing can start. The following possibilities have been considered:
We recommend the use of the ectrans command to send data to remote sites. The command has recently been enhanced to include a retrial of transfers from the spool. We recommend set up the ectrans remote associations on your local ECaccess gateway. If this is not available, you can set up remote associations on the ECaccess gateway at ECMWF. Note that, by default, ectrans transfers are asynchronous; the successful completion of the ectrans command does not mean your file has been transferred successfully. You may want to use the option "-put" to request synchronous transfers. More recently, we have enhanced the ECMWF dissemination system (ECPDS) to allow the dissemination of data produced by option 2 suites to remote sites. Please contact User Support for more information on this.
We recommend ectrans (option -get) to upload some data from a remote site to ECMWF. Other options, including the possible use of ECPDS, may be considered in specific situations. Please discuss these with User Support.
We recommend the use of scp/rsync to transfer data between ecgate and the HPC systems. No use of NFS mounted file systems should be made to transfer data between the general purpose server ecgate and the HPCF systems. We remind you not to use the DHS (MARS or ECFS) for any tasks in the critical path.
The UIDs authorised to run option 2" work will be given higher batch job scheduling priority than normal Member State work. All option 2" UIDs will be given the same priority. The Centre's core operational activities will always be given higher priority than MS time critical activities. If problems affecting the core activity suites arise or long system sessions are needed, the Member State suites and jobs may be delayed or possibly abandoned. Member State users may need to consider the possibility of setting up suitable backup procedures for such eventualities.
The UIDs authorised to run option 2 work have access to both HPCF clusters and are advised to implement their suite so they are ready to run on the cluster they normally do not use if the primary cluster is unavailable for an extended period of time. The two separate HPCF environments (currently only the /sc1 and /sc2 file systems) should be kept regularly synchronised using utilities such as "rsync". It should be possible to change the HPCF cluster used by the suite by doing a simple change of ecFlow variable (variable SCHOST in the sample suite). Similarly it is desirable to change the file system used by the suite by changing an ecFlow variable (variable STHOST in the sample suite). Users may wish to consider the possibility of setting up more sophisticated backup procedures such as the regular creation of backup products based on previous runs of the suite.
Users wishing to set up Member State time-critical suites at the Centre should carefully consider their requirements regarding the long term storage of the products of their suite. In particular, they should consider if they want to archive their time-critical application's output data in MARS. In such a case, users are advised to contact their User Support contact point to start discussing the relevant technical issues which are beyond the scope of this document. The same recommendation applies to users wishing to consider the storage of their suite's output in the on-line FDB (ECMWF's Fields Data Base). If your model/application producing the suite's output is already enabled to store into the FDB, then the disk space to be used is /sc1/tcwork/ms_fdb or /sc2/tcwork/ms_fdb, e.g. FDB_ROOT=/sc1/tcwork/ms_fdb on each cluster. For most users we recommend that their time-critical application's output data is stored in the ECFS system, if this is required. Please note that no time-critical task in your suite should depend on the completion of an archiving task. Please also note that possible users of your suite's products should be advised not to depend on the availability of such products in any part of the DHS system (both ECFS and MARS archive), as its services offered can be unavailable for several hours.
Once your suite at option 2 is declared running in time-critical mode, we recommend you not to touch this suite any longer for new developments. We recommend that you define a similar suite in parallel to the time-critical one and that you first do the testing of changes under this suite. When you make important changes to your suite, we recommend that you inform your relevant User Support contact point and the ECMWF operators (newops at ecmwf dot int). At ECMWF, we will set up the appropriate information channels to keep you aware of changes that may affect your time-critical activity. The most appropriate tool is a mailing list.
We welcome any comments on this document and the framework for time-critical applications. In particular, please do let us know if any of the above general purpose scripts does not fit with your requirements. We will then try to incorporate the changes needed.