Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
move smpi examples to teshsuite
authorAugustin Degomme <degomme@idpann.imag.fr>
Thu, 18 Oct 2012 11:00:37 +0000 (13:00 +0200)
committerAugustin Degomme <degomme@idpann.imag.fr>
Thu, 18 Oct 2012 13:39:24 +0000 (15:39 +0200)
35 files changed:
buildtools/Cmake/AddTests.cmake
buildtools/Cmake/DefinePackages.cmake
buildtools/Cmake/MakeExe.cmake
examples/smpi/CMakeLists.txt
teshsuite/smpi/CMakeLists.txt [new file with mode: 0644]
teshsuite/smpi/allreduce.c [moved from examples/smpi/allreduce.c with 100% similarity]
teshsuite/smpi/alltoall2.c [moved from examples/smpi/alltoall2.c with 100% similarity]
teshsuite/smpi/alltoall_basic.c [moved from examples/smpi/alltoall_basic.c with 100% similarity]
teshsuite/smpi/alltoallv.c [moved from examples/smpi/alltoallv.c with 100% similarity]
teshsuite/smpi/barrier.c [moved from examples/smpi/barrier.c with 100% similarity]
teshsuite/smpi/bcast.c [moved from examples/smpi/bcast.c with 100% similarity]
teshsuite/smpi/bcast.tesh [moved from examples/smpi/bcast.tesh with 91% similarity]
teshsuite/smpi/compute.c [moved from examples/smpi/compute.c with 100% similarity]
teshsuite/smpi/compute2.c [moved from examples/smpi/compute2.c with 100% similarity]
teshsuite/smpi/compute3.c [moved from examples/smpi/compute3.c with 100% similarity]
teshsuite/smpi/dsend.c [moved from examples/smpi/dsend.c with 100% similarity]
teshsuite/smpi/get_processor_name.c [moved from examples/smpi/get_processor_name.c with 100% similarity]
teshsuite/smpi/hostfile [new file with mode: 0644]
teshsuite/smpi/hvector.tesh [moved from examples/smpi/hvector.tesh with 62% similarity]
teshsuite/smpi/hvector_test.c [moved from examples/smpi/hvector_test.c with 100% similarity]
teshsuite/smpi/indexed.tesh [moved from examples/smpi/indexed.tesh with 92% similarity]
teshsuite/smpi/indexed_test.c [moved from examples/smpi/indexed_test.c with 100% similarity]
teshsuite/smpi/pingpong.c [moved from examples/smpi/pingpong.c with 100% similarity]
teshsuite/smpi/pt2pt.tesh [moved from examples/smpi/pt2pt.tesh with 93% similarity]
teshsuite/smpi/reduce.c [moved from examples/smpi/reduce.c with 100% similarity]
teshsuite/smpi/reduce.tesh [moved from examples/smpi/reduce.tesh with 92% similarity]
teshsuite/smpi/scatter.c [moved from examples/smpi/scatter.c with 100% similarity]
teshsuite/smpi/sendrecv.c [moved from examples/smpi/sendrecv.c with 100% similarity]
teshsuite/smpi/sendtest.c [moved from examples/smpi/sendtest.c with 100% similarity]
teshsuite/smpi/split.c [moved from examples/smpi/split.c with 100% similarity]
teshsuite/smpi/struct.tesh [moved from examples/smpi/struct.tesh with 90% similarity]
teshsuite/smpi/struct_test.c [moved from examples/smpi/struct_test.c with 100% similarity]
teshsuite/smpi/ttest01.c [moved from examples/smpi/ttest01.c with 100% similarity]
teshsuite/smpi/vector.tesh [moved from examples/smpi/vector.tesh with 94% similarity]
teshsuite/smpi/vector_test.c [moved from examples/smpi/vector_test.c with 100% similarity]

index 40e5175..f5f0d43 100644 (file)
@@ -468,29 +468,29 @@ if(NOT enable_memcheck)
 
   if(enable_smpi)
     # smpi examples
-    ADD_TEST(smpi-bcast-thread                  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/bcast.tesh)
-    ADD_TEST(smpi-reduce-thread                 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/reduce.tesh)
-    ADD_TEST(smpi-vector-thread                 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/vector.tesh)
-    ADD_TEST(smpi-indexed-thread                ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/indexed.tesh)
-    ADD_TEST(smpi-struct-thread                 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/struct.tesh)
-    ADD_TEST(smpi-pt2pt-thread                  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/pt2pt.tesh)
+    ADD_TEST(smpi-bcast-thread                  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/bcast.tesh)
+    ADD_TEST(smpi-reduce-thread                 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/reduce.tesh)
+    ADD_TEST(smpi-vector-thread                 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/vector.tesh)
+    ADD_TEST(smpi-indexed-thread                ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/indexed.tesh)
+    ADD_TEST(smpi-struct-thread                 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/struct.tesh)
+    ADD_TEST(smpi-pt2pt-thread                  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt.tesh)
 
     if(HAVE_RAWCTX)
