DIRAC quick start
Run first job in DIRAC
One needs to create as minimum 2 files. In this example test.jdl
and script testJob.sh
Please put folling content to test.jdl
(without line $ cat test.jdl
)
$ cat test.jdl
Executable = "testJob.sh";
JobName = "%n_parametric";
Arguments = "%s";
Parameters = {"first","second","third","fourth","fifth"};
StdOutput = "StdOut_%s";
StdError = "StdErr_%s";
InputSandbox = {"testJob.sh"};
OutputSandbox = {"StdOut_%s","StdErr_%s"};
and folling content to testJob.sh
(without line $ cat testJob.sh
)
$ cat testJob.sh
#!/bin/bash
export
hostname
uptime
date
echo "Args: $*"
When these files are creted one can run job in grid
$ dirac-wms-job-submit test.jdl
JobID = [1467086, 1467087, 1467088, 1467089, 1467090]
One can see that 5 jobs were submited with ids 1467086, 1467087, 1467088, 1467089, 1467090
. To check job status for first job (1467086
) one can run following command
$ dirac-wms-job-status 1467086
JobID=1467086 Status=Waiting; MinorStatus=Pilot Agent Submission; Site=ANY;
That means it is in Waiting
status. To see more detail information
$ dirac-wms-job-logging-info 1467086
Source Status MinorStatus ApplicationStatus DateTime
==================================================================================================
JobManager Submitting Bulk transaction confirmation Unknown 2021-12-29 04:29:07
JobPath Checking JobSanity Unknown 2021-12-29 04:29:07
JobSanity Checking JobScheduling Unknown 2021-12-29 04:29:07
JobScheduling Waiting Pilot Agent Submission Unknown 2021-12-29 04:29:07
After some time job is running (Status=Running
)
$ dirac-wms-job-status 1467086
JobID=1467086 Status=Running; MinorStatus=Application; Site=CLOUD.INP.kz;
One needs to wait for job to be finished with status Done
or Failed
$ dirac-wms-job-status 1467086
JobID=1467086 Status=Done; MinorStatus=Execution Complete; Site=CLOUD.INP.kz;
and then one can get output via following command
$ dirac-wms-job-get-output 1467086
Job output sandbox retrieved in /some/path/1467086/
Lets see output directory 1467086
$ ls -al 1467086
total 4.0K
drwxrwxr-x. 1 mvala mvala 24 Dec 29 07:37 .
drwxrwxr-x. 1 mvala mvala 116 Dec 29 07:37 ..
-rw-r--r--. 1 mvala mvala 3.0K Dec 29 07:34 StdOut_first
One can see that standard output StdOut_first
file is there and its content shows out log file from job
cat 1467086/StdOut_first
declare -x ARC_PLUGIN_PATH="/scratch/plt00/diracos/usr/lib64/arc"
declare -x CONTEXTDIR="/var/spool/checkout/context"
...
...
declare -x XRD_RUNFORKHANDLER="1"
declare -x _="/scratch/plt00/1467086/testJob.sh"
ip-10-0-2-25
08:34:57 up 4 min, 0 users, load average: 1.95, 1.50, 0.63
Wed Dec 29 08:34:57 +04 2021
Args: first