Quantcast
Channel: Intel® Software - Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2746

Delayed buffered file io

$
0
0

Hi everybody,

I have a time-domain simulator written in Fortran 2003. I have some observables that are written into a file with the purpose of post-prossesing. The software is 2-4 times faster when not saving these outputs.

I want to delay as much as possible the writting of the values to the output file (if possible after the simulation is over). The reason is that during the simulation, there is an automatic procedure which decides if the simulation is stable (thus, no post-processing needed) and exits immediatly (with a STOP). So if the case is stable, I would save a lot of time.

The outline of the code is:

open(newunit=output_file,file=filenm,form='unformatted',buffered='yes',status='replace',buffercount=127,BLOCKSIZE=4194304)
do while (.not. end_simul)
  t=t+h
  call solve(t,end_simul)
  call check_early_stop(iExit)
  if(iExit)STOP 'Early exit'  do i=1,number_of_outputs
    if(selected(i))write(output_file)output_value(i)
  enddo
enddo
close(unit=output_file)

RAM memory is not an issue since the program uses less than 1GB of ram while the computer has more than 64GB. I run on a Interlagos Opteron 32-cores. I used the buffercount and blocksize to try and increase the buffer so that it fits all the file and the writting is delayed. I saw very little difference.

All outputs are double precission.

I use "Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.1.0.146 Build 20130121". I'm running Debian Wheezy (6).

Any help on how to speed up the writting or delay it is welcome!

Thanks in advance,

Petros


Viewing all articles
Browse latest Browse all 2746

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>