Outputting to console / SLURM log files in real time


#1

I’m running julia scripts on a SLURM server in batch mode (julia my_script.jl). SLURM creates output files with the output that julia is sending to the console, but I’m finding that while warnings are output in real time, print statements I add (just so I can keep track of progress and keep an eye on what steps are taking most time) don’t get output till the script finishes.

Is there a way to get print statements to output faster?

(Sorry, I know this might be a SLURM issue, but given warnings are output in real time, I think it’s a julia thing…)


#2

Warnings are printed to stderr while print statements are printed to stdout.

Perhaps try https://stackoverflow.com/questions/25170763/how-to-change-how-frequently-slurm-updates-the-output-file-stdout/25189364#25189364 or flush(stdout) in your program.


#3

perfect, thanks! (though for future readers: it’s flush(STDOUT), not flush(stdout)


#4

Sorry, on 0.7 it is flush(stdout) :slight_smile: