LSF Version 7.3 - Using Platform LSF HPC
# -----------------------------------------------------
# Process the command line:
# - extract [mpiopts] from the command line
# - extract jobname [jobopts] from the command line
# -----------------------------------------------------
ARG0=`$LAMMPIRUN_CMD -h 2>&1 | \
egrep '^[[:space:]]+-[[:alpha:][:digit:]-]+[[:space:]][[:space:]]' | \
awk '{printf "%s ", $1}'`
# get -ton,t and -w / nw options
TMPARG=`$LAMMPIRUN_CMD -h 2>&1 | \
egrep '^[[:space:]]+-[[:alpha:]_-]+[[:space:]]*(,|/)[[:space:]]-
[[:alpha:]]*' |
sed 's/,/ /'| sed 's/\// /' | \
awk '{printf "%s %s ", $1, $2}'`
ARG0="$ARG0 $TMPARG"
ARG1=`$LAMMPIRUN_CMD -h 2>&1 | \
egrep '^[[:space:]]+-[[:alpha:]_-
]+[[:space:]]+<[[:alpha:][:space:]_]+>[[:space:]]' | \
awk '{printf "%s ", $1}'`
while [ $# -gt 0 ]
do
MPIRunOpt="0"
#single-valued options
for option in $ARG1
do
if [ "$option" = "$1" ]; then
MPIRunOpt="1"
case "$1" in
-np|-c)
shift
shift
;;
*)
LAMMPI_OPTS="$LAMMPI_OPTS $1" #get option name
shift
LAMMPI_OPTS="$LAMMPI_OPTS $1" #get option value
shift
;;
esac
break
fi
done
if [ $MPIRunOpt = "1" ]; then
:
else
#Non-valued options
for option in $ARG0
do