From: ageay Date: Tue, 9 Jul 2013 12:37:50 +0000 (+0000) Subject: Addition of SCOTCH in MEDPartitioner. X-Git-Tag: V7_3_1b1~351 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=220cdf21c0d563cac95f784827d328503581c973;p=tools%2Fmedcoupling.git Addition of SCOTCH in MEDPartitioner. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 52524ead8..8bd649d63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,6 +117,9 @@ ENDIF(SALOME_BUILD_TESTS) IF(SALOME_USE_MPI) FIND_PACKAGE(SalomeMPI REQUIRED) + IF(SALOME_MED_PARTITIONER_PARMETIS) + FIND_PACKAGE(SalomeParMetis REQUIRED) + ENDIF(SALOME_MED_PARTITIONER_PARMETIS) ENDIF(SALOME_USE_MPI) IF(SALOME_BUILD_DOC) diff --git a/adm_local/cmake_files/CMakeLists.txt b/adm_local/cmake_files/CMakeLists.txt index 9b0f47f19..1a69921e0 100644 --- a/adm_local/cmake_files/CMakeLists.txt +++ b/adm_local/cmake_files/CMakeLists.txt @@ -18,15 +18,13 @@ # SET(admlocal_cmake_DATA - FindMED.cmake FindXDR.cmake FindMetis.cmake FindSalomeMetis.cmake - FindPARMETIS.cmake - FindRENUMBER.cmake + FindParMetis.cmake + FindSalomeParMetis.cmake FindScotch.cmake FindSalomeScotch.cmake - FindSPLITTER.cmake ) INSTALL(FILES ${admlocal_cmake_DATA} DESTINATION ${SALOME_INSTALL_CMAKE_LOCAL}) diff --git a/src/MEDPartitioner/CMakeLists.txt b/src/MEDPartitioner/CMakeLists.txt index 0e13e49f1..4cc5bf5dc 100644 --- a/src/MEDPartitioner/CMakeLists.txt +++ b/src/MEDPartitioner/CMakeLists.txt @@ -45,10 +45,12 @@ IF(SALOME_MED_PARTITIONER_METIS) INCLUDE_DIRECTORIES(${METIS_INCLUDE_DIRS}) ENDIF(SALOME_MED_PARTITIONER_METIS) -IF(MED_ENABLE_PARMETIS) +IF(SALOME_MED_PARTITIONER_PARMETIS) ADD_DEFINITIONS(${PARMETIS_DEFINITIONS}) + ADD_DEFINITIONS("-DMED_ENABLE_PARMETIS") + ADD_DEFINITIONS("-DMED_ENABLE_METIS") INCLUDE_DIRECTORIES(${PARMETIS_INCLUDE_DIRS}) -ENDIF(MED_ENABLE_PARMETIS) +ENDIF(SALOME_MED_PARTITIONER_PARMETIS) IF(SALOME_USE_MPI) ADD_DEFINITIONS(${MPI_DEFINITIONS}) @@ -101,12 +103,12 @@ SET(medpartitionercpp_LDFLAGS medcoupling medloader ) -IF(MED_ENABLE_PARMETIS) +IF(SALOME_MED_PARTITIONER_PARMETIS) SET(medpartitionercpp_HEADERS_HXX ${medpartitionercpp_HEADERS_HXX} MEDPARTITIONER_ParMetisGraph.hxx) - SET(medpartitionercpp_SOURCES ${medpartitionercpp_SOURCES} MEDPARTITIONER_ParMetisGraph.cxx) + SET(medpartitionercpp_SOURCES ${medpartitionercpp_SOURCES} MEDPARTITIONER_ParMetisGraph.cxx MEDPARTITIONER_MetisGraph.cxx) SET(medpartitionercpp_DEFINITIONS "${medpartitionercpp_DEFINITIONS} ${PARMETIS_DEFINITIONS}") - SET(medpartitionercpp_LDFLAGS ${medpartitionercpp_LDFLAGS} ${PARMETIS_LIBS}) -ENDIF(MED_ENABLE_PARMETIS) + SET(medpartitionercpp_LDFLAGS ${medpartitionercpp_LDFLAGS} ${PARMETIS_LIBRARIES}) +ENDIF(SALOME_MED_PARTITIONER_PARMETIS) IF(SALOME_MED_PARTITIONER_METIS) SET(medpartitionercpp_HEADERS_HXX ${medpartitionercpp_HEADERS_HXX} MEDPARTITIONER_MetisGraph.hxx) SET(medpartitionercpp_SOURCES ${medpartitionercpp_SOURCES} MEDPARTITIONER_MetisGraph.cxx) diff --git a/src/MEDPartitioner/MEDPARTITIONER_metis.c b/src/MEDPartitioner/MEDPARTITIONER_metis.c index 98ef41eee..86dc83a49 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_metis.c +++ b/src/MEDPartitioner/MEDPARTITIONER_metis.c @@ -26,7 +26,7 @@ #include "MEDPARTITIONER_metis.h" -#if defined(MED_ENABLE_METIS) +#if defined(MED_ENABLE_METIS) & !defined(MED_ENABLE_PARMETIS) #include "defs.h" #include "struct.h" #include "metis.h" diff --git a/src/MEDPartitioner/Test/CMakeLists.txt b/src/MEDPartitioner/Test/CMakeLists.txt index b7ed8a65a..f981249c8 100644 --- a/src/MEDPartitioner/Test/CMakeLists.txt +++ b/src/MEDPartitioner/Test/CMakeLists.txt @@ -36,9 +36,9 @@ SET(MEDPARTITIONERTest_SOURCES SET(MEDPARTITIONERTest_LDFLAGS medpartitionercpp ${CPPUNIT_LIBRARIES}) IF(SALOME_USE_MPI) - IF(MED_ENABLE_PARMETIS) + IF(SALOME_MED_PARTITIONER_PARMETIS) SET(MEDPARTITIONERTest_SOURCES ${MEDPARTITIONERTest_SOURCES} MEDPARTITIONERTestPara.cxx) - ENDIF(MED_ENABLE_PARMETIS) + ENDIF(SALOME_MED_PARTITIONER_PARMETIS) ENDIF(SALOME_USE_MPI) ADD_LIBRARY(MEDPARTITIONERTest SHARED ${MEDPARTITIONERTest_SOURCES})