I have a simple run.sh script:
#!/bin/bash
python print.py
Where print.py is just:
print("just")
print("print")
I submit on a cluster with command where I request one CPU and 1 minute of wall time:
sbatch -c 1 -t 1 run.sh
And everyting works fine and I see the expected output in a slurm log file. But if I add time module nothing works:
import time
print("just")
print("print")
time.sleep(10000)
In a log file a see only this message without any prints:
slurmstepd: error: *** JOB 378186 ON cn-011 CANCELLED AT 2021-10-05T20:15:28 DUE TO TIME LIMIT ***
How can I handle this problem? I expect that I will see such log file:
just
print
slurmstepd: error: *** JOB 378186 ON cn-011 CANCELLED AT 2021-10-05T20:15:28 DUE TO TIME LIMIT ***