Pbsjob example.sh: Difference between revisions
From KIP Wiki
⧼kip-jumptonavigation⧽⧼kip-jumptosearch⧽
No edit summary |
No edit summary |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
Download: [[media:Pbsjob_example.sh]] |
|||
#! /usr/bin/zsh |
|||
# |
|||
#! /bin/zsh |
|||
# Example submission script for Torque or PBS (Portable Batch System) |
|||
# |
# |
||
# Example submission script for Torque or PBS (Portable Batch System) |
|||
# Usage: submit job with |
|||
# |
|||
# qsub pbsjob_example.sh |
|||
# Usage: submit job with |
|||
# |
|||
# qsub pbsjob_example.sh |
|||
#=========================================================================== |
|||
# |
|||
# PBS Job Parameters |
|||
#=========================================================================== |
|||
# All parameters start with #PBS, so that the shell ingores them, |
|||
# PBS Job Parameters |
|||
# but the PBS server reads them! |
|||
# All parameters start with #PBS, so that the shell ingores them, |
|||
#=========================================================================== |
|||
# but the PBS server reads them! |
|||
# |
|||
#=========================================================================== |
|||
# Job name (default is the name of pbs script file) |
|||
# |
|||
#PBS -N pbsjob_example |
|||
# Job name (default is the name of pbs script file) |
|||
# |
|||
#PBS -N pbsjob_example |
|||
# Path/filename for standard output. Default: [job_name].o[job_id] |
|||
# |
|||
#PBS -o /tmp/pbsjob_example.out |
|||
# Path/filename for standard output. Default: [job_name].o[job_id] |
|||
# |
|||
#PBS -o /tmp/pbsjob_example.out |
|||
# Path/filename for error output. Default: [job_name].e[job_id] |
|||
# |
|||
#PBS -e /tmp/pbsjob_example.err |
|||
# Path/filename for error output. Default: [job_name].e[job_id] |
|||
# |
|||
#PBS -e /tmp/pbsjob_example.err |
|||
# Queue name (e.g. Instant, Short, Medium, Long, Eternal). Default: Medium |
|||
# |
|||
#PBS -q Instant@stud.kip.uni-heidelberg.de |
|||
# Queue name (e.g. Instant, Short, Medium, Long, Eternal). Default: Medium |
|||
# |
|||
#PBS -q Instant@stud.kip.uni-heidelberg.de |
|||
# Execution host (this option increases job standby time. Better remove it!!!) |
|||
# |
|||
#PBS -l host=mare05.atlas-farm.kip.uni-heidelberg.de |
|||
# Execution host (this option increases job standby time. Better remove it!!!) |
|||
# |
|||
#PBS -l host=mare05.atlas-farm.kip.uni-heidelberg.de |
|||
# Send e-mail at the end or abort: |
|||
# |
|||
#PBS -m ae |
|||
# Send e-mail at the end or abort: |
|||
# |
|||
#PBS -m ae |
|||
# Do not rerun this job if it fails |
|||
# |
|||
#PBS -r n |
|||
# Do not rerun this job if it fails |
|||
# |
|||
#PBS -r n |
|||
#=========================================================================== |
|||
# |
|||
# Unique Directory on the Scratch Disk |
|||
#=========================================================================== |
#=========================================================================== |
||
# Unique Directory on the Scratch Disk |
|||
# |
|||
#=========================================================================== |
|||
# The unique directory for a job is created automatically |
|||
# |
|||
# in: /scratch/pbstmp.${PBS_JOBID} on the execution host. |
|||
# The unique directory for a job is created automatically |
|||
# The subdirectory is removed after the job finished. |
|||
# in: /scratch/pbstmp.${PBS_JOBID} on the execution host. |
|||
# The total amount of data in this directory must not exceed 20 GB! |
|||
# The subdirectory is removed after the job finished. |
|||
# |
|||
# The total amount of data in this directory must not exceed 20 GB! |
|||
cd /scratch/pbstmp.${PBS_JOBID} |
|||
# |
# |
||
cd /scratch/pbstmp.${PBS_JOBID} |
|||
#=========================================================================== |
|||
# |
|||
# Run the job |
|||
#=========================================================================== |
#=========================================================================== |
||
# Run the job |
|||
# |
|||
#=========================================================================== |
|||
# The output of the following commands will be appear in the job output file. |
|||
# |
# |
||
# The output of the following commands will be appear in the job output file. |
|||
# get system name |
|||
# |
# |
||
# get system name |
|||
uname -a |
|||
# |
|||
echo " " |
|||
uname -a |
|||
echo "=====================================================================" |
|||
echo " " |
echo " " |
||
echo "=====================================================================" |
|||
# |
|||
echo " " |
|||
# test basic shell environment variables |
|||
# |
# |
||
# test basic shell environment variables |
|||
echo "HOSTNAME = " $HOSTNAME |
|||
# |
|||
echo "PBS_O_HOST = " $PBS_O_HOST |
|||
echo " " |
echo "HOSTNAME = " $HOSTNAME |
||
echo " |
echo "PBS_O_HOST = " $PBS_O_HOST |
||
echo " |
echo " " |
||
echo " " |
echo "PATH = " $PATH |
||
echo " |
echo "PBS_O_PATH = " $PBS_O_PATH |
||
echo " |
echo " " |
||
echo " " |
echo "LOGNAME = " $LOGNAME |
||
echo " |
echo "PBS_O_LOGNAME = " $PBS_O_LOGNAME |
||
echo " |
echo " " |
||
echo " " |
echo "HOME = " $HOME |
||
echo " |
echo "PBS_O_HOME = " $PBS_O_HOME |
||
echo " |
echo " " |
||
echo " " |
echo "SHELL = " $SHELL |
||
echo " |
echo "PBS_O_SHELL = " $PBS_O_SHELL |
||
echo " |
echo " " |
||
echo " " |
echo "MAIL = " $MAIL |
||
echo " |
echo "PBS_O_MAIL = " $PBS_O_MAIL |
||
echo " |
echo " " |
||
echo " " |
echo "PWD = " $PWD |
||
echo " |
echo "PBS_O_WORKDIR = " $PBS_O_WORKDIR |
||
echo " |
echo " " |
||
echo " " |
echo "PBS_O_QUEUE = " $PBS_O_QUEUE |
||
echo " |
echo "PBS_QUEUE = " $PBS_QUEUE |
||
echo " |
echo " " |
||
echo " |
echo "PBS_JOBID = " $PBS_JOBID |
||
echo " |
echo "PBS_JOBNAME = " $PBS_JOBNAME |
||
echo "PBS_NNODES = " $PBS_NNODES |
|||
# |
|||
echo "PBS_ENVIRONMENT = " $PBS_ENVIRONMENT |
|||
# now print all shell environment variable |
|||
# |
# |
||
# now print all shell environment variable |
|||
echo " " |
|||
# |
|||
echo "=====================================================================" |
|||
echo " " |
echo " " |
||
echo "=====================================================================" |
|||
env |
|||
echo " " |
|||
# |
|||
env |
|||
# test allowed system resources |
|||
# |
# |
||
# test allowed system resources |
|||
echo " " |
|||
# |
|||
echo "=====================================================================" |
|||
echo " " |
echo " " |
||
echo "=====================================================================" |
|||
ulimit -a |
|||
echo " " |
|||
# |
|||
ulimit -a |
|||
# create some file aaa and copy it to my data directory |
|||
# |
# |
||
# create some file aaa and copy it to my data directory |
|||
echo " " |
|||
# |
|||
echo "=====================================================================" |
|||
echo " " |
echo " " |
||
echo "=====================================================================" |
|||
echo "Hello World" > aaa |
|||
echo " " |
|||
cp -pv aaa /data/stud/x01/users/${LOGNAME}/ |
|||
echo "Hello World" > aaa |
|||
ls -al /data/stud/x01/users/${LOGNAME}/ |
|||
cp -pv aaa /data/stud/x01/users/${LOGNAME}/ |
|||
# |
|||
ls -al /data/stud/x01/users/${LOGNAME}/ |
|||
# run ATLAS Athena Hello World program |
|||
# |
# |
||
# run ATLAS Athena Hello World program |
|||
echo " " |
|||
# |
|||
echo "=====================================================================" |
|||
echo " " |
echo " " |
||
echo "=====================================================================" |
|||
source /atlas/athena/11.2.0/setup.sh |
|||
echo " " |
|||
source /atlas/athena/11.2.0/dist/11.2.0/Control/AthenaRunTime/AthenaRunTime-00-00-06/cmt/setup.sh |
|||
source /atlas/athena/11.2.0/setup.sh |
|||
athena.py AthExHelloWorld/HelloWorldOptions.py 2>&1 |
|||
source /atlas/athena/11.2.0/dist/11.2.0/Control/AthenaRunTime/AthenaRunTime-00-00-06/cmt/setup.sh |
|||
# |
|||
athena.py AthExHelloWorld/HelloWorldOptions.py 2>&1 |
|||
# |
Latest revision as of 14:41, 14 January 2011
Download: media:Pbsjob_example.sh
#! /bin/zsh # # Example submission script for Torque or PBS (Portable Batch System) # # Usage: submit job with # qsub pbsjob_example.sh # #=========================================================================== # PBS Job Parameters # All parameters start with #PBS, so that the shell ingores them, # but the PBS server reads them! #=========================================================================== # # Job name (default is the name of pbs script file) #PBS -N pbsjob_example # # Path/filename for standard output. Default: [job_name].o[job_id] #PBS -o /tmp/pbsjob_example.out # # Path/filename for error output. Default: [job_name].e[job_id] #PBS -e /tmp/pbsjob_example.err # # Queue name (e.g. Instant, Short, Medium, Long, Eternal). Default: Medium #PBS -q Instant@stud.kip.uni-heidelberg.de # # Execution host (this option increases job standby time. Better remove it!!!) #PBS -l host=mare05.atlas-farm.kip.uni-heidelberg.de # # Send e-mail at the end or abort: #PBS -m ae # # Do not rerun this job if it fails #PBS -r n # #=========================================================================== # Unique Directory on the Scratch Disk #=========================================================================== # # The unique directory for a job is created automatically # in: /scratch/pbstmp.${PBS_JOBID} on the execution host. # The subdirectory is removed after the job finished. # The total amount of data in this directory must not exceed 20 GB! # cd /scratch/pbstmp.${PBS_JOBID} # #=========================================================================== # Run the job #=========================================================================== # # The output of the following commands will be appear in the job output file. # # get system name # uname -a echo " " echo "=====================================================================" echo " " # # test basic shell environment variables # echo "HOSTNAME = " $HOSTNAME echo "PBS_O_HOST = " $PBS_O_HOST echo " " echo "PATH = " $PATH echo "PBS_O_PATH = " $PBS_O_PATH echo " " echo "LOGNAME = " $LOGNAME echo "PBS_O_LOGNAME = " $PBS_O_LOGNAME echo " " echo "HOME = " $HOME echo "PBS_O_HOME = " $PBS_O_HOME echo " " echo "SHELL = " $SHELL echo "PBS_O_SHELL = " $PBS_O_SHELL echo " " echo "MAIL = " $MAIL echo "PBS_O_MAIL = " $PBS_O_MAIL echo " " echo "PWD = " $PWD echo "PBS_O_WORKDIR = " $PBS_O_WORKDIR echo " " echo "PBS_O_QUEUE = " $PBS_O_QUEUE echo "PBS_QUEUE = " $PBS_QUEUE echo " " echo "PBS_JOBID = " $PBS_JOBID echo "PBS_JOBNAME = " $PBS_JOBNAME echo "PBS_NNODES = " $PBS_NNODES echo "PBS_ENVIRONMENT = " $PBS_ENVIRONMENT # # now print all shell environment variable # echo " " echo "=====================================================================" echo " " env # # test allowed system resources # echo " " echo "=====================================================================" echo " " ulimit -a # # create some file aaa and copy it to my data directory # echo " " echo "=====================================================================" echo " " echo "Hello World" > aaa cp -pv aaa /data/stud/x01/users/${LOGNAME}/ ls -al /data/stud/x01/users/${LOGNAME}/ # # run ATLAS Athena Hello World program # echo " " echo "=====================================================================" echo " " source /atlas/athena/11.2.0/setup.sh source /atlas/athena/11.2.0/dist/11.2.0/Control/AthenaRunTime/AthenaRunTime-00-00-06/cmt/setup.sh athena.py AthExHelloWorld/HelloWorldOptions.py 2>&1 #