|
A Job Collection is, as the name implies, a collection of regular Grid batch jobs. Using this gLite functionality the jobs within the Collection will be submitted simultaneously but will execute (run) independently.
As an example we will consider a simple case of two jobs comprising the collection. The first job is described through the following JDL file:
- Executable = "/bin/hostname";
- StdOutput = "std.out";
- StdError = "std.err";
- OutputSandbox = {"std.err","std.out"};
This job will execute the /bin/hostname executable on the host that it will run on and the result of this command will be printed into the StdOutput, which is set to std.out. The second job is described through the following JDL file:
- Executable = "/bin/date";
- Arguments = "--utc";
- StdOutput = "std.out";
- StdError = "std.err";
- OutputSandbox = {"std.err","std.out"};
This job will execute the /bin/date executable on the host that it will run on with the argument --utc. The result of this command will be printed into the StdOutput, which is set to std.out.
Copy the contents above into two separate JDL files (name them for example job1.jdl and job2.jdl) and place them under a single folder (name the folder jdls).
In order to submit the two jobs as a Job Collection you may use the following command.
glite-wms-job-submit -a -o id.txt --collection jdls
In the above command we use the -o id.txt flag to store the job identifier in a file named id.txt. This will help us locate the status of our job later.
Also, notice that the flag --collection is used to state that this command will submit all the jdl files that are inside the jdls folder. Since the job has been submitted you may check its status by issuing the following command
glite-wms-job-status -i id.txt
With the above command one can monitor the status of all the jobs that have been submitted. When the status of the jobs changes to done one can retrieve their output by issuing the following command:
glite-wms-job-output -i id.txt --dir ./results
|