Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

writing to disk

jvandeven
New Contributor I
899 Views

I use read and write statements to save output from my applications to local hard-drives.  Some of the files involved are 25GB, and the write statements for these understandably take a fair bit of time to execute.  I have noticed, however, that if I copy and paste the resulting files to alternatives folders on the disk thourgh windows explorer, then the copies are created in a fraction of the time that the "write" commands take to complete.  Is there some way to speed up writing to the disk through Fortran?

Many thanks,

Justin.

0 Kudos
4 Replies
andrew_4619
Honored Contributor III
899 Views

Do have a very large number if files in the folder where you are writing? I have experiance of that slowing things down.

0 Kudos
jvandeven
New Contributor I
899 Views

No - the largest files are written into folders that contain just one or two other files.  

0 Kudos
ZlamalJakub
New Contributor III
899 Views

I hope enabling I/O Buffering speeds up write statements.  (/assume:buffered_io)

0 Kudos
jimdempseyatthecove
Honored Contributor III
899 Views

Buffering is one issue. The other issue is if you are using formatted writes, then the time to format (convert from binary to text) is significant. This formatting overhead will not be observed during file copy. If reducing this time to write has significant value, then consider adding code that perform the formatting for output using internal writes in a parallel manner, and then having a serial thread writing the preformatted text to the output file. A competent (parallel programmng) programmer should be able to add this feature for you. Without seeing the code, it would be hard to ascertain the degree of difficulty in doing this.

Note, Copy and Past operation may employ a background file copy operation. Meaning you have the appearance of copy complete. When your paste appears to complete how long does it take for your disk led to stop blinking?

Jim Dempsey

0 Kudos
Reply