fbs exec -q TestQueue /bin/echo Hello worldThis command submits simple single-section FBSNG job to the queue named "TestQueue". FBSNG will run single instance of a batch process which will produce "Hello world" message. fbs exec has a number of optional arguments which allow to submit more sophysticated single-section jobs. This command is described in more details later in this document.
An alternative, more powerful method of FBSNG job submission involves creation of Job Description File (JDF). The JDF file contains information that is needed by FBSNG to run your job. A JDF file is composed of one or more sections, a section being the basic unit of work in FBSNG.
In the following example, the JDF file contains two sections named startup and main. Section startup will execute two instances (specified by the line NUMPROC=2) of startup.exe, section main will create 10 instances of main.exe to run on the farm. The section main will not start until all processes from the section startup have completed. This is controlled with the DEPEND=done(startup) statement. Both sections will send mail to user xyz@fnal.gov when the section completes.
SECTION startup
EXEC=startup.exe
NUMPROC=2
QUEUE=IO
MAILTO=xyz@fnal.gov
SECTION main
EXEC=main.exe arg1 arg2
NUMPROC=4
QUEUE=Worker
MAILTO=xyz@fnal.gov
DEPEND=done(startup)
STDOUT=Output/
STDERR=/dev/null
Submitting a farm job is done by running the fbs submit jdf_file command. If the name of the JDF file listed above is my.jdf, then the job would be submitted as follows:
>fbs submit my.jdf Farm Job 1333 has been submitted...
A pathname of a valid JDF file can be (and usually is) supplied as an argument. It is possible to supply all of the information needed by FBSNG on the command line via the -o (override) argument.
Under normal operation, the submit command will return immediately with a return code of 0. It is possible to have the submit command block until the job has completed, or until a certain amount of time has passed. The -w (wait) flag will cause submit to block until the job (or a section within the job) has completed (see section 3.6.1).
The FBSNG system supplies a unique integer for every job that is started within the system. This unique integer is referred to as the jobid, and can be used to reference the job as a whole. For example, one can kill the entire job by issuing the fbs kill command (see below) with the jobid as an argument. It is also possible to reference individual sections within a job by specifying jobid.sectionname. The jobid.sectionname is referred to as the sectionid throughout the remainder of this document.