Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get which task from slurm job array has failed

Tags:

slurm

I have run a slurm job array (9714509) and it failed with a Mixed, ExitCode [0-1]. Using the code from here, I can see that only one job failed:

$ sacct -n -X -j 9714509 -o state%20 | sort | uniq -c
     25            COMPLETED 
      1               FAILED 

Is there a way to get which task number has failed, because checking the individual log files will take too long.

like image 646
justinian482 Avatar asked Jul 09 '26 15:07

justinian482


1 Answers

Remove the | uniq -c part, which is the command that does the counting and replace it with a fileter on FAILED. Also add the job id in the output of sacct:

sacct -n -X -j 9714509 -o state%20,jobid%20 | grep FAILED

should output what you need.

like image 66
damienfrancois Avatar answered Jul 15 '26 23:07

damienfrancois



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!