C $Id: gsum.F,v 1.2 2006/05/12 22:23:10 ce107 Exp $ SUBROUTINE GSUM_R8( ans, phi ) #include "EEPARAMS.h" #ifdef ALLOW_MPI #include "mpif.h" #include "MPI_INFO.h" #endif #ifdef USE_MIXED_PRECISION REAL*8 ans REAL*8 phi #else Real ans Real phi #endif INTEGER RC ans = phi #ifdef USE_MPI_GSUM #ifdef USE_MIXED_PRECISION CALL MPI_Allreduce( phi, & ans, & 1, & MPI_REAL8, & MPI_SUM, & comm_use, & rc & ) #else CALL MPI_Allreduce( phi, & ans, & 1, & _MPI_TYPE_REAL, & MPI_SUM, & comm_use, & rc & ) #endif #endif #ifdef USE_JAM_GSUM C JAM global sum CALL JAM_barrier_start( phi ) CALL JAM_barrier_done( ans ) #endif C WRITE(6,*) ' phi = ', phi, ' Sum = ', ans C CALL MPI_Finalize( rc ) C STOP RETURN END