GRAM Overview Submitting a test job Resource Specification Language (RSL)

advertisement
GRAM

Overview

Submitting a test job

Resource Specification Language (RSL)

Data Staging

Multijobs
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
1
GRAM Overview


Intended for jobs where arbitrary
programs, stateful monitoring, credential
management, and file staging are
important
If the application is lightweight, with
modest input/output, may be a better
candidate for hosting directly as a WSRF
service
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
2
GRAM Prerequisites


A secure container
For staging jobs, access to an RFT service
and a GridFTP server
– Note that even stderr/stdout are considered
staging, so RFT and GridFTP are used in all
but the most basic jobs

sudo for running as other accounts

Can be integrated with PBS, LSF, Condor
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
3
Submitting A Test Job

globusrun-ws –submit –c /bin/true

echo $?



Will run locally. Specify a remote host with
–F
globusrun-ws –submit –F host2 –c
/bin/true
The return code will be the job’s exit code
if supported by the scheduler
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
4
Data Staging

GRAM allows jobs to stage-in and stageout data

To perform this task it uses RFT

RFT in turn uses GridFTP servers

Simplest stage-in/stage-out example is
stdout/stderr
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
5
Streaming Results

globusrun-ws –S –s –c /bin/date

-S is short for “-submit”

-s is short for –streaming
– The output will be sent back to the
terminal, control will not return until the
job is done
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
6
Resource Specification Language

For more complicated jobs, we’ll use RSL to specify
the job
<job>
<executable>/bin/echo</executable>
<argument>this is an example_string </argument>
<argument>Globus was here</argument>
<stdout>${GLOBUS_USER_HOME}/stdout</stdout>
<stderr>${GLOBUS_USER_HOME}/stderr</stderr>
</job>
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
7
Resource Specification Language
<job>
<executable>/bin/echo</executable>
<directory>/tmp</directory>
<argument>12</argument>
<environment><name>PI</name>
<value>3.141</value></environment>
<stdin>/dev/null</stdin>
<stdout>stdout</stdout>
<stderr>stderr</stderr>
</job>
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
8
Resource Specification Language
<job>
<executable>/bin/echo</executable>
<directory>/tmp</directory>
<argument>12</argument>
<environment><name>PI</name>
<value>3.141</value></environment>
<stdin>/dev/null</stdin>
<stdout>stdout</stdout>
<stderr>stderr</stderr>
</job>
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
9
Submitting Using XML

Create the file containing the RSL

You may validate the RSL ahead of time
– globusrun-ws –validate –f rslfile.xml

If the file validates, submit using
-submit
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
10
At Most Once Submission




You may specify a UUID with your job
submission
If you’re not sure the submission worked,
you may submit the job again with the
same UUID
If the job has already been submitted, the
new submission will have no effect
If you do not specify a UUID, one will be
generated for you
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
11
Staging Data


GRAM’s RSL allows many
fileStageIn/fileStageOut directives
The transfers will be executed by RFT
– May specify additional RFT options using the
RFTOptions tag

There is no GASS cache staging option
anymore
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
12
Staging Data – Stage In

GRAM’s RSL allows many
fileStageIn/fileStageOut directives
<fileStageIn> <transfer>
<sourceUrl>
gsiftp://job.submitting.host:2811/bin/echo</sourceU
rl>
<destinationUrl>file:///${GLOBUS_USER_HOME}/
my_echo</destinationUrl>
</transfer> </fileStageIn>
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
13
Staging Data – Stage Out
<fileStageOut>
<transfer>
<sourceUrl>file://${GLOBUS_USER_HOME}/stdout
</sourceUrl>
<destinationUrl>gsiftp://job.submitting.host:2811/tm
p/stdout</destinationUrl>
</transfer>
</fileStageOut>
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
14
Staging Data - Cleanup
<fileCleanUp>
<deletion>
<file>file://${GLOBUS_USER_HOME}/my_echo</fil
e>
</deletion>
</fileCleanUp>
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
15
Staging Data - Credentials


The GridFTP servers you’re using may
require different credentials than the GRAM
service you’re submitting to
The RSL allows you to specify separate
credentials for the executable and staging
components of the job
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
16
RSL Substitutions

GRAM will perform some variable
substitutions for you
–
–
–
–

GLOBUS_USER_HOME
GLOBUS_USER_NAME
GLOBUS_SCRATCH_DIR
GLOBUS_LOCATION
SCRATCH_DIR will be a compute-node
local high-speed storage if defined, or
GLOBUS_USER_HOME if not
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
17
Batch Submission


Your client does not have to stay attached
to the execution of the job
-batch will disconnect from the job and
output an EPR
– You may redirect the EPR to a file with –o

Use the EPR file with –monitor or -status

You may also kill the job using -kill
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
18
Specifying Scheduler Options

RSL lets you specify various scheduler
options
– what queue to submit to
– which project to select for accounting
– max CPU and wallclock time to spend
– min/max memory required

All defined online under the schema
document for GRAM
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
19
Choosing User Accounts



You may be authorized to use more than
one account at the remote site
By default, the first listed in the gridmapfile will be used
You may request a specific user account
using the <localUserId> element
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
20
Multijobs



You may specify more than one <job>
element in a <multijob>
At that point, you want to specify the
<factoryEndpoint> in the RSL rather than
the commandline
Will be used by MPICH-G to support MPI
jobs
Globus Week 2005
Charles Bacon (bacon@mcs.anl.gov)
21
Related documents
Download