How do I flush output to file after each write with a gfortran Fortran 90 program?

前端 未结 4 1192
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-04 17:31

I am running a loop in a Fortran 90 program that outputs numerical values to an output file for each iteration of the loop. The problem is that the output is not saved to th

4条回答
  •  渐次进展
    2021-01-04 18:22

    You need to make the output unbuffered. Try setting the GFORTRAN_UNBUFFERED_ALL environment variable to 'y', 'Y' or 1.

提交回复
热议问题