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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With