1b.1 Globus Toolkit 4.0 Grid Resource Allocation Manager (GRAM) Job submission ITCS 4146/5146 Grid Computing, 2007, UNC-Charlotte, B. Wilkinson. Jan 24, 2007
Data Management Security Common Runtime Execution Management Information Services Web Services Components Non-WS Components Pre-WS Authentication Authorization GridFTP Grid Resource Allocation Mgmt (Pre-WS GRAM) Monitoring & Discovery System (MDS2) C Common Libraries GT2GT2 WS Authentication Authorization Reliable File Transfer OGSA-DAI [Tech Preview] Grid Resource Allocation Mgmt (WS GRAM) Monitoring & Discovery System (MDS4) Java WS Core Community Authorization Service GT3GT3 Replica Location Service XIO GT3GT3 Credential Management GT4GT4 Python WS Core [contribution] C WS Core Community Scheduler Framework [contribution] Delegation Service GT4GT4 Globus Open Source Grid Software I Foster GRAM
1b.3 Job submission components GT4 container (hosts GT 4 web services) GRAM services GRAM adapter (for particular scheduler) Local scheduler Compute nodes User job submission Local scheduler on coit-grid02.uncc.edu is Condor (Sun Grid Engine on some other compute nodes)
1b.4 How to specify job The job is specified in a file which gives details such as: Job description –Name of executable –Arguments –Input files –Output files Resource requirements –Memory Uses a “job description” language Resource Specification Language (RSL) Then issue a command that includes name of job specification file.
1b.5 Job submission GT 2 job submission file –RSL version 1 language. –Traditional job description language GT 3.2/4.0 job submission file –RSL version 2 language –XML based job description language
1b.6 Resource Specification Language RSL version 1 A meta-language describing job and its required execution. Provides a specification for: Resource requirements - machine type, number of nodes, memory, etc. Job description - directory, executable, arguments, environment
1b.7 RSL Version 1 examples Constraints Example Conjunction (AND): & To create 3-5 instances of myProg, each on a machine with at least 64 Mbytes memory available to me for 1 hours: & (executable=myProg) (count>=3)(count =64) (max_time=60)
1b.8 Constraints Example Disjunction (OR): | To create 5 instances of myProg, each on a machine with at least 64 Mbytes memory or 7 instances of myProg, each on a machine with at least 32 Mbytes memory : &(executable=myProg) (|(&(count=5)(memory>=64)) (&(count=7)(memory>=32)))
1b.9 Requesting multiple resources multirequest: + To execute 5 instances of myProg1 on a machine with at least 64 Mbytes memory and execute 2 instances of myProg2: +(&(count=5)(memory>=64)) (executable=myProg1)) (&(count=2)(executable=myProg2))
1b.10 Resource Specification Language, RSL version 2 GT3 and GT 4 use RSL version 2. –Some differences in RSL language specification in GT4, so not completely interchangeable!!!. RSL Version 2 is an XML language.
1b.11 Resource Specification Language Version 2 (RSL -2) XML version of RSL 1 Can specify everything from executable, paths, arguments, input/output, error file, number of processes, max/min execution time, max/min memory, job type etc. etc.
1b.12 RSL-2 Much more elegant and flexible, and in keeping with systems using XML. Can use XML parsers. Allows more powerful mechanisms with job schedulers. Resource scheduler/broker applies specification to local resources.
1b.13 RSL-2 Examples Specifying Executable (executable=/bin/echo) In GT 4 version of RSL-2, can simply write: /bin/echo
1b.14 Specifying Directory (directory=“/bin”) In GT 4 version of RSL-2, can simply write: /bin/
1b.15 Specifying Number (count=1) In GT 4 version of RSL-2, can simply write: 1
1b.16 Specifying Arguments (arguments=“Hello”) In GT 4 version of RSL-2, can simply write: hello world
1b.17 RSL and GT 3.2 RSL-2 comparison for echo program &((executable=/bin/echo) (directory="/bin") (arguments="Hello World") (stdin=/dev/null) (stdout="stdout") (stderr="stderr") (count=1) ) <rsl:rsl xmlns:rsl=" xmlns:gram=" xmlns:xsi=" xsi:schemaLocation=" c:/ogsa-3.0/schema/base/gram/rsl.xsd c:/ogsa-3.0/schema/base/gram/gram_rsl.xsd">
1b.18 GT 4.0 RSL-2 for echo program /bin/echo ${GLOBUS_USER_HOME} Hello World ${GLOBUS_USER_HOME}/stdout ${GLOBUS_USER_HOME}/stderr 1 multiple
1b.19 Comments on Linux command structure Linux commands typically consist of the command (program) name, a list of optional and required named “flags”, possibly with arguments. Flags are preceded with a hyphen and are traditionally a single letter, but can be more letters and may have alterative full names. Flags case sensitive.
1b.20 Examples ls –aList files, -a says list all files including hidden files (those starting with a period). cc –o outputfile prog1 compile C program prog1 and create executable called outputfile
1b.21 Comments on Linux command structure Command can be quite long and must be entered without a return. If need to go onto next line, use \ (backslash) first. Cause next character to be taken “literally”. Will not use \ for next line continuation in slides, for clarity.
1b.22 GT4 job submission command globusrun-ws Submit and monitor GRAM jobs Replaces (java) managed-job-globusrun Written in C, faster startup and execution Supports multiple and single job submission Handles credential management Streaming of job stdout/err during execution
1b.23 Simple job submission Step 1: Create proxy with grid-proxy- int command. Step 2: Issue globusrun-ws with parameters to specify job.
1b.24 Some globusrun-ws flags (options) for job submission
1b.25 Running GT 4 Job using XML job description file Command: globusrun-ws –F hostname:port –submit –f prog.xml where prog.xml specifies the job.
1b.26 Job submission -submit flag -submit Submits (or resubmits) a job to a job host in one of three output modes: batch interactive, or interactive-streaming. Default (without additional flags to specify) is “interactive.” -submit flag is always required to submit a job.
1b.27 Specifying where job is submitted -F Specifies the “contact” for the job submission. Default ManagedJobFactoryService In assignment 2, simply localhost and container port used, i.e. -F localhost:8440 Jeremy decided on this port.
1b.28 Selecting a different host Example globusrun-ws –submit –F services/managedJobFactoryService –f prog1.xml
1b.29 Job description Two ways: -f job-description-file Job description read from given file (as in previous slides) -ctakes remaining globusrun-ws arguments and generates job description with named program and arguments. Must be last flag.
1b.30 -f flag –f job description held in a file. Example globusrun-ws –submit –f echo.xml where echo.xml is an RSL-2 file describing job.
1b.31 Contents of echo.xml /bin/echo hello
1b.32 Input/Output RSL file can specify where stdout/err goes. Example /bin/echo /tmp hello job.out job.err …
1b.33 Stream Input/Output -s The standard output and standard error files of the job are monitored and data is written to the corresponding output of globusrun-ws. Allows streaming stdout/err during executing to the terminal.
1b.34 Stream output data files Can also “stream” output data files. Specify in RSL file where to.
1b.35 Example … file:///tmp/job.out gsiftp://host.domain:2811/ tmp/stage.out …
1b.36 Submitting a single job without XML job description file -c flag -c Causes globusrun-ws to generate a simple job description with the named program and arguments. This flag, if used, must be the last flag. Only useful for very simple single jobs.
1b.37 Example Submit program echo with argument hello to default local host. % globusrun-ws –submit –c /bin/echo hello Submitting job...Done. Job ID: uuid:d23a7be0-f87c-11d9-a53b aae1f Termination time: 07/20/ :44 GMT Current job state: Active Current job state: CleanUp Current job state: Done Destroying job...Done.
1b.38 In previous example, output would be lost, as stdout not displayed. To specify a file for the output, need two flags: -s for streaming output and –so to specify output file
1b.39 globusrun-ws -submit -F localhost:8440 -s -so echo_output -c /bin/echo hello name of file holding output Argument for echo
1b.40 Batch Submission Job queued for execution. -batch Results in ManagedJob EPR as the sole standard output (unless in quiet mode) and then exits. -o filename Created ManagedJob EPR written to file (if submission successful) EPR “End point Reference” – the way to locate a web service, more on that later.
1b.41 Batch Job Submission $ globusrun-ws –submit –batch –o job_epr –s /bin/sleep 50 Submitting job…Done JoB ID: uuid:f c5-11d9-97e a5ad41e5 Termination time: 01/08/ :05 GMT
1b.42 Monitoring Batch Submission -monitor Attaches to an existing job in interactive or interactive-streaming output modes. -j filename EPR for ManagedJob read from file.
1b.43 Monitoring Batch Job globusrun-ws –monitor –j job_epr job state: Active Current job state: CleanUp Current job state: Done Requesting original job description...Done. Destroying job...Done
1b.44 Batch Submission -status Reports the current state of the job and exits -kill Requests immediate cancellation of job and exits.
1b.45
1b.46 Many other flags Example -term time Set an absolute termination time, or a time relative to the successful job creation
1b.47 Sources of GT 4 information Also: “GRAM, RFT & Job Submission, Execution Management for GT4 Developers,” S. Martinb and P. Plaszczak, globusWorld, 2005,
1b.48 To learn more about Linux commands “Linux in a Nutshell,” by E. Siever, S. Figgins, and A. Weber, O’Reilly, (4 th edition 2003). 928 pages!!
1b.49 Multiple choice quiz When one issues the GT4.0 command: globusrun-ws -submit -F localhost:8440 -s -so hello1 -c /bin/echo hello what is hello? (a)A java class (b)An xml file containing the description of the job to be run (c)The executable to run in Globus (d)The argument for the program that will be executable
1b.50 When one issues the GT4.0 command: globusrun-ws -submit -F localhost:8440 -s -so hello1 -c /bin/echo hello is the order of the flags important, and if so why? (a)Not important (b)Important: -c must be last as it uses the remaining arguments (c)Important: -s must be before -so (d)Important: -F must be first
1b.51 When one issues the GT4.0 command: globusrun-ws -submit -F localhost:8440 -s -so hello1 -c /bin/echo hello what is localhost? (a)The server logged into running globusrun-ws. (b)The computer you are using to log into the server (c)None of the other answers.
1b.52 What does the tag specify in an RSL-2 file? (a) The number of different jobs submitted. (b)The number of computers to use. (c)The number of identical jobs to submit. (d)The number of arguments.
1b.53 Questions