A simple job with GLOBUS

About the job itself


A simple job will be created and sent to the GRID in order to show the working principle. Details on each step will be described in other documents.

The simple job does the following:

  • The file file1.txt should be written a specified number of times (e.g. 4) to the output.


The executable and the parameters


Write a text file with a short text of your choice and call it file1.txt.

Write a shell script test.sh with the following content:


#!/bin/sh
echo "Starting at" `date` "on" `hostname`
J=1
while [ $J -lt $2 ] ;

do
cat $1
J=$(( $J + 1 ))
done
echo "Finished at" `date`


$1 is the placeholder for the first parameter, $2 for the second parameter.


Make the file executable: chmod +x test.sh


The Resource Specification Language (RSL)


Next step is to create the file containing the job definitions. Create a file called test.rsl including the following lines:


& (executable = "test.sh")
   (directory = "/home2/arntraud/simplejob")
   (arguments = "file1.txt" "5" )


The lines will be described shortly:
Line 1: Name of the file to execute
Line 2: Directory, where the data is stored (insert your working directory)
Line 3: Arguments called in the executable


Submitting the job


  1. Before you submit the job, copy the needed files (executable and input files) to the host.
    Create a proxy by using the command grid-proxy-init:

    create_proxy_02

  2. Run the job using the command globusrun -r <host> -f <rsl-file> -o

    globusrun_01
Nach oben scrollen