Running jobs: Difference between revisions

Jump to navigation Jump to search
Remove confusing suggestion about buffering (using tee will not avoid buffering, and writing the output directly to a file is a trivial but not very useful option)
(Marked this version for translation)
(Remove confusing suggestion about buffering (using tee will not avoid buffering, and writing the output directly to a file is a trivial but not very useful option))
Line 608: Line 608:


<!--T:166-->
<!--T:166-->
Sometimes a submitted job writes no output to the log file for an extended period of time, looking like it is hanging. A common reason for this is the aggressive [[#Output_buffering|buffering]] performed by the Slurm scheduler, which will aggregate many output lines before flushing them to the log file. Often the output file will only be written after the job completes. If you wish to monitor the progress of your submitted job as it runs, consider running an [[#Interactive_jobs|interactive job]]
Sometimes a submitted job writes no output to the log file for an extended period of time, looking like it is hanging. A common reason for this is the aggressive [[#Output_buffering|buffering]] performed by the Slurm scheduler, which will aggregate many output lines before flushing them to the log file. Often the output file will only be written after the job completes; and if the job runs out of time, part of the output may be lost. If you wish to monitor the progress of your submitted job as it runs, consider running an [[#Interactive_jobs|interactive job]]. This is also a good way to find how much time your job needs.
 
<!--T:171-->
Another option is to redirect output to a separate file. For example, in your submit file you may run your, e.g. python, job as <code>python myscript.py > mylog.txt</code>. If you wish for the output to also be present in the Slurm log, you may also use the <code>tee</code> command, as follows: <code>python myscript.py | tee mylog.txt</code>.


== Job status and priority == <!--T:103-->
== Job status and priority == <!--T:103-->
cc_staff
353

edits

Navigation menu