Difference: JdlGuide (2 vs. 3)

Revision 32011-04-12 - MassimoSgaravatto

Line: 1 to 1
 
META TOPICPARENT name="UserGuide"

CREAM JDL guide

Line: 392 to 392
 In the above example file1 is saved on the gridftp server of the CREAM CE, while file2 is saved on grid003.ct.infn.it (directory /home/cms).
Added:
>
>
The OutputSandboxDestURI list must have the same cardinality as the OutputSandbox list, otherwise the JDL will be considered as invalid. Note that the file name specified in the OutputSandbox can be different from the corresponding destination file name specified in the OutputSandboxBaseDestURI. The OutputSandboxDestURI attribute and the OutputSandboxBaseDestURI cannot be specified together in the same JDL. One (and only one) among the OutputSandboxDestURI and OutputSandboxBaseDestURI attributes must be specified if the OutputSandbox attribute has been specified

Mandatory: No

Default: No

0.1 OutputSandboxBaseDestURI

The OutputSandboxBaseDestURI attribute is a string representing the base URI on a gridFTP server, i.e. a directory on the server, where the files listed in the OutputSandbox attribute have to be transferred at job completion. HTTPS servers are also supported but this requires to have the GridSite htcp client command installed on the WN. All the OutputSandbox files are transferred to the location specified by the URI with the same names (only names in a flat directory) as the ones specified in the OutputSandbox. E.g.:

OutputSandbox = {
"myjobOutput",
"run1/event1",
};
OutputSandboxBaseDestURI = "gsiftp://matrix.datamat.it:5432/tmp";

makes CREAM transfer both files in the /tmp directory of the gridFTP server matrix.datamat.it (note that event1 will go in /tmp and not in /tmp/run1).

Support for file transfer to gridftp servers running using user credentials instead of host credentials is also provided1. In this case the distinguish name of such user credentials must be specified in the URI using:

 ?DN=<distinguish name>

as shown in the example below. E.g.

OutputSandbox = {
"myjobOutput",
"run1/event1",
};
OutputSandboxBaseDestURI = "gsiftp://lxsgaravatto.pd.infn.it:47320/tmp?DN=/C=IT/O=INFN/OU=Personal Certificate/L=Padova/CN=Massimo Sgaravatto";

makes CREAM transfer both files in the /tmp directory of the gridFTP server lxsgaravatto.pd.infn.it (running using user credentials, with the specified distinguish name).

Specifying the URI gsiftp://localhost, the OutputSandboxFile is saved in the gridftp server of the CREAM CE, as shown in the following example:

OutputSandbox = {
"file1",
"file2",
};
OutputSandboxBaseDestURI = "gsiftp://localhost";

In the above example file1 and file2 are saved on the gridftp server of the CREAM CE.

The OutputSandboxBaseDestURI attribute and the OutputSandboxDestURI cannot be specified together in the same JDL. One (and only one) among the OutputSandboxDestURI and OutputSandboxBaseDestURI attributes must be specified if the OutputSandbox attribute has been specified.

Mandatory: No

Default: No

0.2 Prologue

The Prologue attribute is a string representing the executable/script name of the prologue. The prologue is an executable run within the CREAM job wrapper before the user job is started. It can be used for purposes ranging from application-specific checks that the job environment has been correctly set on the WN to actions like data transfers, database updates or MPI pre script. If the prologue fails the job wrapper terminates. The rules for specification of the Prologue attributes and its relationship with the InputSandbox attribute are exactly the same already described for the Executable attribute.

Mandatory: No

Default: No

0.3 PrologueArguments

The PrologueArguments attribute is a string containing all the prologue executable command line arguments. All the rules reported in the description of the Arguments attribute also apply to the PrologueArguments attribute.

Mandatory: No

Default: No

0.4 Epilogue

The Epilogue attribute is a string representing the executable/script name of the epilogue. The epilogue is an executable/script run within the CREAM job wrapper after the user job completion. It can be used for purposes ranging from application-specific checks that the job performed correctly to actions like data transfers, database updates or MPI post script. The rules for specification of the Epilogue attributes and its relationship with the InputSandbox attribute are exactly the same already described for the Executable attribute.

Mandatory: No

Default: No

0.5 EpilogueArguments

The EpilogueArguments attribute is a string containing all the epilogue executable command line arguments. All the rules reported in the description of the Arguments attribute also apply to the EpilogueArguments attribute.

