Global Communication
The ALL-to-ALL communication test :
C every processor sends message to every other processor
C then every processor receives messages directed to it.
CALL mpi_alltoall (A, iw, MPI_DOUBLE_PRECISION,
B, iw, MPI_DOUBLE_PRECISION,
Tn = (T1-T0)/(NREPT*NP*(NP-1)) ! NP processes send NP-1 messages
CALL shmem_barrier_all ()
other = MOD (my_rank+j, NP)
CALL shmem_put8(B(1+iw*my_rank), A(1+iw*other), iw, other)
Tn = (T1-T0)/(NREPT*NP*(NP-1)) ! NP processes send NP-1 messages