Grid Engine Job Script Example Abaqus

#!/bin/bash
#
# Your job name
#$ -N ABAQUS
#
# Use current working directory
#$ -cwd
#
# Join stdout and stderr
#$ -j y
#
# pe (Parallel environment) request. Set your number of processors here.
#$ -pe openmpi_ib 4
#
# Run job through bash shell
#$ -S /bin/bash
#
# Use this queue
#$ -q abaqus.q
# If modules are needed, source modules environment:
. /etc/profile.d/modules.sh
# Add any modules you might require:
module add shared sge openmpi/gcc abaqus
# Define particulars of this run:
ABAQUS_PROGRAM=abaqus
ABAQUS_INPUT=/home/cmsupport/BenchMarks/abaqus/1036_CEE_091110_DT50_10_308_c02
ABAQUS_JOBNAME=ABAQUS_${JOB_ID}
ABAQUS_ARGS=""
ABAQUS_SCRATCH_DIR=/scratch/
 
#
# To manage abaqus jobs, you need to catch signals
#
and use "abaqus terminate" to stop the job
#
exit_gracefully () {
  abaqus terminate job=$ABAQUS_JOBNAME
  echo Abaqus job $ABAQUS_JOBNAME terminated
  exit
}
# The following output will show in the output file. Used for debugging.
echo "Got $NSLOTS processors."
# invoke abaqus in the background on the compute node:
trap exit_gracefully SIGUSR2
# use this for MPI (distributed memory) parallelism
$ABAQUS_PROGRAM cpus=$NSLOTS mp_mode=mpi job=$ABAQUS_JOBNAME input=$ABAQUS_INPUT scratch=$ABAQUS_SCRATCH_DIR $ABAQUS_ARGS
# Report some useful info
/bin/uname -a
#
# now sleep until lock file disappears
#
sleep 60
while [ -f ${ABAQUS_JOBNAME}.lck ]; do
sleep 5
done

Copyright 2002-2014 ClusterVision BV