Mandatory: No

Default: No

0.6 Environment

This is a list of string representing environment settings that have to be performed on the execution machine and are needed by the job to run properly. The JobWrapper on the Worker Node performs these settings just before the job is started. Each item of the list is an equality “VAR_NAME=VAR_VALUE”. E.g.:

Environment  = {“JOB_LOG_FILE=/tmp/myjob.log”,
“ORACLE_SID=edg_rdbms_1”,
“JAVABIN=/usr/local/java”};

Mandatory: No

Default: No

0.7 PerusalFileEnable

The PerusalFileEnable attribute is a Boolean attribute that allows enabling the job file perusal support in CREAM. File perusal can be used when jobs are submitted to CREAM by the WMS, but it is possible to use this functionality also for jobs submitted directly to CREAM. When this attribute is set to true, i.e.

PerusalFileEnable = true;

the user can inspect, while the job is running, the files generated by the job on the WN. This is achieved by uploading on a location specified by the attribute PerusalFilesDestURI, at regular time intervals, chunks of the files (specified by the attribute PerusalListFileURI) generated by the job on the WN. The PerusalFileEnable attribute is not mandatory. If not specified in the JDL it is assumed to be set to false.

Mandatory: No

Default: false

0.8 PerusalTimeInterval

The PerusalTimeInterval attribute is a positive integer representing the difference in seconds between two subsequent saving (and upload on the location specified by the attribute PerusalFilesDestURI) of the job files generated by the job on the WN. Specifying e.g.

PerusalTimeInterval = 10;

makes the CREAM JobWrapper save the job files specified through the attribute PerusalListFileURI each 10 seconds and upload them on location specified by the attribute PerusalFilesDestURI, so that they can be inspected by the user.

Mandatory: No (unless PerusalFileEnable is true)

Default: No

0.9 PerusalFilesDestURI

The PerusalFilesDestURI attribute is a string representing the URI of the location on a gridFTP or HTTPS server (HTTPS servers are also supported but this requires to have the GridSite htcp command installed on the WN) where the chunks of files generated by the running job on the WN and specified through the attribute PerusalListFileURI have to be copied. E.g.

PerusalFilesDestURI = “gsiftp://ghemon.cnaf.infn.it/home/glite/peek”;

Mandatory: No (unless PerusalFileEnable is true)

Default: No

0.10 PerusalListFileURI

The PerusalListFileURI attribute is a string representing the URI of the file on a gridFTP server, containing the list of files (one for each line), that must be saved and uploaded on the location specified by the attribute PerusalFilesDestURI at regular time intervals. E.g.

PerusalListFileURI = “gsiftp://ghemon.cnaf.infn.it/peek/files2peek”;

Mandatory: No (unless PerusalFileEnable is true)

Default: No

0.11 BatchSystem

This is a string representing the Local Resource Management System (LRMS), that is the batch system type (e.g. LSF, PBS, etc.) of the target CREAM CE. Here below follows an example for this attribute:

BatchSystem = “cms”;

Mandatory: Yes (unless the CREAM CLI, since it retrieves this attribute from the CEID and automatically fills this attribute)

Default: No

0.12 QueueName

This is a string representing the queue name in the Local Resource Management System (LRMS) where the job has to be submitted on the target CREAM CE. Here below follows an example for this attribute:

QueueName = “long”;

Mandatory: Yes (unless the CREAM CLI is used, since it retrieves this attribute from the CEID and automatically fills this attribute)

Default: No

0.13 CPUNumber

The CpuNumber attribute is an integer greater than 1 specifying the number of CPUs needed. This attribute can be used in particular for MPI jobs.

Please note that this attributes allows allocating the specified number of CPUs. Then it is up to the job using them to run the job (e.g. via mpistart)

An example of the JDL setting is:

CpuNumber = 5;

Mandatory: No

*Default: No

0.14 SMPGranularity

The SMPGranularity attribute is an integer greater than 0 specifying the number of cores any host involved in the allocation has to dedicate to the considered job. This attribute can’t be specified along with the Hostnumber attribute when WholeNodes is false.

Mandatory: No

Default: No

0.15 WholeNodes

The WholeNodes attribute is a boolean that indicates whether whole nodes should be used exclusively or not.

Mandatory: No

Default: False

0.16 HostNumber