-      ADD_TEST(smpi-bcast-raw                   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/bcast.tesh)
-      ADD_TEST(smpi-reduce-raw                  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/reduce.tesh)
-      ADD_TEST(smpi-vector-raw                  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/vector.tesh)
-      ADD_TEST(smpi-indexed-raw                 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/indexed.tesh)
-      ADD_TEST(smpi-struct-raw                  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/struct.tesh)
-      ADD_TEST(smpi-pt2pt-raw                   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/pt2pt.tesh)
+      ADD_TEST(smpi-bcast-raw                   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/bcast.tesh)
+      ADD_TEST(smpi-reduce-raw                  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/reduce.tesh)
+      ADD_TEST(smpi-vector-raw                  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/vector.tesh)
+      ADD_TEST(smpi-indexed-raw                 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/indexed.tesh)
+      ADD_TEST(smpi-struct-raw                  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/struct.tesh)
+      ADD_TEST(smpi-pt2pt-raw                   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt.tesh)
 
     endif(HAVE_RAWCTX)
     if(CONTEXT_UCONTEXT)
-      ADD_TEST(smpi-bcast-ucontext              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/bcast.tesh)
-      ADD_TEST(smpi-reduce-ucontext             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/reduce.tesh)
-      ADD_TEST(smpi-vector-ucontex              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/vector.tesh)
-      ADD_TEST(smpi-indexed-ucontext            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/indexed.tesh)
-      ADD_TEST(smpi-struct-ucontext             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/struct.tesh)
-      ADD_TEST(smpi-pt2pt-ucontext              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/pt2pt.tesh)
+      ADD_TEST(smpi-bcast-ucontext              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/bcast.tesh)
+      ADD_TEST(smpi-reduce-ucontext             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/reduce.tesh)
+      ADD_TEST(smpi-vector-ucontex              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/vector.tesh)
+      ADD_TEST(smpi-indexed-ucontext            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/indexed.tesh)
+      ADD_TEST(smpi-struct-ucontext             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/struct.tesh)
+      ADD_TEST(smpi-pt2pt-ucontext              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt.tesh)
     
     endif(CONTEXT_UCONTEXT)
     if(HAVE_TRACING)
index 5f609b0..8181b0c 100644 (file)
@@ -745,6 +745,7 @@ set(TESHSUITE_CMAKEFILES_TXT
   teshsuite/simdag/partask/CMakeLists.txt
   teshsuite/simdag/platforms/CMakeLists.txt
   teshsuite/xbt/CMakeLists.txt
+  teshsuite/smpi/CMakeLists.txt
   )
 
 set(TOOLS_CMAKEFILES_TXT
index 41f8d0e..87d8221 100644 (file)
@@ -29,6 +29,7 @@ add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/mxn)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/partask)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms)
+add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/msg)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/msg/trace)
 
index 3bf1d3a..b91a3c1 100644 (file)
@@ -7,67 +7,27 @@ if(enable_smpi)
 
   include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
 
-  add_executable(alltoall2 alltoall2.c )
-  add_executable(alltoall_basic alltoall_basic.c)
-  add_executable(alltoallv alltoallv.c)
-  add_executable(allreduce allreduce.c)
-  add_executable(bcast bcast.c)
+
   add_executable(bcbench bcbench.c)
-  add_executable(compute compute.c)
-  add_executable(compute2 compute2.c)
-  add_executable(compute3 compute3.c)
-  add_executable(pingpong pingpong.c)
-  add_executable(scatter scatter.c)
-  add_executable(reduce reduce.c)
-  add_executable(split split.c)
-  add_executable(dsend dsend.c)
   add_executable(mvmul mvmul.c)
-  add_executable(smpi_sendrecv sendrecv.c)
   add_executable(smpi_traced tracing/smpi_traced.c)
   add_executable(smpi_traced_simple tracing/smpi_traced_simple.c)
-  add_executable(ttest01 ttest01.c)
-  add_executable(vector_test vector_test.c)
-  add_executable(hvector_test hvector_test.c)
-  add_executable(indexed_test indexed_test.c)
-  add_executable(struct_test struct_test.c)
   add_executable(mc_bugged1 mc_bugged1.c)
   add_executable(mc_bugged2 mc_bugged2.c)
   add_executable(smpi_replay replay/replay.c)
 
