Salome HOME
changes for mpi compilation bsr/medmpi2
authorBernard Sécher <bernard.secher@cea.fr>
Mon, 9 Feb 2015 09:50:28 +0000 (10:50 +0100)
committerBernard Sécher <bernard.secher@cea.fr>
Mon, 9 Feb 2015 10:01:28 +0000 (11:01 +0100)
CMakeLists.txt
src/MEDPartitioner/MEDPARTITIONER_MeshCollection.cxx
src/MEDPartitioner/MEDPARTITIONER_ParaDomainSelector.cxx
src/MEDPartitioner/MEDPARTITIONER_ParallelTopology.cxx
src/MEDPartitioner/MEDPARTITIONER_Utils.hxx
src/MEDPartitioner/MEDPARTITIONER_UtilsPara.cxx
src/MEDPartitioner/Test/MEDPARTITIONERTest.cxx
src/MEDPartitioner/Test/MEDPARTITIONERTest.hxx
src/MEDPartitioner/Test/MEDPARTITIONERTestPara.cxx
src/MEDPartitioner/medpartitioner_para.cxx
src/RENUMBER/CMakeLists.txt

index c9c6c58a9988d2dce62c0ec4d238a8a056050f2d..b2087b90c7b945e96f78abc523caee5915808e80 100644 (file)
@@ -83,7 +83,7 @@ CMAKE_DEPENDENT_OPTION(SALOME_BUILD_GUI "Build GUI of MED." ON
                        "NOT SALOME_MED_STANDALONE" OFF)
 OPTION(SALOME_BUILD_TESTS "Build MED tests." ON)
 OPTION(SALOME_BUILD_DOC "Build MED doc." ON)
-CMAKE_DEPENDENT_OPTION(SALOME_MED_PARTITIONER_METIS "Enable metis graph library in MEDPartitioner." ON "SALOME_MED_ENABLE_PARTITIONER;NOT SALOME_USE_MPI" OFF)
+CMAKE_DEPENDENT_OPTION(SALOME_MED_PARTITIONER_METIS "Enable metis graph library in MEDPartitioner." ON "SALOME_MED_ENABLE_PARTITIONER" OFF)
 CMAKE_DEPENDENT_OPTION(SALOME_MED_PARTITIONER_SCOTCH "Enable scotch graph library in MEDPartitioner." ON "SALOME_MED_ENABLE_PARTITIONER;NOT SALOME_USE_MPI" OFF)
 CMAKE_DEPENDENT_OPTION(SALOME_MED_PARTITIONER_PARMETIS "Enable parmetis graph library in MEDPartitioner." ON "SALOME_MED_ENABLE_PARTITIONER;SALOME_USE_MPI" OFF)
 IF(WIN32)
@@ -168,7 +168,7 @@ ENDIF(SALOME_BUILD_TESTS)
 
 IF(SALOME_USE_MPI)
   FIND_PACKAGE(SalomeMPI REQUIRED)
-  ADD_DEFINITIONS("-DHAVE_MPI2")
+  ADD_DEFINITIONS("-DHAVE_MPI")
   IF(SALOME_MED_PARTITIONER_PARMETIS)
     FIND_PACKAGE(SalomeParMetis)
     SALOME_LOG_OPTIONAL_PACKAGE(ParMetis SALOME_MED_PARTITIONER_PARMETIS)
index 6307ebd430c8a79d0b4952467aeed09eb9911692..c298d68f29342a9245383cd7bbd7d6933d8b56d5 100644 (file)
@@ -25,7 +25,7 @@
 #include "MEDPARTITIONER_Topology.hxx"
 #include "MEDPARTITIONER_ParallelTopology.hxx"
 
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
 #include "MEDPARTITIONER_JointFinder.hxx"
 #endif
 
@@ -43,7 +43,7 @@
 
 #include "MEDCouplingAutoRefCountObjectPtr.hxx"
 
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
 #include <mpi.h>
 #endif
 
