1 # Copyright (C) 2012-2024 CEA, EDF
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 ADD_DEFINITIONS(${MPI_DEFINITIONS} ${CPPUNIT_DEFINITIONS})
24 ${CPPUNIT_INCLUDE_DIRS}
25 ${CMAKE_CURRENT_SOURCE_DIR}/..
26 ${CMAKE_CURRENT_SOURCE_DIR}/../../ParaMEDMEM
27 ${CMAKE_CURRENT_SOURCE_DIR}/../../ParaMEDMEM/MPIAccess
28 ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCoupling
29 ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL
30 ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/Bases
33 SET(MPIAccessTest_SOURCES
37 test_AllToAllTimeDEC.cxx
38 test_AllToAllvTimeDEC.cxx
39 test_AllToAllvTimeDoubleDEC.cxx
41 test_MPI_Access_Send_Recv.cxx
42 test_MPI_Access_Cyclic_Send_Recv.cxx
43 test_MPI_Access_SendRecv.cxx
44 test_MPI_Access_ISend_IRecv.cxx
45 test_MPI_Access_Cyclic_ISend_IRecv.cxx
46 test_MPI_Access_ISendRecv.cxx
47 test_MPI_Access_Probe.cxx
48 test_MPI_Access_IProbe.cxx
49 test_MPI_Access_Cancel.cxx
50 test_MPI_Access_Send_Recv_Length.cxx
51 test_MPI_Access_ISend_IRecv_Length.cxx
52 test_MPI_Access_ISend_IRecv_Length_1.cxx
53 test_MPI_Access_Time.cxx
54 test_MPI_Access_Time_0.cxx
55 test_MPI_Access_ISend_IRecv_BottleNeck.cxx
58 ADD_LIBRARY(MPIAccessTest ${MPIAccessTest_SOURCES})
59 SET_TARGET_PROPERTIES(MPIAccessTest PROPERTIES COMPILE_FLAGS "")
60 TARGET_LINK_LIBRARIES(MPIAccessTest paramedmem ${CPPUNIT_LIBRARIES})
61 INSTALL(TARGETS MPIAccessTest DESTINATION ${MEDCOUPLING_INSTALL_LIBS})
64 SET(TestMPIAccessDEC_SOURCES
67 LIST(APPEND TESTSMPIAccess TestMPIAccessDEC)
69 SET(TestMPIAccess_SOURCES
72 LIST(APPEND TESTSMPIAccess TestMPIAccess)
74 FOREACH(bintest ${TESTSMPIAccess})
75 ADD_EXECUTABLE(${bintest} ${${bintest}_SOURCES})
76 TARGET_LINK_LIBRARIES(${bintest} MPIAccessTest)
80 SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
82 # -- some tests require 2, 3, 4 or 5 procs --
83 # MPICH does not support --oversubscribe:
84 IF(NOT ${MPIEXEC_EXECUTABLE} MATCHES "mpich")
85 SET(_oversub_opt "--oversubscribe")
88 ADD_TEST(NAME TestMPIAccess_Proc2 COMMAND ${MPIEXEC} -np 2 ${_oversub_opt} $<TARGET_FILE:TestMPIAccess>)
89 SET_TESTS_PROPERTIES(TestMPIAccess_Proc2 PROPERTIES ENVIRONMENT "${tests_env}")
90 ADD_TEST(NAME TestMPIAccess_Proc3 COMMAND ${MPIEXEC} -np 3 ${_oversub_opt} $<TARGET_FILE:TestMPIAccess>)
91 SET_TESTS_PROPERTIES(TestMPIAccess_Proc3 PROPERTIES ENVIRONMENT "${tests_env}")
93 ADD_TEST(NAME TestMPIAccessDEC_Proc4 COMMAND ${MPIEXEC} -np 4 ${_oversub_opt} $<TARGET_FILE:TestMPIAccessDEC>)
94 SET_TESTS_PROPERTIES(TestMPIAccessDEC_Proc4 PROPERTIES ENVIRONMENT "${tests_env}")
97 INSTALL(TARGETS ${TESTSMPIAccess} DESTINATION ${MEDCOUPLING_INSTALL_BINS})
98 SET(COMMON_HEADERS_HXX
102 INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${MEDCOUPLING_INSTALL_HEADERS})