-  target_link_libraries(alltoall2 m simgrid smpi )
-  target_link_libraries(alltoall_basic m simgrid smpi )
-  target_link_libraries(alltoallv m simgrid smpi )
-  target_link_libraries(allreduce m simgrid smpi )
-  target_link_libraries(bcast m simgrid smpi )
   target_link_libraries(bcbench m simgrid smpi )
-  target_link_libraries(compute m simgrid smpi )
-  target_link_libraries(compute2 m simgrid smpi )
-  target_link_libraries(compute3 m simgrid smpi )
-  target_link_libraries(pingpong m simgrid smpi )
-  target_link_libraries(scatter m simgrid smpi )
-  target_link_libraries(reduce m simgrid smpi )
-  target_link_libraries(split m simgrid smpi )
-  target_link_libraries(dsend m simgrid smpi )
   target_link_libraries(mvmul m simgrid smpi )
-  target_link_libraries(smpi_sendrecv m simgrid smpi )
   target_link_libraries(smpi_traced m simgrid smpi )
   target_link_libraries(smpi_traced_simple m simgrid smpi )
-  target_link_libraries(ttest01 m simgrid smpi )
-  target_link_libraries(vector_test m simgrid smpi )
-  target_link_libraries(hvector_test m simgrid smpi )
-  target_link_libraries(indexed_test m simgrid smpi )
-  target_link_libraries(struct_test m simgrid smpi )
   target_link_libraries(mc_bugged1 m simgrid smpi )
   target_link_libraries(mc_bugged2 m simgrid smpi )
   target_link_libraries(smpi_replay m simgrid smpi )
 
