Using gssklog at the Manchester Tier 2

7 dec 2009

  • Before you start.
  • Setting up a project
  • Running a job
  • Adding stuff.
  • Mistakes to avoid, and debugging
  • Examples of how it's been done.

  •  
    

    Before you start

    Get yourself a Grid Certificate if you havn't got one already

    Join at least one Virtual Organisation (VO) There may be an obvious one for your experiment, if not there is a default called Northgrid

    Get into the afs mapfile Tell the system manager (Sabah) your Grid certificate DN and your userid on the local cluster. He will add this to the map file so that the cluster knows about the link.

    These are things you only need to do once. Ever.


    Setting up a project

    Suppose your userid is userid and you have a working directory workdir and to run a job myjob online you log in and type
    cd  workdir 
    ./myjob.exe
    
    You now need to create a file called, for example script which contains
    
    /usr/bin/gssklog -cell hep.man.ac.uk -principal  userid -server afs1.hep.man.ac.uk -port 5750
    cd  workdir
    ./myjob.exe
    

    Running a job

    iAt the start of each session you type
    voms-proxy-init --voms your vo name   --valid 24:00
    
    This creates a certificate proxy which will then be sent around with the jobs you submit. The --valid 24:00 is optional but helps. The default is 12 hours.

    Type

    globus-job-submit  ce01.tier2.hep.manchester.ac.uk:2119/jobmanager-lcgpbs -q long -s script
    
    Given that this is such a mouthful you may want to write a shell script to do it for you

    Adding stuff

    If your job uses input arguments, for example as a random number seed or the name of a control file, you would normally type
    ./myjob.exe parameter
    
    Then in the script file you can put
    
    ./myjob.exe $arg
    
    and in the globus-job-submit command you add the option -env arg=parameter This is heavily used if the submit command is in a loop in a script, so many jobs can be submitted at once. For example running the bash script
    for  (( i=1; i<=$1; i++))
    do
    mkdir $RUN$i
    globus-job-submit  ce01.tier2.hep.manchester.ac.uk:2119/jobmanager-lcgpbs -q long  -env homedir=$homedir -env DIR=$RUN$i -env iseed=$i -env afsname=$afsname -s merlinscript
    done
    
    
    with submitted script
    /usr/bin/gssklog -cell hep.man.ac.uk -principal $afsname -server afs1.hep.man.ac.uk -port 5750
    cd $homedir/$DIR
    ../example411  $iseed > run.out 2> run.err
    

    Mistakes and errors and stuff

    The batch job does not run your normal login profile. You can do this explicitly (though there may be glitches) or you can add in some of the stuff it needs. In particular the ROOT system stuff needs to be made known
    export ROOTSYS=../../myRoot/root
    export LD_LIBRARY_PATH=../../myRoot/root/lib:$LD_LIBRARY_PATH