From b41520d7c479b51372177b1fa8c8d1a9a34381ec Mon Sep 17 00:00:00 2001 From: abn Date: Fri, 12 Feb 2021 20:37:32 +0100 Subject: [PATCH] Moving MPIAccess to a subfolder for clarity --- src/ParaMEDMEM/CMakeLists.txt | 45 ++++---- src/ParaMEDMEM/{ => MPIAccess}/MPIAccess.cxx | 3 +- src/ParaMEDMEM/{ => MPIAccess}/MPIAccess.hxx | 0 .../{ => MPIAccess}/MPIAccessDEC.cxx | 2 +- .../{ => MPIAccess}/MPIAccessDEC.hxx | 2 +- src/ParaMEDMEM/MPIAccess/README.txt | 2 + src/ParaMEDMEM/OverlapInterpolationMatrix.cxx | 1 + src/ParaMEDMEM/README | 3 +- src/ParaMEDMEMTest/CMakeLists.txt | 55 ++-------- src/ParaMEDMEMTest/MPIAccess/CMakeLists.txt | 102 ++++++++++++++++++ .../{ => MPIAccess}/MPIAccessDECTest.cxx | 0 .../{ => MPIAccess}/MPIAccessDECTest.hxx | 0 .../{ => MPIAccess}/MPIAccessTest.cxx | 0 .../{ => MPIAccess}/MPIAccessTest.hxx | 0 .../{ => MPIAccess}/TestMPIAccess.cxx | 0 .../{ => MPIAccess}/TestMPIAccessDEC.cxx | 0 .../{ => MPIAccess}/test_AllToAllDEC.cxx | 3 +- .../{ => MPIAccess}/test_AllToAllTimeDEC.cxx | 2 +- .../{ => MPIAccess}/test_AllToAllvDEC.cxx | 2 +- .../{ => MPIAccess}/test_AllToAllvTimeDEC.cxx | 2 +- .../test_AllToAllvTimeDoubleDEC.cxx | 2 +- .../test_MPI_Access_Cancel.cxx | 0 .../test_MPI_Access_Cyclic_ISend_IRecv.cxx | 0 .../test_MPI_Access_Cyclic_Send_Recv.cxx | 0 .../test_MPI_Access_IProbe.cxx | 0 .../test_MPI_Access_ISendRecv.cxx | 0 .../test_MPI_Access_ISend_IRecv.cxx | 0 ...test_MPI_Access_ISend_IRecv_BottleNeck.cxx | 0 .../test_MPI_Access_ISend_IRecv_Length.cxx | 0 .../test_MPI_Access_ISend_IRecv_Length_1.cxx | 0 .../{ => MPIAccess}/test_MPI_Access_Probe.cxx | 0 .../test_MPI_Access_SendRecv.cxx | 0 .../test_MPI_Access_Send_Recv.cxx | 0 .../test_MPI_Access_Send_Recv_Length.cxx | 0 .../{ => MPIAccess}/test_MPI_Access_Time.cxx | 0 .../test_MPI_Access_Time_0.cxx | 0 src/ParaMEDMEM_Swig/CMakeLists.txt | 1 + src/PyWrapping/CMakeLists.txt | 1 + 38 files changed, 151 insertions(+), 77 deletions(-) rename src/ParaMEDMEM/{ => MPIAccess}/MPIAccess.cxx (99%) rename src/ParaMEDMEM/{ => MPIAccess}/MPIAccess.hxx (100%) rename src/ParaMEDMEM/{ => MPIAccess}/MPIAccessDEC.cxx (99%) rename src/ParaMEDMEM/{ => MPIAccess}/MPIAccessDEC.hxx (100%) create mode 100644 src/ParaMEDMEM/MPIAccess/README.txt create mode 100644 src/ParaMEDMEMTest/MPIAccess/CMakeLists.txt rename src/ParaMEDMEMTest/{ => MPIAccess}/MPIAccessDECTest.cxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/MPIAccessDECTest.hxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/MPIAccessTest.cxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/MPIAccessTest.hxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/TestMPIAccess.cxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/TestMPIAccessDEC.cxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_AllToAllDEC.cxx (99%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_AllToAllTimeDEC.cxx (99%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_AllToAllvDEC.cxx (99%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_AllToAllvTimeDEC.cxx (99%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_AllToAllvTimeDoubleDEC.cxx (99%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_MPI_Access_Cancel.cxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_MPI_Access_Cyclic_ISend_IRecv.cxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_MPI_Access_Cyclic_Send_Recv.cxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_MPI_Access_IProbe.cxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_MPI_Access_ISendRecv.cxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_MPI_Access_ISend_IRecv.cxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_MPI_Access_ISend_IRecv_BottleNeck.cxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_MPI_Access_ISend_IRecv_Length.cxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_MPI_Access_ISend_IRecv_Length_1.cxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_MPI_Access_Probe.cxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_MPI_Access_SendRecv.cxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_MPI_Access_Send_Recv.cxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_MPI_Access_Send_Recv_Length.cxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_MPI_Access_Time.cxx (100%) rename src/ParaMEDMEMTest/{ => MPIAccess}/test_MPI_Access_Time_0.cxx (100%) diff --git a/src/ParaMEDMEM/CMakeLists.txt b/src/ParaMEDMEM/CMakeLists.txt index a6f0e37e3..73949776c 100644 --- a/src/ParaMEDMEM/CMakeLists.txt +++ b/src/ParaMEDMEM/CMakeLists.txt @@ -27,6 +27,7 @@ ENDIF() INCLUDE_DIRECTORIES( ${MPI_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/MPIAccess ${CMAKE_CURRENT_SOURCE_DIR}/../MEDCoupling ${CMAKE_CURRENT_SOURCE_DIR}/../ICoCo ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL @@ -37,42 +38,44 @@ INCLUDE_DIRECTORIES( ) SET(paramedmem_SOURCES - ProcessorGroup.cxx - MPIProcessorGroup.cxx - ParaMESH.cxx + BlockTopology.cxx CommInterface.cxx - ParaUMesh.cxx - ParaSkyLineArray.cxx - ParaDataArray.cxx ComponentTopology.cxx - MPIAccess.cxx - InterpolationMatrix.cxx - OverlapInterpolationMatrix.cxx - StructuredCoincidentDEC.cxx - ExplicitCoincidentDEC.cxx - InterpKernelDEC.cxx - ElementLocator.cxx - OverlapElementLocator.cxx - MPIAccessDEC.cxx - TimeInterpolator.cxx - LinearTimeInterpolator.cxx DEC.cxx DisjointDEC.cxx - OverlapDEC.cxx + ElementLocator.cxx + ExplicitCoincidentDEC.cxx + ExplicitMapping.cxx ExplicitTopology.cxx + InterpKernelDEC.cxx + InterpolationMatrix.cxx + LinearTimeInterpolator.cxx + MPIProcessorGroup.cxx MxN_Mapping.cxx + OverlapDEC.cxx + OverlapElementLocator.cxx + OverlapInterpolationMatrix.cxx OverlapMapping.cxx + ParaDataArray.cxx ParaFIELD.cxx ParaGRID.cxx - BlockTopology.cxx - ExplicitMapping.cxx - ) + ParaMESH.cxx + ParaSkyLineArray.cxx + ParaUMesh.cxx + ProcessorGroup.cxx + StructuredCoincidentDEC.cxx + TimeInterpolator.cxx + MPIAccess/MPIAccess.cxx + MPIAccess/MPIAccessDEC.cxx +) ADD_LIBRARY(paramedmem ${paramedmem_SOURCES}) TARGET_LINK_LIBRARIES(paramedmem medcouplingcpp ${MPI_LIBRARIES}) INSTALL(TARGETS paramedmem EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${MEDCOUPLING_INSTALL_LIBS}) FILE(GLOB paramedmem_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +FILE(GLOB mpiaccess_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/MPIAccess/*.hxx") +LIST(APPEND paramedmem_HEADERS_HXX ${mpiaccess_HEADERS_HXX}) INSTALL(FILES ${paramedmem_HEADERS_HXX} DESTINATION ${MEDCOUPLING_INSTALL_HEADERS}) FILE(GLOB paramedmem_HEADERS_TXX "${CMAKE_CURRENT_SOURCE_DIR}/*.txx") diff --git a/src/ParaMEDMEM/MPIAccess.cxx b/src/ParaMEDMEM/MPIAccess/MPIAccess.cxx similarity index 99% rename from src/ParaMEDMEM/MPIAccess.cxx rename to src/ParaMEDMEM/MPIAccess/MPIAccess.cxx index 8ddaf698c..53178d99f 100644 --- a/src/ParaMEDMEM/MPIAccess.cxx +++ b/src/ParaMEDMEM/MPIAccess/MPIAccess.cxx @@ -17,7 +17,8 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#include "MPIAccess.hxx" +#include "MPIAccess/MPIAccess.hxx" + #include "InterpolationUtils.hxx" #include diff --git a/src/ParaMEDMEM/MPIAccess.hxx b/src/ParaMEDMEM/MPIAccess/MPIAccess.hxx similarity index 100% rename from src/ParaMEDMEM/MPIAccess.hxx rename to src/ParaMEDMEM/MPIAccess/MPIAccess.hxx diff --git a/src/ParaMEDMEM/MPIAccessDEC.cxx b/src/ParaMEDMEM/MPIAccess/MPIAccessDEC.cxx similarity index 99% rename from src/ParaMEDMEM/MPIAccessDEC.cxx rename to src/ParaMEDMEM/MPIAccess/MPIAccessDEC.cxx index 7ffa94195..94e61ccb9 100644 --- a/src/ParaMEDMEM/MPIAccessDEC.cxx +++ b/src/ParaMEDMEM/MPIAccess/MPIAccessDEC.cxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#include "MPIAccessDEC.hxx" +#include "MPIAccess/MPIAccessDEC.hxx" #include diff --git a/src/ParaMEDMEM/MPIAccessDEC.hxx b/src/ParaMEDMEM/MPIAccess/MPIAccessDEC.hxx similarity index 100% rename from src/ParaMEDMEM/MPIAccessDEC.hxx rename to src/ParaMEDMEM/MPIAccess/MPIAccessDEC.hxx index 8016be0db..151db11d4 100644 --- a/src/ParaMEDMEM/MPIAccessDEC.hxx +++ b/src/ParaMEDMEM/MPIAccess/MPIAccessDEC.hxx @@ -20,12 +20,12 @@ #ifndef __MPIACCESSDEC_HXX__ #define __MPIACCESSDEC_HXX__ -#include "MPIAccess.hxx" #include "DEC.hxx" #include "LinearTimeInterpolator.hxx" #include #include +#include "MPIAccess.hxx" namespace MEDCoupling { diff --git a/src/ParaMEDMEM/MPIAccess/README.txt b/src/ParaMEDMEM/MPIAccess/README.txt new file mode 100644 index 000000000..cb32ccdb9 --- /dev/null +++ b/src/ParaMEDMEM/MPIAccess/README.txt @@ -0,0 +1,2 @@ +MPIAccess is not used anywhere in ParaMEDMEM or the rest of MEDCoupling. +Keep it here in case we find a usage for it later ... diff --git a/src/ParaMEDMEM/OverlapInterpolationMatrix.cxx b/src/ParaMEDMEM/OverlapInterpolationMatrix.cxx index 9ec73fd23..0b835c41b 100644 --- a/src/ParaMEDMEM/OverlapInterpolationMatrix.cxx +++ b/src/ParaMEDMEM/OverlapInterpolationMatrix.cxx @@ -32,6 +32,7 @@ #include "Interpolation2D3D.txx" #include "Interpolation2D1D.txx" #include "MEDCouplingUMesh.hxx" +#include "MEDCouplingFieldDouble.hxx" #include "MEDCouplingNormalizedUnstructuredMesh.txx" #include "InterpolationOptions.hxx" #include "NormalizedUnstructuredMesh.hxx" diff --git a/src/ParaMEDMEM/README b/src/ParaMEDMEM/README index 8a72f3971..3f2f8df63 100644 --- a/src/ParaMEDMEM/README +++ b/src/ParaMEDMEM/README @@ -25,7 +25,8 @@ Exemple avec MPICH : mpirun -np 2 xterm -e gdb src/ParaMEDMEMTest/TestMPIAccess - +[ABN-2021] MPIAccess is now isolated - it is only used in NxM_Mapping +===================================================================== diff --git a/src/ParaMEDMEMTest/CMakeLists.txt b/src/ParaMEDMEMTest/CMakeLists.txt index 7e65d5cbe..ec9f30770 100644 --- a/src/ParaMEDMEMTest/CMakeLists.txt +++ b/src/ParaMEDMEMTest/CMakeLists.txt @@ -17,6 +17,8 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +ADD_SUBDIRECTORY(MPIAccess) # maybe to delete one day ... + ADD_DEFINITIONS(${MPI_DEFINITIONS} ${CPPUNIT_DEFINITIONS}) INCLUDE_DIRECTORIES( @@ -24,6 +26,7 @@ INCLUDE_DIRECTORIES( ${CPPUNIT_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../ParaMEDLoader ${CMAKE_CURRENT_SOURCE_DIR}/../ParaMEDMEM + ${CMAKE_CURRENT_SOURCE_DIR}/../ParaMEDMEM/MPIAccess ${CMAKE_CURRENT_SOURCE_DIR}/../MEDLoader ${CMAKE_CURRENT_SOURCE_DIR}/../MEDCoupling ${CMAKE_CURRENT_SOURCE_DIR}/../ICoCo @@ -43,29 +46,7 @@ SET(ParaMEDMEMTest_SOURCES ParaMEDMEMTest_FabienAPI.cxx ParaMEDMEMTest_NonCoincidentDEC.cxx ParaMEDMEMTest_OverlapDEC.cxx - MPIAccessDECTest.cxx - test_AllToAllDEC.cxx - test_AllToAllvDEC.cxx - test_AllToAllTimeDEC.cxx - test_AllToAllvTimeDEC.cxx - test_AllToAllvTimeDoubleDEC.cxx - MPIAccessTest.cxx - test_MPI_Access_Send_Recv.cxx - test_MPI_Access_Cyclic_Send_Recv.cxx - test_MPI_Access_SendRecv.cxx - test_MPI_Access_ISend_IRecv.cxx - test_MPI_Access_Cyclic_ISend_IRecv.cxx - test_MPI_Access_ISendRecv.cxx - test_MPI_Access_Probe.cxx - test_MPI_Access_IProbe.cxx - test_MPI_Access_Cancel.cxx - test_MPI_Access_Send_Recv_Length.cxx - test_MPI_Access_ISend_IRecv_Length.cxx - test_MPI_Access_ISend_IRecv_Length_1.cxx - test_MPI_Access_Time.cxx - test_MPI_Access_Time_0.cxx - test_MPI_Access_ISend_IRecv_BottleNeck.cxx - ) +) ADD_LIBRARY(ParaMEDMEMTest ${ParaMEDMEMTest_SOURCES}) SET_TARGET_PROPERTIES(ParaMEDMEMTest PROPERTIES COMPILE_FLAGS "") @@ -76,35 +57,25 @@ SET(TESTSParaMEDMEM) SET(TestParaMEDMEM_SOURCES TestParaMEDMEM.cxx ) -SET(TESTSParaMEDMEM ${TESTSParaMEDMEM} TestParaMEDMEM) - -SET(TestMPIAccessDEC_SOURCES - TestMPIAccessDEC.cxx - ) -SET(TESTSParaMEDMEM ${TESTSParaMEDMEM} TestMPIAccessDEC) - -SET(TestMPIAccess_SOURCES - TestMPIAccess.cxx - ) -SET(TESTSParaMEDMEM ${TESTSParaMEDMEM} TestMPIAccess) +LIST(APPEND TESTSParaMEDMEM TestParaMEDMEM) SET(test_perf_SOURCES test_perf.cxx ) -SET(TESTSParaMEDMEM ${TESTSParaMEDMEM} test_perf) +LIST(APPEND TESTSParaMEDMEM test_perf) IF(MPI2_IS_OK) SET(ParaMEDMEMTestMPI2_1_SOURCES MPI2Connector.cxx ParaMEDMEMTestMPI2_1.cxx ) - SET(TESTSParaMEDMEM ${TESTSParaMEDMEM} ParaMEDMEMTestMPI2_1) + LIST(APPEND TESTSParaMEDMEM ParaMEDMEMTestMPI2_1) SET(ParaMEDMEMTestMPI2_2_SOURCES MPI2Connector.cxx ParaMEDMEMTestMPI2_2.cxx ) - SET(TESTSParaMEDMEM ${TESTSParaMEDMEM} ParaMEDMEMTestMPI2_2) + LIST(APPEND TESTSParaMEDMEM ParaMEDMEMTestMPI2_2) ENDIF(MPI2_IS_OK) FOREACH(bintestparamem ${TESTSParaMEDMEM}) @@ -132,20 +103,10 @@ SET_TESTS_PROPERTIES(TestParaMEDMEM_Proc4 PROPERTIES ENVIRONMENT "${tests_env}") ADD_TEST(NAME TestParaMEDMEM_Proc5 COMMAND ${MPIEXEC} -np 5 ${_oversub_opt} $) SET_TESTS_PROPERTIES(TestParaMEDMEM_Proc5 PROPERTIES ENVIRONMENT "${tests_env}") -ADD_TEST(NAME TestMPIAccess_Proc2 COMMAND ${MPIEXEC} -np 2 ${_oversub_opt} $) -SET_TESTS_PROPERTIES(TestMPIAccess_Proc2 PROPERTIES ENVIRONMENT "${tests_env}") -ADD_TEST(NAME TestMPIAccess_Proc3 COMMAND ${MPIEXEC} -np 3 ${_oversub_opt} $) -SET_TESTS_PROPERTIES(TestMPIAccess_Proc3 PROPERTIES ENVIRONMENT "${tests_env}") - -ADD_TEST(NAME TestMPIAccessDEC_Proc4 COMMAND ${MPIEXEC} -np 4 ${_oversub_opt} $) -SET_TESTS_PROPERTIES(TestMPIAccessDEC_Proc4 PROPERTIES ENVIRONMENT "${tests_env}") - # Installation rules INSTALL(TARGETS ${TESTSParaMEDMEM} DESTINATION ${MEDCOUPLING_INSTALL_BINS}) SET(COMMON_HEADERS_HXX MPIMainTest.hxx - MPIAccessDECTest.hxx - MPIAccessTest.hxx ParaMEDMEMTest.hxx MPI2Connector.hxx ) diff --git a/src/ParaMEDMEMTest/MPIAccess/CMakeLists.txt b/src/ParaMEDMEMTest/MPIAccess/CMakeLists.txt new file mode 100644 index 000000000..9cd11ea93 --- /dev/null +++ b/src/ParaMEDMEMTest/MPIAccess/CMakeLists.txt @@ -0,0 +1,102 @@ +# Copyright (C) 2012-2020 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +ADD_DEFINITIONS(${MPI_DEFINITIONS} ${CPPUNIT_DEFINITIONS}) + +INCLUDE_DIRECTORIES( + ${MPI_INCLUDE_DIRS} + ${CPPUNIT_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR}/.. + ${CMAKE_CURRENT_SOURCE_DIR}/../../ParaMEDMEM + ${CMAKE_CURRENT_SOURCE_DIR}/../../ParaMEDMEM/MPIAccess + ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCoupling + ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL + ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/Bases +) + +SET(MPIAccessTest_SOURCES + MPIAccessDECTest.cxx + test_AllToAllDEC.cxx + test_AllToAllvDEC.cxx + test_AllToAllTimeDEC.cxx + test_AllToAllvTimeDEC.cxx + test_AllToAllvTimeDoubleDEC.cxx + MPIAccessTest.cxx + test_MPI_Access_Send_Recv.cxx + test_MPI_Access_Cyclic_Send_Recv.cxx + test_MPI_Access_SendRecv.cxx + test_MPI_Access_ISend_IRecv.cxx + test_MPI_Access_Cyclic_ISend_IRecv.cxx + test_MPI_Access_ISendRecv.cxx + test_MPI_Access_Probe.cxx + test_MPI_Access_IProbe.cxx + test_MPI_Access_Cancel.cxx + test_MPI_Access_Send_Recv_Length.cxx + test_MPI_Access_ISend_IRecv_Length.cxx + test_MPI_Access_ISend_IRecv_Length_1.cxx + test_MPI_Access_Time.cxx + test_MPI_Access_Time_0.cxx + test_MPI_Access_ISend_IRecv_BottleNeck.cxx + ) + +ADD_LIBRARY(MPIAccessTest ${MPIAccessTest_SOURCES}) +SET_TARGET_PROPERTIES(MPIAccessTest PROPERTIES COMPILE_FLAGS "") +TARGET_LINK_LIBRARIES(MPIAccessTest paramedmem ${CPPUNIT_LIBRARIES}) +INSTALL(TARGETS MPIAccessTest DESTINATION ${MEDCOUPLING_INSTALL_LIBS}) + +SET(TESTSMPIAccess) +SET(TestMPIAccessDEC_SOURCES + TestMPIAccessDEC.cxx + ) +LIST(APPEND TESTSMPIAccess TestMPIAccessDEC) + +SET(TestMPIAccess_SOURCES + TestMPIAccess.cxx + ) +LIST(APPEND TESTSMPIAccess TestMPIAccess) + +FOREACH(bintest ${TESTSMPIAccess}) + ADD_EXECUTABLE(${bintest} ${${bintest}_SOURCES}) + TARGET_LINK_LIBRARIES(${bintest} MPIAccessTest) +ENDFOREACH() + +# Now add CMake tests +SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env) + +# -- some tests require 2, 3, 4 or 5 procs -- +# MPICH does not support --oversubscribe: +IF(NOT ${MPIEXEC_EXECUTABLE} MATCHES "mpich") + SET(_oversub_opt "--oversubscribe") +ENDIF() + +ADD_TEST(NAME TestMPIAccess_Proc2 COMMAND ${MPIEXEC} -np 2 ${_oversub_opt} $) +SET_TESTS_PROPERTIES(TestMPIAccess_Proc2 PROPERTIES ENVIRONMENT "${tests_env}") +ADD_TEST(NAME TestMPIAccess_Proc3 COMMAND ${MPIEXEC} -np 3 ${_oversub_opt} $) +SET_TESTS_PROPERTIES(TestMPIAccess_Proc3 PROPERTIES ENVIRONMENT "${tests_env}") + +ADD_TEST(NAME TestMPIAccessDEC_Proc4 COMMAND ${MPIEXEC} -np 4 ${_oversub_opt} $) +SET_TESTS_PROPERTIES(TestMPIAccessDEC_Proc4 PROPERTIES ENVIRONMENT "${tests_env}") + +# Installation rules +INSTALL(TARGETS ${TESTSMPIAccess} DESTINATION ${MEDCOUPLING_INSTALL_BINS}) +SET(COMMON_HEADERS_HXX + MPIAccessDECTest.hxx + MPIAccessTest.hxx +) +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${MEDCOUPLING_INSTALL_HEADERS}) diff --git a/src/ParaMEDMEMTest/MPIAccessDECTest.cxx b/src/ParaMEDMEMTest/MPIAccess/MPIAccessDECTest.cxx similarity index 100% rename from src/ParaMEDMEMTest/MPIAccessDECTest.cxx rename to src/ParaMEDMEMTest/MPIAccess/MPIAccessDECTest.cxx diff --git a/src/ParaMEDMEMTest/MPIAccessDECTest.hxx b/src/ParaMEDMEMTest/MPIAccess/MPIAccessDECTest.hxx similarity index 100% rename from src/ParaMEDMEMTest/MPIAccessDECTest.hxx rename to src/ParaMEDMEMTest/MPIAccess/MPIAccessDECTest.hxx diff --git a/src/ParaMEDMEMTest/MPIAccessTest.cxx b/src/ParaMEDMEMTest/MPIAccess/MPIAccessTest.cxx similarity index 100% rename from src/ParaMEDMEMTest/MPIAccessTest.cxx rename to src/ParaMEDMEMTest/MPIAccess/MPIAccessTest.cxx diff --git a/src/ParaMEDMEMTest/MPIAccessTest.hxx b/src/ParaMEDMEMTest/MPIAccess/MPIAccessTest.hxx similarity index 100% rename from src/ParaMEDMEMTest/MPIAccessTest.hxx rename to src/ParaMEDMEMTest/MPIAccess/MPIAccessTest.hxx diff --git a/src/ParaMEDMEMTest/TestMPIAccess.cxx b/src/ParaMEDMEMTest/MPIAccess/TestMPIAccess.cxx similarity index 100% rename from src/ParaMEDMEMTest/TestMPIAccess.cxx rename to src/ParaMEDMEMTest/MPIAccess/TestMPIAccess.cxx diff --git a/src/ParaMEDMEMTest/TestMPIAccessDEC.cxx b/src/ParaMEDMEMTest/MPIAccess/TestMPIAccessDEC.cxx similarity index 100% rename from src/ParaMEDMEMTest/TestMPIAccessDEC.cxx rename to src/ParaMEDMEMTest/MPIAccess/TestMPIAccessDEC.cxx diff --git a/src/ParaMEDMEMTest/test_AllToAllDEC.cxx b/src/ParaMEDMEMTest/MPIAccess/test_AllToAllDEC.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_AllToAllDEC.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_AllToAllDEC.cxx index e6bf3a254..78a5efd04 100644 --- a/src/ParaMEDMEMTest/test_AllToAllDEC.cxx +++ b/src/ParaMEDMEMTest/MPIAccess/test_AllToAllDEC.cxx @@ -25,7 +25,8 @@ #include "MPIAccessDECTest.hxx" #include -#include "MPIAccessDEC.hxx" + +#include "../ParaMEDMEM/MPIAccess/MPIAccessDEC.hxx" // use this define to enable lines, execution of which leads to Segmentation Fault #define ENABLE_FAULTS diff --git a/src/ParaMEDMEMTest/test_AllToAllTimeDEC.cxx b/src/ParaMEDMEMTest/MPIAccess/test_AllToAllTimeDEC.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_AllToAllTimeDEC.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_AllToAllTimeDEC.cxx index b43e1bd66..96a425f3e 100644 --- a/src/ParaMEDMEMTest/test_AllToAllTimeDEC.cxx +++ b/src/ParaMEDMEMTest/MPIAccess/test_AllToAllTimeDEC.cxx @@ -26,10 +26,10 @@ #include "MPIAccessDECTest.hxx" #include +#include "../ParaMEDMEM/MPIAccess/MPIAccessDEC.hxx" //#include "CommInterface.hxx" //#include "ProcessorGroup.hxx" //#include "MPIProcessorGroup.hxx" -#include "MPIAccessDEC.hxx" #include "LinearTimeInterpolator.hxx" // use this define to enable lines, execution of which leads to Segmentation Fault diff --git a/src/ParaMEDMEMTest/test_AllToAllvDEC.cxx b/src/ParaMEDMEMTest/MPIAccess/test_AllToAllvDEC.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_AllToAllvDEC.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_AllToAllvDEC.cxx index da022e464..eff85e14e 100644 --- a/src/ParaMEDMEMTest/test_AllToAllvDEC.cxx +++ b/src/ParaMEDMEMTest/MPIAccess/test_AllToAllvDEC.cxx @@ -29,7 +29,7 @@ //#include "CommInterface.hxx" //#include "ProcessorGroup.hxx" //#include "MPIProcessorGroup.hxx" -#include "MPIAccessDEC.hxx" +#include "../ParaMEDMEM/MPIAccess/MPIAccessDEC.hxx" // use this define to enable lines, execution of which leads to Segmentation Fault #define ENABLE_FAULTS diff --git a/src/ParaMEDMEMTest/test_AllToAllvTimeDEC.cxx b/src/ParaMEDMEMTest/MPIAccess/test_AllToAllvTimeDEC.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_AllToAllvTimeDEC.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_AllToAllvTimeDEC.cxx index a35a1117a..c5e38b9f6 100644 --- a/src/ParaMEDMEMTest/test_AllToAllvTimeDEC.cxx +++ b/src/ParaMEDMEMTest/MPIAccess/test_AllToAllvTimeDEC.cxx @@ -27,10 +27,10 @@ #include "MPIAccessDECTest.hxx" #include +#include "../ParaMEDMEM/MPIAccess/MPIAccessDEC.hxx" //#include "CommInterface.hxx" //#include "ProcessorGroup.hxx" //#include "MPIProcessorGroup.hxx" -#include "MPIAccessDEC.hxx" #include "LinearTimeInterpolator.hxx" // use this define to enable lines, execution of which leads to Segmentation Fault diff --git a/src/ParaMEDMEMTest/test_AllToAllvTimeDoubleDEC.cxx b/src/ParaMEDMEMTest/MPIAccess/test_AllToAllvTimeDoubleDEC.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_AllToAllvTimeDoubleDEC.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_AllToAllvTimeDoubleDEC.cxx index ead0f9caa..a1068090a 100644 --- a/src/ParaMEDMEMTest/test_AllToAllvTimeDoubleDEC.cxx +++ b/src/ParaMEDMEMTest/MPIAccess/test_AllToAllvTimeDoubleDEC.cxx @@ -28,10 +28,10 @@ #include "MPIAccessDECTest.hxx" #include +#include "../ParaMEDMEM/MPIAccess/MPIAccessDEC.hxx" //#include "CommInterface.hxx" //#include "ProcessorGroup.hxx" //#include "MPIProcessorGroup.hxx" -#include "MPIAccessDEC.hxx" #include "LinearTimeInterpolator.hxx" // use this define to enable lines, execution of which leads to Segmentation Fault diff --git a/src/ParaMEDMEMTest/test_MPI_Access_Cancel.cxx b/src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_Cancel.cxx similarity index 100% rename from src/ParaMEDMEMTest/test_MPI_Access_Cancel.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_Cancel.cxx diff --git a/src/ParaMEDMEMTest/test_MPI_Access_Cyclic_ISend_IRecv.cxx b/src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_Cyclic_ISend_IRecv.cxx similarity index 100% rename from src/ParaMEDMEMTest/test_MPI_Access_Cyclic_ISend_IRecv.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_Cyclic_ISend_IRecv.cxx diff --git a/src/ParaMEDMEMTest/test_MPI_Access_Cyclic_Send_Recv.cxx b/src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_Cyclic_Send_Recv.cxx similarity index 100% rename from src/ParaMEDMEMTest/test_MPI_Access_Cyclic_Send_Recv.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_Cyclic_Send_Recv.cxx diff --git a/src/ParaMEDMEMTest/test_MPI_Access_IProbe.cxx b/src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_IProbe.cxx similarity index 100% rename from src/ParaMEDMEMTest/test_MPI_Access_IProbe.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_IProbe.cxx diff --git a/src/ParaMEDMEMTest/test_MPI_Access_ISendRecv.cxx b/src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_ISendRecv.cxx similarity index 100% rename from src/ParaMEDMEMTest/test_MPI_Access_ISendRecv.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_ISendRecv.cxx diff --git a/src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv.cxx b/src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_ISend_IRecv.cxx similarity index 100% rename from src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_ISend_IRecv.cxx diff --git a/src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_BottleNeck.cxx b/src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_ISend_IRecv_BottleNeck.cxx similarity index 100% rename from src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_BottleNeck.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_ISend_IRecv_BottleNeck.cxx diff --git a/src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_Length.cxx b/src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_ISend_IRecv_Length.cxx similarity index 100% rename from src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_Length.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_ISend_IRecv_Length.cxx diff --git a/src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_Length_1.cxx b/src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_ISend_IRecv_Length_1.cxx similarity index 100% rename from src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_Length_1.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_ISend_IRecv_Length_1.cxx diff --git a/src/ParaMEDMEMTest/test_MPI_Access_Probe.cxx b/src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_Probe.cxx similarity index 100% rename from src/ParaMEDMEMTest/test_MPI_Access_Probe.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_Probe.cxx diff --git a/src/ParaMEDMEMTest/test_MPI_Access_SendRecv.cxx b/src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_SendRecv.cxx similarity index 100% rename from src/ParaMEDMEMTest/test_MPI_Access_SendRecv.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_SendRecv.cxx diff --git a/src/ParaMEDMEMTest/test_MPI_Access_Send_Recv.cxx b/src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_Send_Recv.cxx similarity index 100% rename from src/ParaMEDMEMTest/test_MPI_Access_Send_Recv.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_Send_Recv.cxx diff --git a/src/ParaMEDMEMTest/test_MPI_Access_Send_Recv_Length.cxx b/src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_Send_Recv_Length.cxx similarity index 100% rename from src/ParaMEDMEMTest/test_MPI_Access_Send_Recv_Length.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_Send_Recv_Length.cxx diff --git a/src/ParaMEDMEMTest/test_MPI_Access_Time.cxx b/src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_Time.cxx similarity index 100% rename from src/ParaMEDMEMTest/test_MPI_Access_Time.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_Time.cxx diff --git a/src/ParaMEDMEMTest/test_MPI_Access_Time_0.cxx b/src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_Time_0.cxx similarity index 100% rename from src/ParaMEDMEMTest/test_MPI_Access_Time_0.cxx rename to src/ParaMEDMEMTest/MPIAccess/test_MPI_Access_Time_0.cxx diff --git a/src/ParaMEDMEM_Swig/CMakeLists.txt b/src/ParaMEDMEM_Swig/CMakeLists.txt index 3b69239ef..5a4649b08 100644 --- a/src/ParaMEDMEM_Swig/CMakeLists.txt +++ b/src/ParaMEDMEM_Swig/CMakeLists.txt @@ -43,6 +43,7 @@ INCLUDE_DIRECTORIES( ${MPI_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ParaMEDMEM + ${CMAKE_CURRENT_SOURCE_DIR}/../ParaMEDMEM/MPIAccess ${CMAKE_CURRENT_SOURCE_DIR}/../ICoCo ${CMAKE_CURRENT_SOURCE_DIR}/../MEDCoupling_Swig ${CMAKE_CURRENT_SOURCE_DIR}/../MEDCoupling diff --git a/src/PyWrapping/CMakeLists.txt b/src/PyWrapping/CMakeLists.txt index 8a212d035..0199e17bd 100644 --- a/src/PyWrapping/CMakeLists.txt +++ b/src/PyWrapping/CMakeLists.txt @@ -60,6 +60,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../MEDPartitioner_Swig ${CMAKE_CURRENT_SOURCE_DIR}/../ICoCo ${CMAKE_CURRENT_SOURCE_DIR}/../ParaMEDMEM + ${CMAKE_CURRENT_SOURCE_DIR}/../ParaMEDMEM/MPIAccess ${CMAKE_CURRENT_SOURCE_DIR}/../ParaMEDMEM_Swig ${PROJECT_BINARY_DIR}/doc ) -- 2.39.2