From 798a0db4ba65f8b4ed31f32751148cf2af6e4b5b Mon Sep 17 00:00:00 2001 From: cvw Date: Thu, 22 Mar 2012 10:05:16 +0000 Subject: [PATCH] *** empty log message *** --- src/MEDPartitioner/Test/MEDPARTITIONERTest.cxx | 9 +++++++++ src/MEDPartitioner/Test/MEDPARTITIONERTestPara.cxx | 4 ---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/MEDPartitioner/Test/MEDPARTITIONERTest.cxx b/src/MEDPartitioner/Test/MEDPARTITIONERTest.cxx index cbd0f63d9..cce72b8f3 100644 --- a/src/MEDPartitioner/Test/MEDPARTITIONERTest.cxx +++ b/src/MEDPartitioner/Test/MEDPARTITIONERTest.cxx @@ -89,6 +89,15 @@ void MEDPARTITIONERTest::setbigSize() void MEDPARTITIONERTest::setUp() { this->_verbose=0; +#if defined(HAVE_MPI2) + MPI_Init(0,0) + MPI_Comm_size(MPI_COMM_WORLD, &MyGlobals::_World_Size); + MPI_Comm_rank(MPI_COMM_WORLD, &MyGlobals::_Rank); +#else + //sequential : no MPI + MyGlobals::_World_Size=1; + MyGlobals::_Rank=0; +#endif } // ============================================================================ diff --git a/src/MEDPartitioner/Test/MEDPARTITIONERTestPara.cxx b/src/MEDPartitioner/Test/MEDPARTITIONERTestPara.cxx index 75b1d688e..f7ff89290 100644 --- a/src/MEDPartitioner/Test/MEDPARTITIONERTestPara.cxx +++ b/src/MEDPartitioner/Test/MEDPARTITIONERTestPara.cxx @@ -71,10 +71,6 @@ void MEDPARTITIONERTest::verifyMedpartitionerOnSmallSizeForMesh() CPPUNIT_ASSERT_EQUAL(0, res); input=targetName+".xml"; - MPI_Init(0,0); - MPI_Comm_size(MPI_COMM_WORLD, &MyGlobals::_World_Size); - MPI_Comm_rank(MPI_COMM_WORLD, &MyGlobals::_Rank); - MEDPARTITIONER::ParaDomainSelector parallelizer(false); MEDPARTITIONER::MeshCollection collection(input,parallelizer); CPPUNIT_ASSERT_EQUAL(3, collection.getMeshDimension()); -- 2.39.2