Block at the call to ccm_barrier until all tasks reach that point. Optionally, wait a given number of seconds and flush IO, (on machines that support flushing IO.)
Not all systems support flushing IO in Fortran. On such systems io_flush is ignored. The wait time is approximate.
|
[ccm_host:~/ccm/source]% ccm_bcast_x1
start at 2002 05 10 14:12:44.487
pause for 5 seconds
done at 2002 05 10 14:12:49.499
my id= 0
done
my id= 3
my id= 2
my id= 1
[ccm_host:~/ccm/source] %
The call to ccm_init initializes the communication package. The time is them obtained and ccm_barrier is called to pause for 5 seconds. Ccm_barrier is called with io_flush=true. Then myid is printed and Ccm_barrier is again called to flush data. On systems that support flushing IO, the output from "write(*,*)" my id= ",myid" would occur before the output of "done" as: my id= 0 my id= 3 my id= 2 my id= 1 done |