scratch file in memory


is there any solution how to simply hold fortran scratch file in memory?

I am trying to rewrite very old fortran77 code which massively use SCRATCH file for intermediate data storage on the disk (or tape…:)).


Hi Michal,

If the files are relatively small, the OS is most likely keeping a cached copy in memory and only occasionally flushing to the disk.

If you think you do need to rewrite the code, then I would use a large allocatable character array to store the scratch information. Then you can use internal reads and writes to the array instead of the file.

Hope this helps,