[MITgcm-support] For pgf77, is there already a way to line-buffer the STDOUT and STDERR files?
Yantosca, Robert M.
yantosca at seas.harvard.edu
Fri Jan 22 15:51:14 EST 2016
Hi -
I am a new user of MITgcm. I was able to build it on the Harvard Odyssey cluster based on the tools/build_options/linux_amd64_pgf77 settings and OpenMPI.
With the pgfortran compiler, the MITgcm compiles "out-of-the-box" and runs. But because pgfortran fully-buffers all disk files by default, the STDOUT.nnnn and STDERR.nnnn files are not flushed to disk while MITgcm is running. This makes it difficult to check the progress of the run.
The pgf77 compiler manual says that you can change the buffering options by calling the SETVBUF3F to manually set the buffering options. For example,
INTEGER, EXTERNAL :: SETVBUF3F
. . .
RC = SETVBUF3F( 6, 1, 16000 )
will make stdout (unit #6) line buffered with a buffer size of 16K. (I use this setting on another model and it works fine.) Then you can redirect stdout to a log file and it will be refreshed during a run.
My questions:
(1) Does anyone know if there is a pgfortran compiler switch that would globally reset the file-buffering options? Then I wouldn't have to rely on SETVBUF3F.
(2) Failing that, in which routine are the STDOUT.nnnn and STDERR.nnnn files opened? I could try to put calls to SETVBUF3F in those routines right when those files are opened to make them line-buffered.
Thanks a bunch!
Best,
Bob Y.
--
Bob Yantosca
Senior Software Engineer
GEOS-Chem Support Team
http://wiki.geos-chem.org/GEOS-Chem_Support_Team
Group email: geos-chem-support at as.harvard.edu<mailto:geos-chem-support at as.harvard.edu>
Individual email: yantosca at seas.harvard.edu<mailto:yantosca at seas.harvard.edu>
(617) 496-9424
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20160122/ac2f3c0d/attachment-0001.htm>
More information about the MITgcm-support
mailing list