# Outputting to console / SLURM log files in real time

**URL:** https://discourse.julialang.org/t/outputting-to-console-slurm-log-files-in-real-time/10436
**Category:** General Usage
**Created:** [April 19, 2018, 3:07pm UTC](https://discourse.julialang.org/t/outputting-to-console-slurm-log-files-in-real-time/10436 "2018-04-19T15:07:17Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![nickeubank](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nickeubank/32/3878_2.png) [@nickeubank](https://discourse.julialang.org/u/nickeubank)
#### Post date: [April 19, 2018, 3:07pm UTC](https://discourse.julialang.org/t/outputting-to-console-slurm-log-files-in-real-time/10436/1 "2018-04-19T15:07:17Z")

</div>

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…)

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [April 19, 2018, 3:13pm UTC](https://discourse.julialang.org/t/outputting-to-console-slurm-log-files-in-real-time/10436/2 "2018-04-19T15:13:47Z")

</div>

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

Perhaps try [How to change how frequently SLURM updates the output file (stdout)? - Stack Overflow](https://stackoverflow.com/questions/25170763/how-to-change-how-frequently-slurm-updates-the-output-file-stdout/25189364#25189364) or `flush(stdout)` in your program.

---

<div class="post-metadata">

### Author: ![nickeubank](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nickeubank/32/3878_2.png) [@nickeubank](https://discourse.julialang.org/u/nickeubank)
#### Post date: [April 19, 2018, 3:55pm UTC](https://discourse.julialang.org/t/outputting-to-console-slurm-log-files-in-real-time/10436/3 "2018-04-19T15:55:57Z")

</div>

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

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [April 19, 2018, 4:15pm UTC](https://discourse.julialang.org/t/outputting-to-console-slurm-log-files-in-real-time/10436/4 "2018-04-19T16:15:59Z")

</div>

Sorry, on 0.7 it is `flush(stdout)` 🙂
