Thanks for the reply, Dave.
It’s not about MAKE, it is about any executable, produced by PGI compilers.
I have a fortran code that outputs some messages on the screen like
print *,‘calculating big A matrix’
!.. actual calculation of A, takes some time
print *,‘calculating big B matrix’
!.. actulal calculation of B, takes some time
So, if I compile the code with pgf90 and run it
then it immediately produces the message “calculating big A matrix”, as expected. Once matrix A is calculated, it immediately produces message “calculating big B matrix”, etc.
Now, if I start
(./executable >& output.txt) &
(redirecting the output of the same executable to the file output.txt), then the file output.txt contains (initially) nothing, even though it should already have contained “calculating big A matrix”. The message will only appear later on, when (as I understand it) enough messages will be accumulated to be written to output.txt.
Of course, once the code is finished output.txt will contain all the messages (because, probably, the buffer is flushed at the end).
However, there is always a delay in writing the messages to the file (compared to the screen output). There is NO delay in the performance. Only in outputing the messages.
The system I have:
Suse Linux 9.2 64bit running on an dual-CPU Opteron 250
As I mentioned I am using PGF90.
If I am compiling the same code with other compilers, there is no delay in the output and the output.txt contains “up-to-date” info all the time.