@@ -115,7 +115,7 @@ MEDPARTITIONER::MeshCollection::MeshCollection(MeshCollection& initialCollection
   //treating faces
   /////////////////
 
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   if (MyGlobals::_Verbose>0 && MyGlobals::_World_Size>1)
     MPI_Barrier(MPI_COMM_WORLD); //synchronize verbose messages
 #endif
@@ -131,7 +131,7 @@ MEDPARTITIONER::MeshCollection::MeshCollection(MeshCollection& initialCollection
   ////////////////////
   //treating families
   ////////////////////
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   if (MyGlobals::_Verbose>0 && MyGlobals::_World_Size>1)
     MPI_Barrier(MPI_COMM_WORLD); //synchronize verbose messages
 #endif
@@ -155,7 +155,7 @@ MEDPARTITIONER::MeshCollection::MeshCollection(MeshCollection& initialCollection
                "faceFamily");
 
   //treating groups
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   if (MyGlobals::_Verbose>0 && MyGlobals::_World_Size>1)
     MPI_Barrier(MPI_COMM_WORLD); //synchronize verbose messages
 #endif
@@ -164,7 +164,7 @@ MEDPARTITIONER::MeshCollection::MeshCollection(MeshCollection& initialCollection
   _family_info=initialCollection.getFamilyInfo();
   _group_info=initialCollection.getGroupInfo();
   
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   if (MyGlobals::_Verbose>0 && MyGlobals::_World_Size>1)
     MPI_Barrier(MPI_COMM_WORLD); //synchronize verbose messages
 #endif
@@ -240,7 +240,7 @@ void MEDPARTITIONER::MeshCollection::castCellMeshes(MeshCollection& initialColle
             }
         }
     }
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   if (isParallelMode())
     {
       //if (MyGlobals::_Verbose>300) std::cout<<"proc "<<rank<<" : castCellMeshes send/receive"<<std::endl;
@@ -335,7 +335,7 @@ void MEDPARTITIONER::MeshCollection::createNodeMapping( MeshCollection& initialC
 
       for (int inew=0; inew<_topology->nbDomain(); inew++)
         {
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
           //sending meshes for parallel computation
           if (isParallelMode() && _domain_selector->isMyDomain(inew) && !_domain_selector->isMyDomain(iold))  
             _domain_selector->sendMesh(*(getMesh(inew)), _domain_selector->getProcessorID(iold));
@@ -538,7 +538,7 @@ void MEDPARTITIONER::MeshCollection::castFaceMeshes(MeshCollection& initialColle
         }
     }
 
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   //send/receive stuff
   if (isParallelMode())
     {
@@ -643,7 +643,7 @@ void MEDPARTITIONER::MeshCollection::castIntField(std::vector<ParaMEDMEM::MEDCou
         sourceCoords->decrRef();
       }
   // send-recv operations
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   for (int inew=0; inew<inewMax; inew++)
     {
       for (int iold=0; iold<ioldMax; iold++)
@@ -806,7 +806,7 @@ void MEDPARTITIONER::MeshCollection::castAllFields(MeshCollection& initialCollec
       std::string descriptionField=initialCollection.getFieldDescriptions()[ifield];
       if (descriptionField.find(nameTo)==std::string::npos)
         continue; //only nameTo accepted in Fields name description
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
       for (int inew=0; inew<inewMax; inew++)
         {
           for (int iold=0; iold<ioldMax; iold++)
@@ -980,7 +980,7 @@ void MEDPARTITIONER::MeshCollection::buildConnectZones()
           bool mesh1Here = true, mesh2Here = true;
           if (isParallelMode())
             {
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
               mesh1Here = _domain_selector->isMyDomain(inew1);
               mesh2Here = _domain_selector->isMyDomain(inew2);
               if ( !mesh1Here && mesh2Here )
@@ -1036,7 +1036,7 @@ void MEDPARTITIONER::MeshCollection::buildConnectZones()
 
           if ( isParallelMode())
             {
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
               if ( mesh1Here && !mesh2Here )
                 {
                   //send faces2 to domain of recvMesh
@@ -1286,7 +1286,7 @@ MEDPARTITIONER::MeshCollection::MeshCollection(const std::string& filename, Para
               f<<xml;
               f.close();
             }
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
            if (MyGlobals::_World_Size>1)
              MPI_Barrier(MPI_COMM_WORLD); //wait for creation of nameFileXml
 #endif
@@ -1326,7 +1326,7 @@ MEDPARTITIONER::MeshCollection::MeshCollection(const std::string& filename, Para
   try
     {
       //check for all proc/file compatibility of _field_descriptions
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
       _field_descriptions=AllgathervVectorOfString(MyGlobals::_Field_Descriptions);
 #else
       _field_descriptions=MyGlobals::_Field_Descriptions;
@@ -1337,7 +1337,7 @@ MEDPARTITIONER::MeshCollection::MeshCollection(const std::string& filename, Para
       std::cerr << "proc " << MyGlobals::_Rank << " : INTERP_KERNEL_Exception : " << e.what() << std::endl;
       throw INTERP_KERNEL::Exception("Something wrong verifying coherency of files med ands fields");
     }
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   try
     {
       //check for all proc/file compatibility of _family_info
@@ -1424,7 +1424,7 @@ MEDPARTITIONER::MeshCollection::~MeshCollection()
   delete _driver;
   if (_topology!=0 && _owns_topology)
     delete _topology;
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   delete _joint_finder;
 #endif
 }
@@ -1703,7 +1703,7 @@ void MEDPARTITIONER::MeshCollection::buildParallelCellGraph(MEDPARTITIONER::SkyL
 
   std::vector<std::vector<std::multimap<int,int> > > commonDistantNodes;
   int nbdomain=_topology->nbDomain();
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   if (isParallelMode())
     {
       _joint_finder=new JointFinder(*this);
@@ -1745,7 +1745,7 @@ void MEDPARTITIONER::MeshCollection::buildParallelCellGraph(MEDPARTITIONER::SkyL
         }
       revConn->decrRef();
       index->decrRef();
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
       for (int iother=0; iother<nbdomain; iother++)
         {
           std::multimap<int,int>::iterator it;
index e6beacf192a2575f0d9b1a9433598a912e0943e6..0076dbaaff9e913267ab2e6efa95b1eaaf7c2db0 100644 (file)
@@ -26,7 +26,7 @@
 #include <iostream>
 #include <numeric>
 
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
 #include <mpi.h>
 #endif
 
@@ -37,7 +37,7 @@ MEDPARTITIONER::ParaDomainSelector::ParaDomainSelector(bool mesure_memory)
   :_rank(0),_world_size(1), _nb_result_domains(-1), _init_time(0.0),
    _mesure_memory(mesure_memory), _init_memory(0), _max_memory(0)
 {
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   if (MyGlobals::_Rank==-1)
     {
       MPI_Init(0,0);  //do once only
@@ -76,7 +76,7 @@ bool MEDPARTITIONER::ParaDomainSelector::isOnDifferentHosts() const
   evaluateMemory();
   if ( _world_size < 2 ) return false;
 
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   char name_here[ MPI_MAX_PROCESSOR_NAME+1 ], name_there[ MPI_MAX_PROCESSOR_NAME+1 ];
   int size;
   MPI_Get_processor_name( name_here, &size);
@@ -152,11 +152,11 @@ void MEDPARTITIONER::ParaDomainSelector::gatherNbOf(const std::vector<ParaMEDMEM
     }
   else
     {
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
       all_nb_elems.resize( nb_domains*2 );
       MPI_Allreduce((void*)&nb_elems[0], (void*)&all_nb_elems[0], nb_domains*2, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
 #else
-      throw INTERP_KERNEL::Exception("not(HAVE_MPI2) incompatible with MPI_World_Size>1");
+      throw INTERP_KERNEL::Exception("not(HAVE_MPI) incompatible with MPI_World_Size>1");
 #endif
    }
   int total_nb_cells=0, total_nb_nodes=0;
@@ -289,7 +289,7 @@ std::auto_ptr<MEDPARTITIONER::Graph> MEDPARTITIONER::ParaDomainSelector::gatherG
   Graph* glob_graph = 0;
 
   evaluateMemory();
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
 
   // ---------------
   // Gather indices
@@ -379,7 +379,7 @@ std::auto_ptr<MEDPARTITIONER::Graph> MEDPARTITIONER::ParaDomainSelector::gatherG
 
   delete [] partition;
 
-#endif // HAVE_MPI2
+#endif // HAVE_MPI
 
   return std::auto_ptr<Graph>( glob_graph );
 }
@@ -430,7 +430,7 @@ void MEDPARTITIONER::ParaDomainSelector::gatherNbCellPairs()
   evaluateMemory();
 
   std::vector< int > send_buf = _nb_cell_pairs_by_joint;
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   MPI_Allreduce((void*)&send_buf[0],
                 (void*)&_nb_cell_pairs_by_joint[0],
                 _nb_cell_pairs_by_joint.size(),
@@ -477,7 +477,7 @@ int *MEDPARTITIONER::ParaDomainSelector::exchangeSubentityIds( int loc_domain, i
                                                const std::vector<int>& loc_ids_here ) const
 {
   int* loc_ids_dist = new int[ loc_ids_here.size()];
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   int dest = getProcessorID( dist_domain );
   int tag  = 2002 + jointId( loc_domain, dist_domain );
   MPI_Status status;
@@ -516,7 +516,7 @@ int MEDPARTITIONER::ParaDomainSelector::jointId( int local_domain, int distant_d
 
 double MEDPARTITIONER::ParaDomainSelector::getPassedTime() const
 {
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   return MPI_Wtime() - _init_time;
 #else
   return 0.0;
@@ -531,7 +531,7 @@ double MEDPARTITIONER::ParaDomainSelector::getPassedTime() const
 
 void MEDPARTITIONER::ParaDomainSelector::sendMesh(const ParaMEDMEM::MEDCouplingUMesh& mesh, int target) const
 {
-#ifndef HAVE_MPI2
+#ifndef HAVE_MPI
   throw INTERP_KERNEL::Exception("ParaDomainSelector::sendMesh : incoherent call in non_MPI mode");
 #else
   if (MyGlobals::_Verbose>600)
@@ -584,7 +584,7 @@ void MEDPARTITIONER::ParaDomainSelector::sendMesh(const ParaMEDMEM::MEDCouplingU
 */
 void MEDPARTITIONER::ParaDomainSelector::recvMesh(ParaMEDMEM::MEDCouplingUMesh*& mesh, int source)const
 {
-#ifndef HAVE_MPI2
+#ifndef HAVE_MPI
   throw INTERP_KERNEL::Exception("ParaDomainSelector::recvMesh : incoherent call in non_MPI mode");
 #else
   // First stage : exchanging sizes
index 15e07a8b976b6f769ad1ede58aac8c960fbb913d..e163962e0aa178e7551e271d532cbe80f9544369 100644 (file)
@@ -32,7 +32,7 @@
 #include <vector>
 #include <iostream>
 
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
 #include <mpi.h>
 #endif
 
@@ -106,7 +106,7 @@ void ParallelTopology::setGlobalNumerotationDefault(ParaDomainSelector* domainSe
             std::cout << "c" << idomain << "|" << i << "|" << global << " ";
         }
     }
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   if (MyGlobals::_Verbose>500 && MyGlobals::_World_Size>1) MPI_Barrier(MPI_COMM_WORLD); //synchronize verbose trace
 #endif
   if (MyGlobals::_Is0verbose>500) std::cout << std::endl;
@@ -125,7 +125,7 @@ void ParallelTopology::setGlobalNumerotationDefault(ParaDomainSelector* domainSe
             std::cout << "n" << idomain << "|" << i << "|" << global << " ";
         }
     }
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   if (MyGlobals::_Verbose>500 && MyGlobals::_World_Size>1) MPI_Barrier(MPI_COMM_WORLD); //synchronize verbose trace
 #endif
   if (MyGlobals::_Is0verbose>500) std::cout << std::endl;
index 75a7f0b27001a8dde5923216c8e53c29a3d225eb..4f996803fd40426bbadc791ec9693d0242be2570 100644 (file)
@@ -88,7 +88,7 @@ namespace MEDPARTITIONER
   std::vector<std::string> BrowseAllFieldsOnMesh(const std::string& myfile, const std::string& mymesh, const int idomain);
   std::vector<std::string> GetInfosOfField(const char *fileName, const char *meshName, const int idomain );
 
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   //not adviced, interblocking, use sendAndReceive
   //void SendVectorOfString(const std::vector<std::string>& vec, const int target);
   //std::vector<std::string> RecvVectorOfString(const int source);
index 65629addd8d4e410934764c3bbc741bf02060df4..7511263d368b1994548991f13b39fc0011cbc35b 100644 (file)
@@ -35,7 +35,7 @@
 #include <sstream>
 #include <string>
 
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
 #include <mpi.h>
 #endif
 
@@ -118,7 +118,7 @@ void MEDPARTITIONER::SendDoubleVec(const std::vector<double>& vec, const int tar
   int size=vec.size();
   if (MyGlobals::_Verbose>1000) 
     std::cout << "proc " << MyGlobals::_Rank << " : --> SendDoubleVec " << size << std::endl;
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   MPI_Send(&size, 1, MPI_INT, target, tag, MPI_COMM_WORLD);
   MPI_Send(const_cast<double*>(&vec[0]), size, MPI_DOUBLE, target, tag+100, MPI_COMM_WORLD);
 #endif
@@ -134,7 +134,7 @@ std::vector<double>* MEDPARTITIONER::RecvDoubleVec(const int source)
 {
   int tag = 111002;
   int size;
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   MPI_Status status;  
   MPI_Recv(&size, 1, MPI_INT, source, tag, MPI_COMM_WORLD, &status);
   if (MyGlobals::_Verbose>1000) 
@@ -150,7 +150,7 @@ void MEDPARTITIONER::RecvDoubleVec(std::vector<double>& vec, const int source)
 {
   int tag = 111002;
   int size;
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   MPI_Status status;  
   MPI_Recv(&size, 1, MPI_INT, source, tag, MPI_COMM_WORLD, &status);
   if (MyGlobals::_Verbose>1000)
@@ -170,7 +170,7 @@ void MEDPARTITIONER::SendIntVec(const std::vector<int>& vec, const int target)
   int size=vec.size();
   if (MyGlobals::_Verbose>1000)
     std::cout << "proc " << MyGlobals::_Rank << " : --> SendIntVec " << size << std::endl;
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   MPI_Send(&size, 1, MPI_INT, target, tag, MPI_COMM_WORLD);
   MPI_Send(const_cast<int*>(&vec[0]), size,MPI_INT, target, tag+100, MPI_COMM_WORLD);
 #endif
@@ -185,7 +185,7 @@ std::vector<int> *MEDPARTITIONER::RecvIntVec(const int source)
 {
   int tag = 111003;
   int size;
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   MPI_Status status;  
   MPI_Recv(&size, 1, MPI_INT, source, tag, MPI_COMM_WORLD, &status);
   if (MyGlobals::_Verbose>1000)
@@ -201,7 +201,7 @@ void MEDPARTITIONER::RecvIntVec(std::vector<int>& vec, const int source)
 {
   int tag = 111003;
   int size;
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   MPI_Status status;  
   MPI_Recv(&size, 1, MPI_INT, source, tag, MPI_COMM_WORLD, &status);
   if (MyGlobals::_Verbose>1000)
@@ -228,7 +228,7 @@ void MEDPARTITIONER::SendDataArrayInt(const ParaMEDMEM::DataArrayInt *da, const
   size[2]=da->getNumberOfComponents();
   if (MyGlobals::_Verbose>1000) 
     std::cout << "proc " << MyGlobals::_Rank << " : --> SendDataArrayInt " << size[0] << std::endl;
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   MPI_Send(&size, 3, MPI_INT, target, tag, MPI_COMM_WORLD);
   const int *p=da->getConstPointer();
   MPI_Send(const_cast<int*>(&p[0]), size[0] ,MPI_INT, target, tag+100, MPI_COMM_WORLD);
@@ -244,7 +244,7 @@ ParaMEDMEM::DataArrayInt *MEDPARTITIONER::RecvDataArrayInt(const int source)
 {
   int tag = 111004;
   int size[3];
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   MPI_Status status;
   MPI_Recv(size, 3, MPI_INT, source, tag, MPI_COMM_WORLD, &status);
   if (MyGlobals::_Verbose>1000)
@@ -276,7 +276,7 @@ void MEDPARTITIONER::SendDataArrayDouble(const ParaMEDMEM::DataArrayDouble *da,
   size[2]=da->getNumberOfComponents();
   if (MyGlobals::_Verbose>1000) 
     std::cout << "proc " << MyGlobals::_Rank << " : --> SendDataArrayDouble " << size[0] << std::endl;
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   MPI_Send(&size, 3, MPI_INT, target, tag, MPI_COMM_WORLD);
   const double *p=da->getConstPointer();
   MPI_Send(const_cast<double*>(&p[0]), size[0] ,MPI_DOUBLE, target, tag+100, MPI_COMM_WORLD);
@@ -292,7 +292,7 @@ ParaMEDMEM::DataArrayDouble* MEDPARTITIONER::RecvDataArrayDouble(const int sourc
 {
   int tag = 111005;
   int size[3];
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
   MPI_Status status;
   MPI_Recv(size, 3, MPI_INT, source, tag, MPI_COMM_WORLD, &status);
   if (MyGlobals::_Verbose>1000)
index c49dcc6fde6107a2d833d19c8473c4ffa603151c..c7686401a33b8da5ee1f25b43606a9cad8dba8bd 100644 (file)
@@ -43,7 +43,7 @@
 #include <cstdlib>
 #include <vector>
 
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
 #include <mpi.h>
 #endif
 
@@ -108,7 +108,7 @@ std::string MEDPARTITIONERTest::getPartitionerExe() const
 void MEDPARTITIONERTest::setUp()
 {
   this->_verbose=0;
-#if defined(HAVE_MPI2)
+#if defined(HAVE_MPI)
   if (MyGlobals::_Rank==-1)  //do once only
     {
       MPI_Init(0,0);
@@ -123,10 +123,10 @@ void MEDPARTITIONERTest::setUp()
 
   if (_verbose>10)
     {
-#if defined(HAVE_MPI2)
-      cout<<"\ndefined(HAVE_MPI2)"<<endl;
+#if defined(HAVE_MPI)
+      cout<<"\ndefined(HAVE_MPI)"<<endl;
 #else
-      cout<<"\nNOT defined(HAVE_MPI2)"<<endl;
+      cout<<"\nNOT defined(HAVE_MPI)"<<endl;
 #endif
 #if defined(MED_ENABLE_PARMETIS)
       cout<<"defined(MED_ENABLE_PARMETIS)"<<endl;
@@ -893,7 +893,7 @@ void MEDPARTITIONERTest::testMeshCollectionComplexPartitionMetis()
 
 void MEDPARTITIONERTest::testMetisSmallSize()
 {
-  //#if !defined(HAVE_MPI2)
+  //#if !defined(HAVE_MPI)
   setSmallSize();
   createTestMeshes();
   std::string MetisOrScotch("metis");
@@ -975,7 +975,7 @@ void MEDPARTITIONERTest::testMeshCollectionComplexPartitionScotch()
 
 void MEDPARTITIONERTest::testScotchSmallSize()
 {
-  //#if !defined(HAVE_MPI2)
+  //#if !defined(HAVE_MPI)
   setSmallSize();
   createTestMeshes();
   std::string MetisOrScotch("scotch");
index 45698da8354529297d87f9438818ad07b086596a..a8facfc7699aab7c5e6036f2866fe9e520ddc997 100644 (file)
@@ -57,7 +57,7 @@ class MEDPARTITIONERTEST_EXPORT MEDPARTITIONERTest : public CppUnit::TestFixture
   CPPUNIT_TEST( testScotchSmallSize );
 #endif
   
-#if defined(HAVE_MPI2)
+#if defined(HAVE_MPI)
 #if defined(MED_ENABLE_PARMETIS)
   //test with mpi on system
   CPPUNIT_TEST( testMpirunSmallSize );
@@ -130,7 +130,7 @@ public:
   void testScotchSmallSize();
 #endif
   
-#if defined(HAVE_MPI2)
+#if defined(HAVE_MPI)
   void testMpirunSmallSize();
   void testMpirunMedianSize();
   void testMpirunHugeSize();
index 85e18435d615bc552e98648ea04aad4aa801d293..0e50e3194a3a277a76cc8792c56628222fb14a42 100644 (file)
@@ -49,7 +49,7 @@ using namespace std;
 using namespace ParaMEDMEM;
 using namespace MEDPARTITIONER;
 
-#if defined(HAVE_MPI2)
+#if defined(HAVE_MPI)
 void MEDPARTITIONERTest::verifyMedpartitionerOnSmallSizeForMesh()
 {
   int res;
index 419622a94a7042f0f1b7045365ff15f9486d6cda..3e48b6e835db6c6591fb683cd6f9e6e7e1759443 100644 (file)
@@ -51,8 +51,9 @@
 #include <iomanip>
 #include <sstream>
 #include <string>
+#include <cstring>
 
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
 #include <mpi.h>
 #endif
 
index 9990f50902b7dc51e332d6102c442bc91387212c..3bc84a4088fecde83f912fa7d5aefc89dc81c68e 100644 (file)
@@ -53,6 +53,10 @@ SET(renumber_SOURCES
 
 SET(renumbercpp_LDFLAGS medloader)
 
+IF(PARMETIS_FOUND)
+  INCLUDE_DIRECTORIES(${PARMETIS_INCLUDE_DIRS})
+ENDIF(PARMETIS_FOUND)
+
 IF(METIS_FOUND)
   INCLUDE_DIRECTORIES(${METIS_INCLUDE_DIRS})