-  set_target_properties(smpi_sendrecv PROPERTIES RENAME sendrecv)
 endif(enable_smpi)
 
 set(tesh_files
   ${tesh_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/bcast.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/reduce.tesh
   ${CMAKE_CURRENT_SOURCE_DIR}/tracing/smpi_traced.tesh
   PARENT_SCOPE
   )
@@ -77,32 +37,10 @@ set(xml_files
   )
 set(examples_src
   ${examples_src}
-  ${CMAKE_CURRENT_SOURCE_DIR}/alltoallv.c
   ${CMAKE_CURRENT_SOURCE_DIR}/mc_bugged2.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/get_processor_name.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/pingpong.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/bcast.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/allreduce.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/alltoall_basic.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/sendrecv.c
   ${CMAKE_CURRENT_SOURCE_DIR}/mc_bugged1.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/reduce.c
   ${CMAKE_CURRENT_SOURCE_DIR}/mvmul.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/compute2.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/split.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/dsend.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/ttest01.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/compute.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/compute3.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/alltoall2.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/scatter.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/sendtest.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/barrier.c
   ${CMAKE_CURRENT_SOURCE_DIR}/bcbench.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/vector_test.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/hvector_test.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/indexed_test.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/struct_test.c
   ${CMAKE_CURRENT_SOURCE_DIR}/replay/replay.c
   ${CMAKE_CURRENT_SOURCE_DIR}/tracing/smpi_traced.c
   ${CMAKE_CURRENT_SOURCE_DIR}/tracing/smpi_traced_simple.c
diff --git a/teshsuite/smpi/CMakeLists.txt b/teshsuite/smpi/CMakeLists.txt
new file mode 100644 (file)
index 0000000..c5950e1
--- /dev/null
@@ -0,0 +1,97 @@
+cmake_minimum_required(VERSION 2.6)
+
+if(enable_smpi)
+  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/bin/smpicc")
+
+  set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
+
+  include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
+
+  add_executable(alltoall2 alltoall2.c )
+  add_executable(alltoall_basic alltoall_basic.c)
+  add_executable(alltoallv alltoallv.c)
+  add_executable(allreduce allreduce.c)
+  add_executable(bcast bcast.c)
+  add_executable(compute compute.c)
+  add_executable(compute2 compute2.c)
+  add_executable(compute3 compute3.c)
+  add_executable(pingpong pingpong.c)
+  add_executable(scatter scatter.c)
+  add_executable(reduce reduce.c)
+  add_executable(split split.c)
+  add_executable(dsend dsend.c)
+  add_executable(smpi_sendrecv sendrecv.c)
+  add_executable(ttest01 ttest01.c)
+  add_executable(vector_test vector_test.c)
+  add_executable(hvector_test hvector_test.c)
+  add_executable(indexed_test indexed_test.c)
+  add_executable(struct_test struct_test.c)
+
+  target_link_libraries(alltoall2 m simgrid smpi )
+  target_link_libraries(alltoall_basic m simgrid smpi )
+  target_link_libraries(alltoallv m simgrid smpi )
+  target_link_libraries(allreduce m simgrid smpi )
+  target_link_libraries(bcast m simgrid smpi )
+  target_link_libraries(compute m simgrid smpi )
+  target_link_libraries(compute2 m simgrid smpi )
+  target_link_libraries(compute3 m simgrid smpi )
+  target_link_libraries(pingpong m simgrid smpi )
+  target_link_libraries(scatter m simgrid smpi )
+  target_link_libraries(reduce m simgrid smpi )
+  target_link_libraries(split m simgrid smpi )
+  target_link_libraries(dsend m simgrid smpi )
+  target_link_libraries(smpi_sendrecv m simgrid smpi )
+  target_link_libraries(ttest01 m simgrid smpi )
+  target_link_libraries(vector_test m simgrid smpi )
+  target_link_libraries(hvector_test m simgrid smpi )
+  target_link_libraries(indexed_test m simgrid smpi )
+  target_link_libraries(struct_test m simgrid smpi )
+
+  set_target_properties(smpi_sendrecv PROPERTIES RENAME sendrecv)
+endif(enable_smpi)
+
+set(tesh_files
+  ${tesh_files}
+  ${CMAKE_CURRENT_SOURCE_DIR}/bcast.tesh
+  ${CMAKE_CURRENT_SOURCE_DIR}/reduce.tesh
+  PARENT_SCOPE
+  )
+set(xml_files
+  ${xml_files}
+  PARENT_SCOPE
+  )
+set(examples_src
+  ${examples_src}
+  ${CMAKE_CURRENT_SOURCE_DIR}/alltoallv.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/get_processor_name.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/pingpong.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/bcast.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/allreduce.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/alltoall_basic.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/sendrecv.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/reduce.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/compute2.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/split.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/dsend.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/ttest01.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/compute.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/compute3.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/alltoall2.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/scatter.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/sendtest.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/barrier.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/vector_test.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/hvector_test.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/indexed_test.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/struct_test.c
+  PARENT_SCOPE
+  )
+set(bin_files
+  ${bin_files}
+  ${CMAKE_CURRENT_SOURCE_DIR}/hostfile
+  PARENT_SCOPE
+  )
+set(txt_files
+  ${txt_files}
+  PARENT_SCOPE
+  )
similarity index 100%
rename from examples/smpi/bcast.c
rename to teshsuite/smpi/bcast.c
similarity index 91%
rename from examples/smpi/bcast.tesh
rename to teshsuite/smpi/bcast.tesh
index 5a40103..dc7a796 100644 (file)
@@ -2,7 +2,7 @@
 # (since we want to pass it to the child, it has to be redefined before each command)
 # Go for the first test
 p Test Broadcast with less processes than hosts
-$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../msg/small_platform.xml -np 3 ./bcast -q
+$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../examples/msg/small_platform.xml -np 3 ./bcast -q
 > [rank 0] -> Tremblay
 > [rank 1] -> Jupiter
 > [rank 2] -> Fafard
@@ -14,7 +14,7 @@ $ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/
 # second test
 p Test Broadcast with as much processes than hosts
 ! setenv LD_LIBRARY_PATH=../../lib
-$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../msg/small_platform.xml -np 5 ./bcast -q
+$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../examples/msg/small_platform.xml -np 5 ./bcast -q
 > [rank 0] -> Tremblay
 > [rank 1] -> Jupiter
 > [rank 2] -> Fafard
@@ -28,7 +28,7 @@ $ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/
 # Another test
 p Test Broadcast with more processes than hosts
 ! setenv LD_LIBRARY_PATH=../../lib
-$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../msg/small_platform.xml -np 12 ./bcast -q
+$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../examples/msg/small_platform.xml -np 12 ./bcast -q
 > You requested to use 12 processes, but there is only 5 processes in your hostfile...
 > [rank 0] -> Tremblay
 > [rank 1] -> Jupiter
similarity index 100%
rename from examples/smpi/dsend.c
rename to teshsuite/smpi/dsend.c
diff --git a/teshsuite/smpi/hostfile b/teshsuite/smpi/hostfile
new file mode 100644 (file)
index 0000000..ee2e281
--- /dev/null
@@ -0,0 +1,6 @@
+Tremblay
+Jupiter
+Fafard
+Ginette
+Bourassa
+         
\ No newline at end of file
similarity index 62%
rename from examples/smpi/hvector.tesh
rename to teshsuite/smpi/hvector.tesh
index e3399b2..9eb822d 100644 (file)
@@ -1,4 +1,4 @@
 p Test indexed
 ! setenv LD_LIBRARY_PATH=../../lib
 ! output sort
-$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../msg/small_platform.xml -np 2 ./indexed_test -q
+$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../examples/msg/small_platform.xml -np 2 ./indexed_test -q
similarity index 92%
rename from examples/smpi/indexed.tesh
rename to teshsuite/smpi/indexed.tesh
index 690c08e..2fffcea 100644 (file)
@@ -1,7 +1,7 @@
 p Test indexed
 ! setenv LD_LIBRARY_PATH=../../lib
 ! output sort
-$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../msg/small_platform.xml -np 2 ./indexed_test -q
+$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../examples/msg/small_platform.xml -np 2 ./indexed_test -q
 > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
similarity index 93%
rename from examples/smpi/pt2pt.tesh
rename to teshsuite/smpi/pt2pt.tesh
index ce70d88..8f424ef 100644 (file)
@@ -1,7 +1,7 @@
 p Test dsend
 ! setenv LD_LIBRARY_PATH=../../lib
 ! output sort
-$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../msg/small_platform.xml -np 2 ./dsend -q
+$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../examples/msg/small_platform.xml -np 2 ./dsend -q
 > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
@@ -15,7 +15,7 @@ $ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/
 p Test pingpong
 ! setenv LD_LIBRARY_PATH=../../lib
 ! output sort
-$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../msg/small_platform.xml -np 4 ./pingpong -q
+$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../examples/msg/small_platform.xml -np 4 ./pingpong -q
 > *** Ping-pong test (MPI_Send/MPI_Recv) ***
 > == pivot=0 : pingpong [0] <--> [1]
 > == pivot=1 : pingpong [1] <--> [2]
similarity index 92%
rename from examples/smpi/reduce.tesh
rename to teshsuite/smpi/reduce.tesh
index 4c7f93f..aa7dec0 100644 (file)
@@ -2,7 +2,7 @@
 # (since we want to pass it to the child, it has to be redefined before each command)
 # Go for the first test
 p Test Reduce with 3 processes
-$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../msg/small_platform.xml -np 3 ./reduce -q
+$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../examples/msg/small_platform.xml -np 3 ./reduce -q
 > [rank 0] -> Tremblay
 > [rank 1] -> Jupiter
 > [rank 2] -> Fafard
@@ -22,7 +22,7 @@ $ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/
 # second test
 ! setenv LD_LIBRARY_PATH=../../lib
 p Test Reduce with 5 processes
-$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../msg/small_platform.xml -np 5 ./reduce -q
+$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../examples/msg/small_platform.xml -np 5 ./reduce -q
 > [rank 0] -> Tremblay
 > [rank 1] -> Jupiter
 > [rank 2] -> Fafard
@@ -46,7 +46,7 @@ $ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/
 # third test
 ! setenv LD_LIBRARY_PATH=../../lib
 p Test Reduce with 12 processes
-$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../msg/small_platform.xml -np 12 ./reduce -q
+$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../examples/msg/small_platform.xml -np 12 ./reduce -q
 > You requested to use 12 processes, but there is only 5 processes in your hostfile...
 > [rank 0] -> Tremblay
 > [rank 1] -> Jupiter
similarity index 100%
rename from examples/smpi/split.c
rename to teshsuite/smpi/split.c
similarity index 90%
rename from examples/smpi/struct.tesh
rename to teshsuite/smpi/struct.tesh
index 0d3c6f3..2fd7c71 100644 (file)
@@ -1,7 +1,7 @@
 p Test struct
 ! setenv LD_LIBRARY_PATH=../../lib
 ! output sort
-$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../msg/small_platform.xml -np 2 ./struct_test -q
+$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../examples/msg/small_platform.xml -np 2 ./struct_test -q
 > Process 0 got -2 (-2?) and 8.000000 (8.0?), tab (should be all 0): 0 0 0 0 0 0 
 > Process 1 got -2 (-2?) and 8.000000 (8.0?), tab (should be all 0): 0 0 0 0 0 0 
 > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
similarity index 94%
rename from examples/smpi/vector.tesh
rename to teshsuite/smpi/vector.tesh
index 9004c89..83d4939 100644 (file)
@@ -1,7 +1,7 @@
 p Test vector
 ! setenv LD_LIBRARY_PATH=../../lib
 ! output sort
-$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../msg/small_platform.xml -np 2 ./vector_test -q
+$ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../examples/msg/small_platform.xml -np 2 ./vector_test -q
 > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'