next up previous contents
Next: Customized Configuration Files Up: Job Submission Previous: New Features   Contents

edg-job-submit Usage

To submit a job, you must first create a .jdl file stating the executable image and the output files as in the following minimal jdl:


Minimal JDL File hnam.jdl
Executable = "/bin/hostname";
StdOutput = "hnam.out";
StdError = "hnam.err";
OutputSandbox = {"hnam.out","hnam.err"};


JDL directives must fit into one single line and terminate with semi-colon.
Submission is performed either with:

$ edg-job-submit --vo alice -o JID hnam.jdl

or with:

$ edg-job-submit --config my.conf --config-vo my-vo.conf -o JID hnam.jdl

If job submission is successfull, the middleware displays a message of the following type:

Connecting to host grid014.ct.infn.it, port 7772
Logging to host grid014.ct.infn.it, port 9002
========================== edg-job-submit Success==============================
 The job has been successfully submitted to the Network Server.
 Use edg-job-status command to check job current status. Your job identifier
(edg_jobId) is:
 - https://grid014.ct.infn.it:9000/VyIS2XzhZdwyAuJUq8gMjQ
 The edg_jobId has been saved in the following file:
 /home/userx/edg2/myjobs/JID
===============================================================================

In this example, the job is submitted using either the default configuration file or user supplied configuration files. In the first case, the virtual organization is specified using the --vo option. In the second case, the job is submitted specifying customized configurations. Configuration files are required to submit the job to a user defined broker different from the one defined in the default UI configuration.
The job URL is stored in file JID.

As EDG2 does not support the e-mail notification option, it is good practice to store job URLs in a file (ex. JID) that can be used at query and output recovery levels. As new jobs are submitted, the JID file is updated. To ignore older jobs, edit JID and comment out URLs to ignore:

###Submitted Job Ids###
###https://grid014.ct.infn.it:9000/WkcSA7qolBBDKGJgJwz7Vw
https://grid008g.cnaf.infn.it:9000/PhqitGxGWyA5Az-4iPNMPg

Monitor execution and recover output as follows:

$ edg-job-status -i JID # wait for done status flag

*************************************************************
BOOKKEEPING INFORMATION:
Printing status info for the Job :
Current Status:    Done (Success) https://grid014.ct.infn.it:9000/VyIS2XzhZdwyAuJUq8gMjQ
Exit code:         0
Status Reason:     Job terminated successfully
Destination:       heplnx11.pp.rl.ac.uk:2119/jobmanager-pbs-M
reached on:        Fri Oct  3 13:44:23 2003
************************************************************
$ edg-job-get-output -i JID # recover output sandbox
Retrieving files from host grid014.ct.infn.it
*******************************************************************************
                        JOB GET OUTPUT OUTCOME
 Output sandbox files for the job:
 - https://grid014.ct.infn.it:9000/VyIS2XzhZdwyAuJUq8gMjQ
 have been successfully retrieved and stored in the directory:
 /tmp/jobOutput/VyIS2XzhZdwyAuJUq8gMjQ
*******************************************************************************

If you try to recover output for a job ID for which you have already run edg-job-get-output, the retrieval process prints the following message:

**** Error: NS_JOB_OUTPUT_RETRIEVED ****
The OutputSandbox files for job
"https://grid014.ct.infn.it:9000/IwhTc67_qK6Xgpjuv4hXTg"
have been already successfully retrieved

Status flag values and meaning are listed in the table below.


Summary of Status Flags
Flag Meaning
SUBMITTED submission logged in the LB
WAIT job match making for resources
READY job being sent to executing CE
SCHEDULED job scheduled in the CE queue manager
RUNNING job executing on a WN of the selected CE queue
DONE job terminated without grid errors
CLEARED job output retrieved
ABORT job aborted by middleware, check reason



next up previous contents
Next: Customized Configuration Files Up: Job Submission Previous: New Features   Contents
luvisetto 2003-12-17