Skip to content

Commit

Permalink
Add logic to launcher to detect when number of processors allocated e…
Browse files Browse the repository at this point in the history
…xceeds number of tasks to execute.

Fix for issue #16.
  • Loading branch information
Lucas Wilson committed May 25, 2017
1 parent e487fef commit ddd9d28
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion launcher
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,19 @@ fi

COMPLETE="false"

#Check to see if the job id is larger than the task id. If so, termine
#BUGFIX for github issue #16 https://github.com/TACC/launcher/issues/16
if [ ! "$LAUNCHER_JID" == "Done" ]
then
if [ $LAUNCHER_JID -gt $LAUNCHER_NJOBS ]
then
COMPLETE="overallocate"
fi
else
COMPLETE="overallocate"
fi


while [ $COMPLETE == "false" ]; do
if [ ! "x$LAUNCHER_JID" == "x" ]
then
Expand Down Expand Up @@ -125,4 +138,7 @@ while [ $COMPLETE == "false" ]; do

done

echo "Launcher: Task $LAUNCHER_TSK_ID done. Exiting."
if [ $COMPLETE == "true" ]
then
echo "Launcher: Task $LAUNCHER_TSK_ID done. Exiting."
fi

0 comments on commit ddd9d28

Please sign in to comment.