next up previous contents
Next: Most Frequent Problems Up: Job Submission Previous: Brief Introduction   Contents

Submission steps

This section reports briefly the steps needed to submit and retrieve a job in the Grid. Detailed information and common usage examples are discussed in depth in the next sections. EDG User Guides and any other related information is available at the navigation link http://www.edg.org

  1. To start using the grid, make a very simple script and test it locally:
    $ cat simple.sh
    #!/bin/sh
    #
    echo "First JDL test"
    

  2. then create the related jdl:
    $ cat simple.jdl
    Executable = "simple.sh";
    StdOutput =  "simple.out";
    StdError =   "simple.err";
    InputSandbox = {"simple.sh"};
    OutputSandbox = {"simple.out", "simple.err"};
    

  3. verify that there is at least one CE enabled to run your job:
    dg-job-list-match -o CE.list -c $CFG simple.jdl 3
    The dg-job-list-match command will ask for your pass phrase if your proxy is expired and produce a log of the RB and the matching CEs (see table 1). Note that the matching process is time consuming and you might wait a few minutes for a response.

  4. submit the job:
    $ dg-job-submit simple.jdl
    the submission message is typed with your job ID, that you should remind for future job queries (see table 3). Job IDs may be stored in a file as follows:
    $ dg-job-submit --output Jid.list simple.jdl
    that appends the job ID to the existing file Jid.list or:
    $ dg-job-submit simple.jdl > submit.log
    that rewrites the existing file submit.log. To extract the job ID from the file submit.log:
    $ grep https submit.log | awk '{print $2}' > Id

  5. query job status:
    $ dg-job-status `cat Id` or
    $ dg-job-status -i Jid.list
    that displays the status of the job selected from the ID stored in file ID, or from file Jid.list with interactive job selection. If the status is OutputReady, the job is terminated (see table 2).

  6. collect your output:
    $ dg-job-get-ouput `cat Id` or
    $ dg-job-get-ouput -i Jid.list (see job status query)
    $ dg-job-get-output -i Jid.list --dir OutTmp
    the return message displays the return directory, ex. /tmp/09564149169964, or /home/myhome/Jdl/OutTmp/12052547347523 (see table 4). As you may notice, the output is always stored in a subdirectory with the same name of the Job Identifier.


next up previous contents
Next: Most Frequent Problems Up: Job Submission Previous: Brief Introduction   Contents
luvisetto 2003-07-25