From d9ab8c81c11120c32864858d7caafe908c408ad5 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Sun, 31 May 2015 05:32:55 -0400 Subject: [PATCH] 6146: Use new SLURM_JOB_ID env var instead of old SLURM_JOBID --- sdk/cli/bin/crunch-job | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job index c536da66a7..33407fb97e 100755 --- a/sdk/cli/bin/crunch-job +++ b/sdk/cli/bin/crunch-job @@ -139,7 +139,7 @@ if (defined $job_api_token) { $ENV{ARVADOS_API_TOKEN} = $job_api_token; } -my $have_slurm = exists $ENV{SLURM_JOBID} && exists $ENV{SLURM_NODELIST}; +my $have_slurm = exists $ENV{SLURM_JOB_ID} && exists $ENV{SLURM_NODELIST}; $SIG{'USR1'} = sub @@ -1296,7 +1296,7 @@ sub check_squeue } # get a list of steps still running - my @squeue = `squeue --jobs=\Q$ENV{SLURM_JOBID}\E --steps --format='%i %j' --noheader`; + my @squeue = `squeue --jobs=\Q$ENV{SLURM_JOB_ID}\E --steps --format='%i %j' --noheader`; if ($? != 0) { Log(undef, "warning: squeue exit status $? ($!)"); @@ -1310,7 +1310,7 @@ sub check_squeue { if (/^(\d+)\.(\d+) (\S+)/) { - if ($1 eq $ENV{SLURM_JOBID}) + if ($1 eq $ENV{SLURM_JOB_ID}) { $ok{$3} = 1; } @@ -1344,7 +1344,7 @@ sub release_allocation if ($have_slurm) { Log (undef, "release job allocation"); - system "scancel $ENV{SLURM_JOBID}"; + system "scancel $ENV{SLURM_JOB_ID}"; } } -- 2.30.2