Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29385 Discussions

Is there a rule of thumb for giving a value to BUFFERCOUNT in I/O statements?

OP1
New Contributor III
800 Views

My code reads multiple, really large files (say, about 2 or 3 GB each). Is there a rule of thumb to determine how many IO buffers (in my READ statements)I should use for the best performance? I don't know in advance how big the files are - they may be much smaller than 2GBat times. I suppose I should use a value of BUFFERCOUNT which depends on the size of my files.

Where can I find somedocumentation regarding this?

Thanks,

Olivier

0 Kudos
1 Reply
Steven_L_Intel1
Employee
800 Views
There isn't any written recommendation as it is very much application dependent. You'll have to experiment. Overestimating is not likely to be too harmful, other than the memory used for the buffer. I suggest reading the documentation section Optimizing Applications > Programming Guidelines > Improving I/O Performance

Depending on how your application is constructed, you may also want to look at the Fortran 2003 asynchronous I/O feature.
0 Kudos
Reply