-cmake_minimum_required(VERSION 2.6)
-
if(enable_smpi AND enable_smpi_MPICH3_testsuite)
if(WIN32)
set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
endif()
- set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
- include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
+ include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/")
add_executable(allgather2 allgather2.c)
add_executable(allgather3 allgather3.c)
+ add_executable(allgather_struct allgather_struct.c)
add_executable(allgatherv2 allgatherv2.c)
add_executable(allgatherv3 allgatherv3.c)
- add_executable(allgatherv4 allgatherv4.c)
+ if(HAVE_PRIVATIZATION)
+ add_executable(allgatherv4 allgatherv4.c)
+ else()
+ add_executable(allgatherv4 allgatherv4_manual.c)
+ endif()
add_executable(allred2 allred2.c)
add_executable(allred3 allred3.c)
add_executable(allred4 allred4.c)
add_executable(allred5 allred5.c)
add_executable(allred6 allred6.c)
-# add_executable(allred allred.c)
+ if(HAVE_PRIVATIZATION)
+ add_executable(allred allred.c)
+ else()
+ add_executable(allred allred_manual.c)
+ endif()
add_executable(allredmany allredmany.c)
add_executable(alltoall1 alltoall1.c)
add_executable(alltoallv0 alltoallv0.c)
# add_executable(alltoallw1 alltoallw1.c)
# add_executable(alltoallw2 alltoallw2.c)
# add_executable(alltoallw_zeros alltoallw_zeros.c)
-# add_executable(bcast2 bcast2.c)
-# add_executable(bcast3 bcast3.c)
+ add_executable(bcast_full bcast.c)
+ add_executable(bcast_min_datatypes bcast.c)
+ add_executable(bcast_comm_world bcast.c)
add_executable(bcasttest bcasttest.c)
add_executable(bcastzerotype bcastzerotype.c)
add_executable(coll10 coll10.c)
add_executable(exscan2 exscan2.c)
add_executable(exscan exscan.c)
add_executable(gather2 gather2.c)
-# add_executable(gather2_save gather2_save.c)
+ add_executable(gather_big gather_big.c)
add_executable(gather gather.c)
- add_executable(iallred iallred.c)
- add_executable(ibarrier ibarrier.c)
+# add_executable(iallred iallred.c)
+# add_executable(ibarrier ibarrier.c)
# add_executable(icallgather icallgather.c)
# add_executable(icallgatherv icallgatherv.c)
# add_executable(icallreduce icallreduce.c)
# add_executable(icscatter icscatter.c)
# add_executable(icscatterv icscatterv.c)
add_executable(longuser longuser.c)
- add_executable(nonblocking2 nonblocking2.c)
- add_executable(nonblocking3 nonblocking3.c)
- add_executable(nonblocking nonblocking.c)
+# add_executable(nonblocking2 nonblocking2.c)
+# add_executable(nonblocking3 nonblocking3.c)
+# add_executable(nonblocking nonblocking.c)
# add_executable(opband opband.c)
# add_executable(opbor opbor.c)
# add_executable(opbxor opbxor.c)
add_executable(scatter2 scatter2.c)
add_executable(scatter3 scatter3.c)
add_executable(scattern scattern.c)
-# add_executable(scatterv scatterv.c)
+ add_executable(scatterv scatterv.c)
# add_executable(uoplong uoplong.c)
target_link_libraries(allgather2 simgrid mtest_c)
target_link_libraries(allgather3 simgrid mtest_c)
+ target_link_libraries(allgather_struct simgrid mtest_c)
target_link_libraries(allgatherv2 simgrid mtest_c)
target_link_libraries(allgatherv3 simgrid mtest_c)
target_link_libraries(allgatherv4 simgrid mtest_c)
target_link_libraries(allred4 simgrid mtest_c)
target_link_libraries(allred5 simgrid mtest_c)
target_link_libraries(allred6 simgrid mtest_c)
-# target_link_libraries(allred simgrid mtest_c)
+ target_link_libraries(allred simgrid mtest_c)
target_link_libraries(allredmany simgrid mtest_c)
target_link_libraries(alltoall1 simgrid mtest_c)
target_link_libraries(alltoallv0 simgrid mtest_c)
# target_link_libraries(alltoallw1 simgrid mtest_c)
# target_link_libraries(alltoallw2 simgrid mtest_c)
# target_link_libraries(alltoallw_zeros simgrid mtest_c)
-# target_link_libraries(bcast2 simgrid mtest_c)
-# target_link_libraries(bcast3 simgrid mtest_c)
+ target_link_libraries(bcast_full simgrid mtest_c)
+ target_link_libraries(bcast_min_datatypes simgrid mtest_c)
+ target_link_libraries(bcast_comm_world simgrid mtest_c)
target_link_libraries(bcasttest simgrid mtest_c)
target_link_libraries(bcastzerotype simgrid mtest_c)
target_link_libraries(coll10 simgrid mtest_c)
target_link_libraries(exscan2 simgrid mtest_c)
target_link_libraries(exscan simgrid mtest_c)
target_link_libraries(gather2 simgrid mtest_c)
-# target_link_libraries(gather2_save simgrid mtest_c)
+ target_link_libraries(gather_big simgrid mtest_c)
target_link_libraries(gather simgrid mtest_c)
- target_link_libraries(iallred simgrid mtest_c)
- target_link_libraries(ibarrier simgrid mtest_c)
+# target_link_libraries(iallred simgrid mtest_c)
+# target_link_libraries(ibarrier simgrid mtest_c)
# target_link_libraries(icallgather simgrid mtest_c)
# target_link_libraries(icallgatherv simgrid mtest_c)
# target_link_libraries(icallreduce simgrid mtest_c)
# target_link_libraries(icscatter simgrid mtest_c)
# target_link_libraries(icscatterv simgrid mtest_c)
target_link_libraries(longuser simgrid mtest_c)
- target_link_libraries(nonblocking2 simgrid mtest_c)
- target_link_libraries(nonblocking3 simgrid mtest_c)
- target_link_libraries(nonblocking simgrid mtest_c)
+# target_link_libraries(nonblocking2 simgrid mtest_c)
+# target_link_libraries(nonblocking3 simgrid mtest_c)
+# target_link_libraries(nonblocking simgrid mtest_c)
# target_link_libraries(opband simgrid mtest_c)
# target_link_libraries(opbor simgrid mtest_c)
# target_link_libraries(opbxor simgrid mtest_c)
target_link_libraries(scatter2 simgrid mtest_c)
target_link_libraries(scatter3 simgrid mtest_c)
target_link_libraries(scattern simgrid mtest_c)
-# target_link_libraries(scatterv simgrid mtest_c)
+ target_link_libraries(scatterv simgrid mtest_c)
# target_link_libraries(uoplong simgrid mtest_c)
+ set_target_properties(allred PROPERTIES COMPILE_FLAGS "-O0" LINK_FLAGS "-O0")
+ set_target_properties(bcast_min_datatypes PROPERTIES COMPILE_FLAGS "-DBCAST_MIN_DATATYPES_ONLY" LINK_FLAGS "-DBCAST_MIN_DATATYPES_ONLY")
+ set_target_properties(bcast_comm_world PROPERTIES COMPILE_FLAGS "-DBCAST_COMM_WORLD_ONLY" LINK_FLAGS "-DBCAST_COMM_WORLD_ONLY")
+
+ # These tests take 5 to 15 seconds to run, so we don't want to run them several times.
+ # But at the same time, we'd like to check if they work for all factories and all privatization algorithm
+ # Thus the current matrix
+
+ MACRO(ADD_MPICH3_COLL SELECTOR FACTORY PRIVATIZATION)
+ set(NAME "test-smpi-mpich3-coll-${SELECTOR}")
+ set(ARGS "-execarg=--cfg=smpi/coll-selector:${SELECTOR}" ${ARGN})
+ if(NOT "${PRIVATIZATION}" STREQUAL "" AND HAVE_PRIVATIZATION)
+ set(NAME "${NAME}-${PRIVATIZATION}")
+ set(ARGS ${ARGS} "-execarg=--cfg=smpi/privatization:${PRIVATIZATION}")
+ endif()
+ string(TOUPPER "HAVE_${FACTORY}_CONTEXTS" HAVE_FACTORY)
+ if(NOT "${FACTORY}" STREQUAL "" AND ${HAVE_FACTORY})
+ set(NAME "${NAME}-${FACTORY}")
+ set(ARGS ${ARGS} "-execarg=--cfg=contexts/factory:${FACTORY}")
+ endif()
+ ADD_TEST(${NAME} ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/coll ${PERL_EXECUTABLE} ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests "-wrapper=${TESH_WRAPPER}" -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/coll -tests=testlist ${ARGS})
+ SET_TESTS_PROPERTIES(${NAME} PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
+ ENDMACRO()
+
+ # Test default selector; default factory; default privatization
+ ADD_MPICH3_COLL(default "" "")
+
+ # Test OMPI selector: thread factory, dlopen privatization
+ ADD_MPICH3_COLL(ompi "thread" "dlopen" -execarg=--cfg=smpi/bcast:binomial_tree)
+
+ # Test MPICH selector: boost factory, dlopen privatization
+ ADD_MPICH3_COLL(mpich "boost" "dlopen")
+
+ # Test MVAPICH2 selector: ucontext factory, mmap privatization
+ ADD_MPICH3_COLL(mvapich2 "ucontext" "mmap")
+
+ # Test IMPI selector: raw factory, mmap privatization
+ ADD_MPICH3_COLL(impi "raw" "mmap")
+
endif()
-set(tesh_files
- ${tesh_files}
- PARENT_SCOPE
- )
-set(xml_files
- ${xml_files}
- PARENT_SCOPE
- )
-set(examples_src
- ${examples_src}
+set(examples_src ${examples_src}
${CMAKE_CURRENT_SOURCE_DIR}/allgather2.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/allgather_struct.c
${CMAKE_CURRENT_SOURCE_DIR}/allgather3.c
${CMAKE_CURRENT_SOURCE_DIR}/allgatherv2.c
${CMAKE_CURRENT_SOURCE_DIR}/allgatherv3.c
${CMAKE_CURRENT_SOURCE_DIR}/allgatherv4.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/allgatherv4_manual.c
${CMAKE_CURRENT_SOURCE_DIR}/allred2.c
${CMAKE_CURRENT_SOURCE_DIR}/allred3.c
${CMAKE_CURRENT_SOURCE_DIR}/allred4.c
${CMAKE_CURRENT_SOURCE_DIR}/allred5.c
${CMAKE_CURRENT_SOURCE_DIR}/allred6.c
${CMAKE_CURRENT_SOURCE_DIR}/allred.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/allred_manual.c
${CMAKE_CURRENT_SOURCE_DIR}/allredmany.c
${CMAKE_CURRENT_SOURCE_DIR}/alltoall1.c
${CMAKE_CURRENT_SOURCE_DIR}/alltoallv0.c
${CMAKE_CURRENT_SOURCE_DIR}/alltoallw1.c
${CMAKE_CURRENT_SOURCE_DIR}/alltoallw2.c
${CMAKE_CURRENT_SOURCE_DIR}/alltoallw_zeros.c
- ${CMAKE_CURRENT_SOURCE_DIR}/bcast2.c
- ${CMAKE_CURRENT_SOURCE_DIR}/bcast3.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/bcast.c
${CMAKE_CURRENT_SOURCE_DIR}/bcasttest.c
${CMAKE_CURRENT_SOURCE_DIR}/bcastzerotype.c
${CMAKE_CURRENT_SOURCE_DIR}/coll10.c
${CMAKE_CURRENT_SOURCE_DIR}/exscan2.c
${CMAKE_CURRENT_SOURCE_DIR}/exscan.c
${CMAKE_CURRENT_SOURCE_DIR}/gather2.c
- ${CMAKE_CURRENT_SOURCE_DIR}/gather2_save.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/gather_big.c
${CMAKE_CURRENT_SOURCE_DIR}/gather.c
${CMAKE_CURRENT_SOURCE_DIR}/iallred.c
${CMAKE_CURRENT_SOURCE_DIR}/ibarrier.c
${CMAKE_CURRENT_SOURCE_DIR}/scattern.c
${CMAKE_CURRENT_SOURCE_DIR}/scatterv.c
${CMAKE_CURRENT_SOURCE_DIR}/uoplong.c
- PARENT_SCOPE
- )
-set(bin_files
- ${bin_files}
- PARENT_SCOPE
- )
-set(txt_files
- ${txt_files}
- ${CMAKE_CURRENT_SOURCE_DIR}/testlist
- PARENT_SCOPE
- )
+ PARENT_SCOPE)
+set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/testlist PARENT_SCOPE)