/[MITgcm]/MITgcm_contrib/cg2d_bench/gsum.F
ViewVC logotype

Diff of /MITgcm_contrib/cg2d_bench/gsum.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

--- MITgcm_contrib/cg2d_bench/gsum.F	2006/05/12 21:58:05	1.1
+++ MITgcm_contrib/cg2d_bench/gsum.F	2006/05/12 22:23:10	1.2
@@ -1,26 +1,45 @@
+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
 
-      Real*8 ans
-      Real*8 phi
+#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,
-     &                    MPI_COMM_WORLD,
+     &                    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

 

  ViewVC Help
Powered by ViewVC 1.1.22