# Empty output file when using Julia with the PBS system

**URL:** <https://discourse.julialang.org/t/empty-output-file-when-using-julia-with-the-pbs-system/7078>\
**Category:** General Usage\
**Tags:** cluster\
**Created:** [November 15, 2017, 12:58am UTC](https://discourse.julialang.org/t/empty-output-file-when-using-julia-with-the-pbs-system/7078 "2017-11-15T00:58:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![111](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/111/32/33971_2.png) [@111](https://discourse.julialang.org/u/111)\
**Post date:** [November 15, 2017, 12:58am UTC](https://discourse.julialang.org/t/empty-output-file-when-using-julia-with-the-pbs-system/7078/1 "2017-11-15T00:58:02Z")

</div>

I wrote a code, and ran it in a cluster. The PBS system is used in this cluster. In my code, i use this sentence to record how much has been done

```julia
@printf "calculated %.2f%% \t" 100*i/nt; println(now())

```

In the PBS script, there are two lines

```julia
#PBS -o pbsoutput
#PBS -e pbserr
$exe --procs auto --check-bounds=no --depwarn=no --math-mode=fast -O3 tdse.jl 1>>output 2>>err

```

When the code was running, however, pbsoutput or pbserr were not created, and the output and err file were empty. Is that a PBS issue or a Julia issue?

---

<div class="post-metadata">

**Author:** ![John\_Hearns](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/john_hearns/32/1685_2.png) [@John\_Hearns](https://discourse.julialang.org/u/John_Hearns)\
**Post date:** [November 15, 2017, 11:28am UTC](https://discourse.julialang.org/t/empty-output-file-when-using-julia-with-the-pbs-system/7078/2 "2017-11-15T11:28:46Z")

</div>

@111 That will be a PBS issue.  
I manage a PBSpro cluster at the moment, and have worked with Slurm and SGE.

What happens is that the output and error files are created in a spool direcotry under $PBS\_MOM on the compute node which is running the job - on a multi-node job this is done by the Mother Superior - ie the Mom on the first node.  
At the end of the job the files are transferred back to the submitting host usign scp.  
Actually, if there is a shared filesystem you can define that this is not necessary and a cp is done.

So the short answer is that you see these files at the end of the job.  
If you Google for ‘job peeking’ there are ways to allow users to look at these files when a job is running.

---

<div class="post-metadata">

**Author:** ![111](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/111/32/33971_2.png) [@111](https://discourse.julialang.org/u/111)\
**Post date:** [November 15, 2017, 12:13pm UTC](https://discourse.julialang.org/t/empty-output-file-when-using-julia-with-the-pbs-system/7078/3 "2017-11-15T12:13:00Z")

</div>

I add a line in my julia code

```julia
flush(STDOUT)

```

and everything works fine.