HostNumber is an integer indicating the number of nodes the user wishes to obtain for his job. This attribute can’t be specified along with the SMPGranularity attribute when WholeNodes is false.

Mandatory: No

Default: False

0.17 CERequirements

The CERequirements attribute is a Boolean ClassAd expression that uses C-like operators. It represents job requirements on resources. Properly configuring the BLAH software, it is possible to instruct the Local Resource Management System to select the most appropriate Worker Node to run the considered job. The CERequirements expression can contain attributes that describe the CE which are prefixed with other..

This is an example of CERequirements expression:

CERequirements = “other.GlueCEPolicyMaxCPUTime >= 100 && other.GlueHostMainMemoryRAMSize > 2000”; 

The CERequirements attribute can be used when jobs are submitted directly to a CREAM based CE, while for jobs submitted to a CREAM based CE via the WMS, the CERequirements expression is automatically filled by the WMS considering the user’s Requirements expression, and the value of the CeForwardParameters attribute in the WMS configuration file.

Detailed information about the forwarding of requirements to the batch system is available in the CREAM web site (http://grid.pd.infn.it/cream) under Forward of requirements to the batch system.

Mandatory: No

Default: No

0.18 MWVersion

The MWversion attribute is a string whose value is given to the environment value EDG_MW_VERSION, defined for the job immediately when it arrives on the WN (i.e. it is not defined in the job wrapper). There can be hooks on the WN which detect this (before any /etc/profile.d scripts are run) and set up the appropriate environment for a job.

Mandatory: No

Default: No

 
Line: 468 to 735
  Default: No (If not specified a GUID is assigned by DM services)
Added:
>
>

1 JDL Examples

Simple examples of JDL describing different types of jobs and requests are reported in this section.

1.1 Example 1

[ Type = "job"; JobType = "normal"; Executable = "/sw/command"; Arguments = "60"; StdOutput = "sim.out"; StdError = "sim.err"; OutputSandbox = { "sim.err", "sim.out" }; OutputSandboxBaseDestURI = "gsiftp://se1.pd.infn.it:5432/tmp”; InputSandbox = { "file:///home/user/file1", "gsiftp:///se1.pd.infn.it:1234/data/file2", "/home/user/file3", "file4" }; InputSandboxBaseURI = ”gsiftp://se2.cern.ch:5678/tmp”; ]

With this JDL a “normal” (batch) job will be submitted.

Besides the specification of the executable (already available in the file system of the executing node, since not listed in the InputSandbox), and of the standard output/error files, it is specified that the files file1, file2, file3, file4 will have to be staged on the executing node:

  • file1 and file3 will be copied from the client (UI) file system
  • file2 will be copied from the specified GridFTP server (gsiftp:///se1.pd.infn.it:1234/data/file2)
  • file4 will be copied from the GridFTP server specified as InputSandboxBaseURI (gsiftp://se2.cern.ch:5678/tmp)

It is also specified that the file sim.err and sim.out (specified as OutputSandbox) must be automatically uploaded into gsiftp://se1.pd.infn.it:5432/tmp when job completes its execution.

1.2 Example 2

[
    Type = "job";
    JobType = "normal";
    Executable = "script.sh";
    Arguments = "60";
         StdOutput = "sim.out";
         StdInput = "sim.inp";
         StdError = "sim.err";
     OutputSandbox = {
              "sim.err",
              "sim.out"
             };
    OutputSandboxDestURI = {
"gsiftp://matrix.datamat.it:5432/tmp/sim.err",
"gsiftp://grid003.ct.infn.it:6789/home/cms/sim.out",
         };
    InputSandbox = {
                 "file:///home/user/file1", 
                        "gsiftp:///se1.pd.infn.it:1234/data/file2",
                        "/home/user/file3",
                        "file4",
                        "script.sh",
                        "sim.inp"
              };
]

This JDL is very similar to the previous one. The only differences are the following:

  • The executable and the standard input files have been included in the InputSandbox, and therefore they will be staged in the executing node
  • Instead of specifying the URL to be used for all the files of the OutputSandbox, it is specified (via the attribute OutputSandboxDestURI) an URI for each file that have to be uploaded (the files listed as OutputSandbox)
  • The attribute InputSandBoxBaseURI hasn’t been specified, so the files file4, script.sh and sim.inp will be copied from the file system of the client (UI) machine.

 
 
This site is powered by the TWiki collaboration platformCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback