I am running the 64 bit version of ifort on Ubuntu 12.04 (actually a virtual machine hosted on OS X).
I notice that the limiting step in my code is output, specifically writing a sequence of integers to a text file. Writing ~400,000 integers to a ~6 MB text file takes 3 minutes.
I tried reproducing the problem with the simple code below:
program test implicit none integer (8) j, s1, s2, c open(12,file='test.out',status='replace') call system_clock(s1) do j=1,100000 write(12,*) j end do call system_clock(s2,c) close(12) write(6,*) dble(s2-s1)/dble(c) end program test
The above takes a little under 20 seconds. If I use write(6,*) and print to the terminal it takes 2 seconds. If I compile using gfortran (writing to a file) it takes 0.1 seconds.
So it seems that this is specifically about ifort and specifically writing to text files as opposed to the terminal. It doesn't matter if I use a different extension (.txt instead of .out, say) for the output file, nor if I set the status to 'new' instead of 'replace' in the open command.
Thanks in advance for any help you may have on this issue.