Reputation: 803
I have a slurm job scheduled and running on a cluster. It is a simple sbatch
that runs a MATLAB .m file. After it finishes running, the output (two graphs) is successfully generated as expected. However, when I do sacct
, the job state reads "FAILED" and exit code reads "9:0". To me it should read COMPLETED instead.
In my sbatch
file, I did specify error
and output
, and the two files are indeed generated with no content.
Can someone please help?
Upvotes: 1
Views: 1007
Reputation: 59260
The job final state is dictated by the return code of the submission script, which is in turn the return code of the last command of the submission script. So the most plausible explanation would be that even though the Matlab script runs fine, the last command of the submission script does not. If Matlab is the last command of the script, then it appears to return a non-zero code, probably because some cleaning tasks could not be performed.
Upvotes: 0