120 likes | 254 Views
Assignment 3 Using GRAM to Submit a Job to the Grid. James Ruff Senior Western Carolina University Department of Mathematics and Computer Science. What is GRAM?. GRAM stands for Globus Resource Allocation Manager. GRAM is used as the interface to request and use different resources.
E N D
Assignment 3Using GRAM to Submit a Job to the Grid James Ruff Senior Western Carolina University Department of Mathematics and Computer Science
What is GRAM? • GRAM stands for Globus Resource Allocation Manager. • GRAM is used as the interface to request and use different resources. • GRAM submissions are called ‘job(s)’.
What does GRAM require? • GRAM requires that the users are entered into an authorization file called the grid-mapfile. • A container must be running on both ends of the request. (i.e. at MCNC and WCU) • The user using the request to have a certificate, and that certificate be trusted at both ends of the job submission. • A valid proxy for the user.
Requirements Met! • There is already a container listening to port 8443 on the cluster. We will use this container to submit jobs. • The user accounts for this demonstration are correctly configured for the cluster. • We now need a proxy:% grid-proxy-init
Our First Job Submission • For all of the examples that we will be doing, the scheduler (i.e., what places the jobs on different nodes) will be the Fork scheduler. • Submit our first job:% globusrun-ws –submit –F \ourhost:8443 –streaming –c \/usr/bin/uptime
What happened? • GRAM checked for authentication for your request. • Once confirmed, the scheduler is called. (In our case, the Fork Job Scheduler.) • As each part of the job is completed, the output is streamed to our console. • After job completion, the credentials used are cleaned up. • The job only executed on the machine that we ran the GRAM request on.
Specifying a Job Request using RSL • RSL stands for (Globus) Resource Specification Language. (XML Format) • RSL provides a simple medium to define a job with many parameters, without having to rely only on the command line.
A Sample RSL File <?xml version="1.0" encoding="UTF-8"?> <job> <executable>/bin/echo</executable> <directory>${GLOBUS_USER_HOME}</directory> <argument>12</argument> <argument>abc</argument> <argument>34</argument> <argument>pdscaex_instr_GrADS_grads23_28919.cfg</argument> <argument>pgwynnel was here</argument> <environment> <name>PI</name> <value>3.141</value> </environment> <environment> <name>GLOBUS_DUROC_SUBJOB_INDEX</name> <value>0</value> </environment> <stdout>${GLOBUS_USER_HOME}/stdout</stdout> <stderr>${GLOBUS_USER_HOME}/stderr</stderr> <count>1</count> <jobType>multiple</jobType> </job>
A Few Points from the RSL • <executable>/bin/echo</executable> - Specifies the location of the binary that should be executed. • <argument>12</argument> - Provides arguments to the binary. • <stdout>${GLOBUS_USER_HOME}/stdout</stdout> - Specifies the Standard Output file. • <count>1</count> - Defines how many times the binary should be executed.
Submitting the RSL file • The command to submit the RSL file is almost identical to the previous example:% globusrun-ws –submit –f \$GLOBUS_LOCATION/test/globus_wsrf_gram_service_java_test_unit/test.xml
What’s Next? • Students will be required to complete a Java program. • The Java program will be required to be run using the command line and an RSL form.
Questions? Please ask!