From 88477f8ded8b3c4a5b010ce71a081de0ceecaef7 Mon Sep 17 00:00:00 2001 From: apcraig Date: Sat, 7 Feb 2026 12:49:20 -0700 Subject: [PATCH] Update job checking logic to avoid PBS output that shows completed jobs, added -v " historical ". This is far from ideal and not particularly future proof, but PBS qstat has become a mess. Fix potential bug in setting ICE_MACHINE_QSTAT if the string has spaces in it. --- configuration/scripts/tests/poll_queue.csh | 2 +- icepack.setup | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configuration/scripts/tests/poll_queue.csh b/configuration/scripts/tests/poll_queue.csh index 39c53efd9..0734bf9c1 100755 --- a/configuration/scripts/tests/poll_queue.csh +++ b/configuration/scripts/tests/poll_queue.csh @@ -13,7 +13,7 @@ foreach line ("`cat suite.jobs`") set qstatjob = 1 if (${job} =~ [0-9]*) then while ($qstatjob) - set qstatus = `${ICE_MACHINE_QSTAT} $job | grep $job | wc -l` + set qstatus = `${ICE_MACHINE_QSTAT} $job | grep -iv " historical " | grep $job | wc -l` # echo $job $qstatus if ($qstatus == 0) then echo "Job $job completed" diff --git a/icepack.setup b/icepack.setup index d6cf67255..e85fe8977 100755 --- a/icepack.setup +++ b/icepack.setup @@ -981,7 +981,7 @@ EOF0 if ($?ICE_MACHINE_QSTAT) then cat >! ${tsdir}/poll_queue.env << EOF0 -setenv ICE_MACHINE_QSTAT ${ICE_MACHINE_QSTAT} +setenv ICE_MACHINE_QSTAT "${ICE_MACHINE_QSTAT}" EOF0 endif