[mpich-discuss] Output files not truncated?

Joseph Schuchart schuchart at hlrs.de
Wed Jan 10 22:03:16 CST 2018


All,

While debugging my application using good ol' printf and redirecting 
stderr and stdout to files using --outfile-pattern/--errfile-pattern, I 
realized that MPICH does not truncate output files if they already 
exist. This caused quite a bit of confusion on my side as the 
interesting information was located at the end of the application's 
output and I repeatedly found stale data before realizing that the files 
are not truncated.

Is this behavior intended?

How to reproduce:

$ cat /proc/cpuinfo > test.log
$ mpirun --outfile-pattern test.log -n 1 hostname

Expected (from me at least): the file (only) contains the output of 
`hostname`.
Result: the file contains the output of `hostname` followed by the 
remaining content of /proc/cpuinfo.

Cheers,
Joseph
-- 
Dipl.-Inf. Joseph Schuchart
High Performance Computing Center Stuttgart (HLRS)
Nobelstr. 19
D-70569 Stuttgart

Tel.: +49(0)711-68565890
Fax: +49(0)711-6856832
E-Mail: schuchart at hlrs.de
_______________________________________________
discuss mailing list     discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss


More information about the discuss mailing list