LSF Version 7.3 - Using Platform LSF HPC
Example Integration: LAM/MPI
The script lammpirun_wrapper is the PJL wrapper. Use either “Integration Method
1” on page 52 or “Integration Method 2” on page 54 to call this script:
pam [
other_pam_options
] -g
num_args
lammpirun_wrapper
job
[
job_options
]
pam [
other_pam_options
] -g lammpirun_wrapper
job
[
job_options
]
Example script
#!/bin/sh
#
# -----------------------------------------------------
# Source the LSF environment. Optional.
# -----------------------------------------------------
. ${LSF_ENVDIR}/lsf.conf
# -----------------------------------------------------
# Set up the variable LSF_TS representing the TaskStarter.
# -----------------------------------------------------
LSF_TS="$LSF_BINDIR/TaskStarter"
# ---------------------------------------------------------------------
# Define the function to handle external signals:
# - display the signal received and the shutdown action to the user
# - log the signal received and the daemon shutdown action
# - exit gracefully by shutting down the daemon
# - set the exit code to 1
# ----------------------------------------------------------------------
#
lammpirun_exit()
{
trap '' 1 2 3 15
echo "Signal Received, Terminating the job<${TMP_JOBID}> and run lamhalt
..."
echo "Signal Received, Terminating the job<${TMP_JOBID}> and run lamhalt
..." >>$LOGFILE
$LAMHALT_CMD >>$LOGFILE 2>&1
exit 1
} #lammpirun_exit
#-----------------------------------
# Name: who_am_i
# Synopsis: who_am_i
# Environment Variables:
# Description:
# It returns the name of the current user.
# Return Value:
# User name.
#-----------------------------------
who_am_i()
{
if [ `uname` = ConvexOS ] ; then