#!/bin/csh
#
# Simple SGE script for submitting multiple serial
# jobs (e.g. parametric studies) using a script wrapper
# to launch the jobs.
#
# To use, build the launcher executable and your
# serial application(s) and place them in your WORKDIR
# directory. Then, edit the CONTROL_FILE to specify
# each executable per process.
#-------------------------------------------------------
#-------------------------------------------------------
#
# <------ Setup Parameters ------>
#
#$ -N merge
#$ -pe 4way 72
#$ -q normal
#$ -o merge.o$JOB_ID
#$ -l h_rt=1:00:00
#$ -V
#$ -cwd
# <------ You MUST Specify a Project String ----->
#$ -A DNAdenovo
#------------------------------------------------------
#
# Usage:
# #$ -pe <parallel environment> <number of slots>
# #$ -l h_rt=hours:minutes:seconds to specify run time limit
# #$ -N <job name>
# #$ -q <queue name>
# #$ -o <job output file>
# NOTE: The env variable $JOB_ID contains the job id.
#
module load launcher
setenv EXECUTABLE $TACC_LAUNCHER_DIR/init_launcher
setenv CONTROL_FILE merge.script
setenv WORKDIR .
#
# Variable description:
#
# EXECUTABLE = full path to the job launcher executable
# CONTROL_FILE = text input file which specifies
# executable for each process
# (should be located in WORKDIR)
# WORKDIR = location of working directory
#
# <------ End Setup Parameters ------>
#--------------------------------------------------------
#--------------------------------------------------------
#----------------
# Error Checking
#----------------
if ( ! -e $WORKDIR ) then
echo " "
echo "Error: unable to change to working directory."
echo " $WORKDIR"
echo " "
echo "Job not submitted."
exit
endif
if ( ! -f $EXECUTABLE ) then
echo " "
echo "Error: unable to find launcher executable $EXECUTABLE."
echo " "
echo "Job not submitted."
exit
endif
if ( ! -f $WORKDIR/$CONTROL_FILE ) then
echo " "
echo "Error: unable to find input control file $CONTROL_FILE."
echo " "
echo "Job not submitted."
exit
endif
#----------------
# Job Submission
#----------------
cd $WORKDIR/
echo " WORKING DIR: $WORKDIR/"
$TACC_LAUNCHER_DIR/paramrun $EXECUTABLE $CONTROL_FILE
echo " "
echo " Parameteric Job Complete"
echo " "
|