]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
particular approach to MPI_Attr_get() with MPICH2
authoreap <eap@opencascade.com>
Tue, 11 Nov 2008 15:37:48 +0000 (15:37 +0000)
committereap <eap@opencascade.com>
Tue, 11 Nov 2008 15:37:48 +0000 (15:37 +0000)
src/ParaMEDMEM/MPI_Access.cxx

index 35f703ca82bfc7954c2e3a07a1f0cbfa3aed416c..c14d3787d79fcd4450c412d2694421b718bfc137 100644 (file)
@@ -62,7 +62,13 @@ MPI_Access::MPI_Access(MPIProcessorGroup * ProcessorGroup, int BaseTag, int MaxT
   int flag ;
 //MPI_Attr_get does not run with _IntraCommunicator ???
   //MPI_Attr_get(*_IntraCommunicator,MPI_TAG_UB,&mpitagub,&flag) ;
+#ifdef MPICH2
+  void *v;
+  MPI_Attr_get( MPI_COMM_WORLD, MPI_TAG_UB, &v, &flag );
+  mpitagub = *(int*)v;
+#else  
   MPI_Attr_get(MPI_COMM_WORLD,MPI_TAG_UB,&mpitagub,&flag) ;
+#endif
   if ( BaseTag != 0 ) {
     BaseTag = (BaseTag/ModuloTag)*ModuloTag ;
   }