From f3b4ffa03ffc7989a6c453a4d12e0aa64a788204 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 11 Nov 2008 15:37:48 +0000 Subject: [PATCH] particular approach to MPI_Attr_get() with MPICH2 --- src/ParaMEDMEM/MPI_Access.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ParaMEDMEM/MPI_Access.cxx b/src/ParaMEDMEM/MPI_Access.cxx index 35f703ca8..c14d3787d 100644 --- a/src/ParaMEDMEM/MPI_Access.cxx +++ b/src/ParaMEDMEM/MPI_Access.cxx @@ -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 ; } -- 2.39.2