Skip to content

Commit

Permalink
Update mycluster-zcfd to support setting OVERRIDE for overset
Browse files Browse the repository at this point in the history
  • Loading branch information
jsharpe committed Mar 12, 2021
1 parent 8d1819b commit 2aac9b4
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion share/mycluster-zcfd.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
set -eo pipefail

source ${ZCFD_HOME:?"ZCFD_HOME has not been set. Please set it and run this script again"}/activate

if [ -z ${OVERRIDE+x} ]; then

: ${PROBLEM:?"PROBLEM is not set. Please set it and run this script again"}
: ${CASE:?"CASE is not set. Please set it and run this script again"}

Expand All @@ -18,7 +21,26 @@ if [ ! $count -eq $# ]; then
fi
IFS=${OLDIFS}

$ZCFD_HOME/run_zcfd --ntask ${NUM_TASKS:?"NUM_TASKS is not set. Please set this and run again"} --tpn ${TASKS_PER_NODE:?"TASKS_PER_NODE is not set. Please set this and run again"} -p ${PROBLEM//:/ } -c ${CASE//:/ } >& ${CASE%%:*}_log
ZCFDARGS="-p ${PROBLEM//:/ } -c ${CASE//:/ }"
REDIRECT_NAME="${CASE%%:*}_log"

else

ZCFDARGS="-f ${OVERRIDE}"
REDIRECT_NAME="${OVERRIDE}_log"

if [ ! -z ${PROBLEM+x} ]; then
echo "WARNING: \${PROBLEM} is set - this is ignored if \${OVERRIDE} is also set"
fi

if [ ! -z ${CASE+x} ]; then
echo "WARNING: \${CASE} is set - this is ignored if \${OVERRIDE} is also set"
fi

fi

$ZCFD_HOME/run_zcfd --ntask ${NUM_TASKS:?"NUM_TASKS is not set. Please set this and run again"} --tpn ${TASKS_PER_NODE:?"TASKS_PER_NODE is not set. Please set this and run again"} ${ZCFDARGS} >& ${REDIRECT_NAME}


exitcode=$?

Expand Down

0 comments on commit 2aac9b4

Please sign in to comment.