Hi Denis,
export GFORTRAN_UNFORMATTED_BUFFER_SIZE=10000
export GFORTRAN_FORMATTED_BUFFER_SIZE=10000
export GFORTRAN_UNBUFFERED_ALL=n
From the output log indeed i got the correct env. variable as i set:
GFORTRAN_FORMATTED_BUFFER_SIZE=10000
But from strace output i got always
write(3,
"\0\0\0\0\0\0\10@\0\0\0\340\314\314\10@\0\0\0\240\231\231\t@\0\0\0`ff\n@"...,
8192) = 8192
write(3,
"\0\0\0@33\v@\0\0\0\0\0\0\f@\0\0\0\340\314\314\f@\0\0\0\240\231\231\r@"...,
8192) = 8192
write(3, "\0\0\0`ff\16@\0\0\0@33\17@\0\0\0\0\0\0\20@\0\0\0`ff\20@"..., 8192) =
8192
write(3,
"\0\0\0\340\314\314\20@\0\0\0@33\21@\0\0\0\240\231\231\21@\0\0\0\0\0\0\22@"...,
8192) = 8192
write(3,
"\0\0\0`ff\22@\0\0\0\340\314\314\22@\0\0\0@33\23@\0\0\0\240\231\231\23@"...,
8192) = 8192
write(3, "\0\0\0\0\0\0\24@\0\0\0`ff\24@\0\0\0\340\314\314\24@\0\0\0@33\25@"...,
8192) = 8192
.....
Showing the fixed that still a 8kiB buffer size is effectively ude in I/O...
did you ever think of trying other values than 10000?
On my Linux laptop, buffering is done in multiples of 2k.
If I set GFORTRAN_UNFORMATTED_BUFFER_SIZE=14000, I get writes in
sizes of 12288. Which is likely more efficient than asking for
exactly 14000.
Cheers,
Harald