Skip to content

Commit

Permalink
update queue status in autoscale_slurm.sh
Browse files Browse the repository at this point in the history
Adding option "-r" in getJobs() to get all jobs in squeue in case of a job array
  • Loading branch information
bruno-garbaccio authored and arnaudfroidmont committed Jan 5, 2024
1 parent d96beb5 commit 5b6dd34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autoscaling/crontab/autoscale_slurm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def getTopology(clusterName):
# Get the list of Jobs in all states
def getJobs():
# changing the position of Dependency as it is giving blank instead of null. to handle that, putting it at the end.
out = subprocess.Popen(['squeue','-O','STATE,JOBID,FEATURE:100,NUMNODES,Partition,UserName,Dependency'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
out = subprocess.Popen(['squeue','-r','-O','STATE,JOBID,FEATURE:100,NUMNODES,Partition,UserName,Dependency'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
stdout,stderr = out.communicate()
return stdout.split("\n")[1:]

Expand Down Expand Up @@ -433,4 +433,4 @@ try:

except Exception:
traceback.print_exc()
os.remove(lockfile)
os.remove(lockfile)

0 comments on commit 5b6dd34

Please sign in to comment.