Globus Toolkit Tutorial The Globus Consortium
 
 

Chapter 6: Deploying The Globus Toolkit 4.0.x

Testing file staging

To test a simple file staging job we will submit a job from nodeA that uses an input file from nodeA. The file will be transferred to nodeB, the job will run, and the transferred file will be used as input. When the job is completed the input file that was transferred will be cleaned up (deleted).

As user jane on nodeA create the file 'simple-stage-job.rsl' so that it has the contents shown below:

[jane@nodeA ~]$ cat simple-stage-job.rsl

<job>
<executable>/bin/cat</executable>
<directory>${GLOBUS_USER_HOME}</directory>
<argument>helloworld.txt</argument>
<fileStageIn>
<transfer>
<sourceUrl>gsiftp://nodea.ps.univa.com/home/jane/helloworld.txt</sourceUrl>
<destinationUrl>file:///${GLOBUS_USER_HOME}/helloworld.txt</destinationUrl>
</transfer>
</fileStageIn>
<fileCleanUp>
<deletion>
<file>file:///${GLOBUS_USER_HOME}/helloworld.txt</file>
</deletion>
</fileCleanUp>
</job>

The job command file or 'RSL' file declares that the executable on the remote nodeB will be '/bin/cat', it will run in the home directory or the remote user, and the argument will be the name of the input file 'helloworld.txt'.

We also see in the RLS file that the file helloworld.txt will be staged in by transferring it from the home directory of the user on nodeA and placing it in the home directory on nodeB.

Lastly we see that the file on nodeB will be cleaned up when the job is completed.

Before running the job create the file 'helloworld.txt' on nodeA as shown:

[jane@nodeA ~]$ cat helloworld.txt
Hello World from jane on nodeA!

Now run the job from nodeA on nodeB and use the '-f' flag to run the job described in the file 'simple-stage-job.rls':

[jane@nodeA ~]$ globusrun-ws -submit -streaming -F https://nodeb.ps.univa.com:8443/wsrf/services/ManagedJobFactoryService -f simple-stage-job.rsl
Delegating user credentials...Done.
Submitting job...Done.
Job ID: uuid:91b95050-a4a7-11da-bc4c-0011d8b1eb22
Termination time: 02/24/2006 20:04 GMT
Current job state: StageIn
Current job state: Active
Current job state: CleanUp-Hold
Hello World from jane on nodeA!
Current job state: CleanUp
Current job state: Done
Destroying job...Done.
Cleaning up any delegated credentials...Done.

Notice above the output from running the 'cat' job on nodeB. You should verify that on nodeB the input file that had been transferred into jane's home directory has been cleaned up after the job completed.
 
 
 
FAQ Feedback The Globus Consortium Home Page