LSF Version 7.3 - Using Platform LSF HPC

LAMHALT_CMD="lamhalt"
#
# -----------------------------------------------------
# Define an exit value to rerun the script if it fails
# - create and set the variable EXIT_VALUE to represent the requeue exit value
# - we assume you have enabled job requeue in LSF
# - we assume 66 is one of the job requeue values you specified in LSF
# ----------------------------------------------------
#
# EXIT_VALUE should not be set to 0
EXIT_VALUE="66"
#
# -----------------------------------------------------
# Write the first entry to the script's log file
# - date of creationg
# - name of log file
# ----------------------------------------------------
#
my_name=`who_am_i`
echo "`date` $my_name" >>$LOGFILE
# -----------------------------------------------------
# Use the signal handling function to handle specific external signals.
# ----------------------------------------------------
#
trap lammpirun_exit 1 2 3 15
#
# -----------------------------------------------------
# Set up a hosts file in the specific format required by LAM MPI:
# - remove any old hosts file
# - create a new hosts file with a unique name using the LSF job ID
# - write a comment at the start of the hosts file
# - if the hosts file was not created properly, display an error to
# the user and exit
# - define the variables HOST, NUM_PROC, FLAG, and TOTAL_CPUS to
# help with parsing the host information
# - LSF's selected hosts are described in LSB_MCPU_HOSTS environment variable
# - parse LSB_MCPU_HOSTS into the components
# - write the new hosts file using this information
# - write a comment at the end of the hosts file
# - log the contents of the new hosts file to the script log file
# ----------------------------------------------------
#
LAMHOST_FILE=".lsf_${TMP_JOBID}_lammpi.hosts"
if [ -d "$HOME" ]; then
LAMHOST_FILE="$HOME/$LAMHOST_FILE"
fi