SI2007 track1 globusrun, ssh and csf4

From NBCRwiki

Jump to: navigation, search

Back to Track 1

Contents

Serial Jobs

SSH style

eval `ssh-agent`
ssh-add
[enter passphrase]
ssh <FQDN> hostname

Globus style

grid-proxy-init
[enter passphrase]
globus-job-run <FQDN> /bin/hostname

Note: absolute path is required by globus.

  • Pre-WS GRAM
globusrun -r <FQDN>/jobmanager-fork -f job.rsl

job.rsl:

&(executable=/bin/hostname)(stdout=/home/zding/test.out)
  • WS GRAM
 globusrun-ws -submit -factory https://<FQDN>:8443/wsrf/services/ManagedJobFactoryService -f job.xml

job.xml

  <?xml version="1.0" encoding="UTF-8"?>
  <job>
    <executable>/bin/hostname</executable>
    <stdout>/home/zding/test.out</stdout>
  </job>

CSF4 style

csf-job-create -rsl job.rsl -submit or
csf-job-create -rsl job.xml -submit

job.rsl and job.xml is same as globus style, CSF4 understands the both formats.

Note: Since CSF4 may submit your job to another cluster, you can't view the output file at local machine. So you can use automatic data-staging of CSF4 by specifying stageout tag. new job.rsl

&(executable=/bin/hostname)(stdout=/home/zding/test.out)(stageout="/home/zding/test.out")

Then the /home/zding/test.out will be transfer to your submission machine, wherever the job is running on.

Parallel Jobs

SSH style

 eval `ssh-agent`
ssh-add
[enter passphrase]
ssh <FQDN> qsub sge-qsub-test.sh

sge-qsub-test.sh

#!/bin/bash
#$ -S /bin/bash
#
# set the P4_GLOBMEMSIZE
#$ -v P4_GLOBMEMSIZE=10000000
#
# Set the Parallel Environment and number of procs.
#$ -pe mpi 4

# Put your Job commands here.
#
#------------------------------------------------

/opt/mpich/gnu/bin/mpirun -np $NSLOTS -machinefile $TMP/machines \
        /opt/hpl/gnu/bin/xhpl

#------------------------------------------------

Globus style

grid-proxy-init
[enter passphrase]
globusrun -r <FQDN>/jobmanager-sge -f sge-qsub-test.rsl

sge-qsub-test.rsl

&(jobtype=mpi)(executable="/opt/hpl/gnu/bin/xhpl")(count="4")
(stdout="/home/zding/stdout.txt")(stderr="/home/zding/stderr.txt")

CSF4 style

  • single cluster
csf-job-create -rsl sge-qsub-test.rsl -ct SGE -submit

sge-qsub-test.rsl is same as globus style, "ct" is the abbreviation of Cluster Type,which is optional, -submit means submit the job right now.

  • mutiple clusters
csf-mpi-run -np 4 -e /opt/hpl/gnu/bin/xhpl
  • Starting CSF on Mirume
su postgres 
cd /export/apps/pgsql
./bin/pg_ctl start -D  data/ -l data/pg.log
su globus
globus-start-container >& /opt/gt4/log &

Back to Track 1

Personal tools