Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
play with mpich3 cmake files
[simgrid.git] / teshsuite / smpi / mpich3-test / coll / CMakeLists.txt
index 71e3151..d6ccbc6 100644 (file)
@@ -1,5 +1,3 @@
-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")
@@ -8,21 +6,24 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
     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(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)
+  add_executable(allred allred.c)
   add_executable(allredmany allredmany.c)
   add_executable(alltoall1 alltoall1.c)
   add_executable(alltoallv0 alltoallv0.c)
@@ -51,8 +52,8 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
   add_executable(gather2 gather2.c)
 #  add_executable(gather2_save gather2_save.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)
@@ -67,9 +68,10 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
 #  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(nonblocking4 nonblocking4.c)
+#  add_executable(nonblocking nonblocking.c)
 #  add_executable(opband opband.c)
 #  add_executable(opbor opbor.c)
 #  add_executable(opbxor opbxor.c)
@@ -112,7 +114,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
   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)
@@ -141,8 +143,8 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
   target_link_libraries(gather2  simgrid mtest_c)
 #  target_link_libraries(gather2_save  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)
@@ -157,9 +159,10 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
 #  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(nonblocking4  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)
@@ -192,23 +195,32 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
   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")
+
+  if(HAVE_THREAD_CONTEXTS)
+    ADD_TEST(test-smpi-mpich3-coll-thread      ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/coll ${PERL_EXECUTABLE} ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/coll -tests=testlist -execarg=--cfg=contexts/factory:thread -execarg=--cfg=smpi/privatize_global_variables:${HAVE_PRIVATIZATION})
+    SET_TESTS_PROPERTIES(test-smpi-mpich3-coll-thread    PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
+  endif()
+  if(HAVE_UCONTEXT_CONTEXTS)
+    ADD_TEST(test-smpi-mpich3-coll-ompi-ucontext ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/coll ${PERL_EXECUTABLE} ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/coll -tests=testlist -execarg=--cfg=contexts/factory:ucontext -execarg=--cfg=smpi/coll_selector:ompi -execarg=--cfg=smpi/privatize_global_variables:${HAVE_PRIVATIZATION} -execarg=--cfg=smpi/bcast:binomial_tree)
+    SET_TESTS_PROPERTIES(test-smpi-mpich3-coll-ompi-ucontext PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
+  endif()
+  if(HAVE_RAW_CONTEXTS)
+    ADD_TEST(test-smpi-mpich3-coll-mpich-raw ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/coll ${PERL_EXECUTABLE} ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/coll -tests=testlist -execarg=--cfg=contexts/factory:raw -execarg=--cfg=smpi/coll_selector:mpich -execarg=--cfg=smpi/privatize_global_variables:${HAVE_PRIVATIZATION})
+    ADD_TEST(test-smpi-mpich3-coll-ompi-raw ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/coll ${PERL_EXECUTABLE} ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/coll -tests=testlist -execarg=--cfg=contexts/factory:raw -execarg=--cfg=smpi/coll_selector:ompi -execarg=--cfg=smpi/privatize_global_variables:${HAVE_PRIVATIZATION} -execarg=--cfg=smpi/bcast:binomial_tree)
+    ADD_TEST(test-smpi-mpich3-coll-mvapich2-raw ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/coll ${PERL_EXECUTABLE} ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/coll -tests=testlist -execarg=--cfg=contexts/factory:raw -execarg=--cfg=smpi/coll_selector:mvapich2 -execarg=--cfg=smpi/privatize_global_variables:${HAVE_PRIVATIZATION})
+    ADD_TEST(test-smpi-mpich3-coll-impi-raw ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/coll ${PERL_EXECUTABLE} ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/coll -tests=testlist -execarg=--cfg=contexts/factory:raw -execarg=--cfg=smpi/coll_selector:impi -execarg=--cfg=smpi/privatize_global_variables:${HAVE_PRIVATIZATION})
+    SET_TESTS_PROPERTIES(test-smpi-mpich3-coll-mpich-raw test-smpi-mpich3-coll-ompi-raw test-smpi-mpich3-coll-mpich-raw test-smpi-mpich3-coll-mvapich2-raw test-smpi-mpich3-coll-impi-raw  PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
+  endif()
 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}/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 
@@ -262,6 +274,7 @@ set(examples_src
  ${CMAKE_CURRENT_SOURCE_DIR}/nonblocking2.c 
  ${CMAKE_CURRENT_SOURCE_DIR}/nonblocking3.c 
  ${CMAKE_CURRENT_SOURCE_DIR}/nonblocking.c 
+ ${CMAKE_CURRENT_SOURCE_DIR}/nonblocking4.c
  ${CMAKE_CURRENT_SOURCE_DIR}/opband.c 
  ${CMAKE_CURRENT_SOURCE_DIR}/opbor.c 
  ${CMAKE_CURRENT_SOURCE_DIR}/opbxor.c 
@@ -293,14 +306,5 @@ set(examples_src
  ${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)