Newsgroups: comp.parallel.mpi
From: "David P. Rideout" <dprideou@mailbox.syr.edu>
Subject: coherent output from many processes in FORTRAN 90
Organization: Syracuse University, Syracuse NY, USA
Date: Wed, 31 Jan 1996 18:29:05 -0500
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Message-ID: <Pine.SOL.3.91.960131180829.24833A-100000@gamera.syr.edu>

I am running a parallel FORTRAN 90 program with MPI.  I currently have 
each node write to standard output a large amount of data, which is 
displayed on my screen in a random order.  I would like to organize this 
output into a logical order.  I would rather not send all the data to one 
process and print from there, as this would involve some large messages.  
I have tried something like the following

call MPI_BARRIER
if (rank==0) print data
call flush (?)
call MPI_BARRIER
if (rank==1) print data
call flush
call MPI_BARRIER
if (rank==2) print data
...

The 'call flush' is meant to flush the output buffer (as would 
'fflush(NULL);' in C), but I don't know how to do it.  Without the 'call 
flush''s, the output is not in order.

Is this just an issue of learning how to do this C command in fortran 
90,  (I have looked in many references and have not been able to find it.)
or is there some way to do this directly in MPI? (without sending all the 
data to one process)

Thanks very much,
David Rideout
rideout@npac.syr.edu

