With the introduction of SLURM on Compute Canada we've been running into some issues when the IO routines of libminc being interrupted by the timeout SIGTERM+SIGKILL.
SLURM signals with a SIGTERM, waits 30 seconds, then signals with a SIGKILL to stop overtime jobs (as configured on compute canada)
Unfortunately, due to a combination of the latency of the filesystem and the size of files being written, we're running into some minc-based tools being interrupted by the SIGKILL. This seems to result in malformed MINC or XFM files being left dangling which messes with future runs of the pipeline.
Searching through the code, it doesn't look like there's any signal handlers implemented. I would like to propose that the IO routines implement a SIGTERM handler that will stop and delete the output file if it receives a SIGTERM.
With the introduction of SLURM on Compute Canada we've been running into some issues when the IO routines of libminc being interrupted by the timeout SIGTERM+SIGKILL.
SLURM signals with a SIGTERM, waits 30 seconds, then signals with a SIGKILL to stop overtime jobs (as configured on compute canada)
Unfortunately, due to a combination of the latency of the filesystem and the size of files being written, we're running into some minc-based tools being interrupted by the SIGKILL. This seems to result in malformed MINC or XFM files being left dangling which messes with future runs of the pipeline.
Searching through the code, it doesn't look like there's any signal handlers implemented. I would like to propose that the IO routines implement a SIGTERM handler that will stop and delete the output file if it receives a SIGTERM.