Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
factoring cmake for smpi tests
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 4 Mar 2016 08:45:44 +0000 (09:45 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 4 Mar 2016 08:45:44 +0000 (09:45 +0100)
12 files changed:
teshsuite/smpi/CMakeLists.txt
teshsuite/smpi/hvector/CMakeLists.txt [deleted file]
teshsuite/smpi/struct/CMakeLists.txt [deleted file]
teshsuite/smpi/type-hvector/type-hvector.c [moved from teshsuite/smpi/hvector/hvector_test.c with 85% similarity]
teshsuite/smpi/type-hvector/type-hvector.tesh [moved from teshsuite/smpi/hvector/hvector.tesh with 95% similarity]
teshsuite/smpi/type-struct/type-struct.c [moved from teshsuite/smpi/struct/struct_test.c with 100% similarity]
teshsuite/smpi/type-struct/type-struct.tesh [moved from teshsuite/smpi/struct/struct.tesh with 91% similarity]
teshsuite/smpi/type-vector/type-vector.c [moved from teshsuite/smpi/vector/vector_test.c with 100% similarity]
teshsuite/smpi/type-vector/type-vector.tesh [moved from teshsuite/smpi/vector/vector.tesh with 95% similarity]
teshsuite/smpi/vector/CMakeLists.txt [deleted file]
tools/cmake/DefinePackages.cmake
tools/cmake/Tests.cmake

index 8c618ea..4e6f7a6 100644 (file)
@@ -5,20 +5,19 @@ if(enable_smpi)
     set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
   endif()
 
-#  include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
-#  foreach(x struct vector)
-#     add_executable       (${x}/${x} ${x}/${x}.c)
-#     target_link_libraries(${x}/ ${x} simgrid)
-#
-#     set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
-#     set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
-#
-#     ADD_TESH_FACTORIES(tesh-smpi-${x} "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/${x} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/${x} ${x}.tesh)
-#  endforeach()
+  include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
+  foreach(x type-hvector type-struct type-vector)
+    add_executable       (${x}/${x}  ${x}/${x}.c)
+    target_link_libraries(${x}/${x}  simgrid)
 
+    set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
+    set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
+
+    ADD_TESH_FACTORIES(tesh-smpi-${x} "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/${x} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/${x} ${x}.tesh)
+  endforeach()
 endif()
 
 set(bin_files       ${bin_files}      ${CMAKE_CURRENT_SOURCE_DIR}/hostfile
                                       ${CMAKE_CURRENT_SOURCE_DIR}/hostfile_coll  PARENT_SCOPE)
-set(teshsuite_src ${teshsuite_src}                                             PARENT_SCOPE)
-set(tesh_files    ${tesh_files}                                                PARENT_SCOPE)
+set(teshsuite_src ${teshsuite_src}                                             PARENT_SCOPE)
+set(tesh_files    ${tesh_files}                                                PARENT_SCOPE)
diff --git a/teshsuite/smpi/hvector/CMakeLists.txt b/teshsuite/smpi/hvector/CMakeLists.txt
deleted file mode 100644 (file)
index 5bea7ba..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-if(enable_smpi)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-  endif()
-  include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
-
-  add_executable       (hvector_test hvector_test.c)
-  target_link_libraries(hvector_test simgrid)
-endif()
-
-set(tesh_files
-  ${tesh_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/hvector.tesh
-  PARENT_SCOPE)
-set(examples_src
-  ${examples_src}
-  ${CMAKE_CURRENT_SOURCE_DIR}/hvector_test.c
-  PARENT_SCOPE)
diff --git a/teshsuite/smpi/struct/CMakeLists.txt b/teshsuite/smpi/struct/CMakeLists.txt
deleted file mode 100644 (file)
index cd6c90f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-if(enable_smpi)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-  endif()
-  include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
-
-  add_executable       (struct_test struct_test.c)
-  target_link_libraries(struct_test simgrid)
-
-  ADD_TESH_FACTORIES(tesh-smpi-struct "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/struct --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/struct struct.tesh)
-endif()
-
-set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/struct.tesh    PARENT_SCOPE)
-set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/struct_test.c  PARENT_SCOPE)
similarity index 85%
rename from teshsuite/smpi/hvector/hvector_test.c
rename to teshsuite/smpi/type-hvector/type-hvector.c
index f37f234..ef277ac 100644 (file)
@@ -9,7 +9,6 @@
 #define SIZE 4
 
 int main(int argc, char **argv) {
-
   int rank, i, j;
   double a[SIZE][SIZE] = {{0}};
 
@@ -28,19 +27,16 @@ int main(int argc, char **argv) {
           a[i][j] = i*SIZE+j;
     }
 
-    /* only one column is send
-     * this is an exemple for non-contignous data*/
+    /* only one column is send this is an exemple for non-contignous data*/
     MPI_Bcast(a, 1, columntype, 0, MPI_COMM_WORLD);
 
     for(i=0; i<SIZE; i++){
       for (j=0; j < SIZE; j++) {
-        printf("rank= %d, a[%d][%d]=%f\n",
-               rank, i, j, a[i][j]);
+        printf("rank= %d, a[%d][%d]=%f\n", rank, i, j, a[i][j]);
       }
       printf("\n");
     }
 
-
   MPI_Type_free(&columntype);
   MPI_Finalize();
   return 0;
similarity index 95%
rename from teshsuite/smpi/hvector/hvector.tesh
rename to teshsuite/smpi/type-hvector/type-hvector.tesh
index 7f69d18..4ac0fec 100644 (file)
@@ -1,7 +1,7 @@
 p Test hvector
 ! setenv LD_LIBRARY_PATH=../../lib
 ! output sort
-$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 2 ${bindir:=.}/hvector_test -q --log=smpi_kernel.thres:warning
+$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 2 ${bindir:=.}/type-hvector -q --log=smpi_kernel.thres:warning
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
similarity index 91%
rename from teshsuite/smpi/struct/struct.tesh
rename to teshsuite/smpi/type-struct/type-struct.tesh
index b876eb3..942ebc0 100644 (file)
@@ -1,7 +1,7 @@
 p Test struct
 ! setenv LD_LIBRARY_PATH=../../lib
 ! output sort
-$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 2 ${bindir:=.}/struct_test -q --log=smpi_kernel.thres:warning
+$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 2 ${bindir:=.}/type-struct -q --log=smpi_kernel.thres:warning
 > [rank 0] -> Tremblay
 > [rank 1] -> Jupiter
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
similarity index 95%
rename from teshsuite/smpi/vector/vector.tesh
rename to teshsuite/smpi/type-vector/type-vector.tesh
index da6bb83..27eb654 100644 (file)
@@ -1,7 +1,7 @@
 p Test vector
 ! setenv LD_LIBRARY_PATH=../../lib
 ! output sort
-$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ${srcdir:=.}/../../../examples/platforms/small_platform.xml -np 2 ${bindir:=.}/vector_test -q --log=smpi_kernel.thres:warning
+$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ${srcdir:=.}/../../../examples/platforms/small_platform.xml -np 2 ${bindir:=.}/type-vector -q --log=smpi_kernel.thres:warning
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
diff --git a/teshsuite/smpi/vector/CMakeLists.txt b/teshsuite/smpi/vector/CMakeLists.txt
deleted file mode 100644 (file)
index f9d1285..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-if(enable_smpi)
-  if(WIN32)
-    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
-  else()
-    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
-  endif()
-  include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
-
-  add_executable       (vector_test vector_test.c)
-  target_link_libraries(vector_test simgrid)
-
-  ADD_TESH_FACTORIES(tesh-smpi-vector "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/vector --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/vector vector.tesh)
-endif()
-
-set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/vector.tesh    PARENT_SCOPE)
-set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/vector_test.c  PARENT_SCOPE)
index 193e235..0ea82f6 100644 (file)
@@ -1061,14 +1061,11 @@ set(CMAKEFILES_TXT
   teshsuite/smpi/bcast/CMakeLists.txt
   teshsuite/smpi/compute/CMakeLists.txt
   teshsuite/smpi/gather/CMakeLists.txt
-  teshsuite/smpi/hvector/CMakeLists.txt
   teshsuite/smpi/indexed/CMakeLists.txt
   teshsuite/smpi/pingpong/CMakeLists.txt
   teshsuite/smpi/reduce/CMakeLists.txt
   teshsuite/smpi/scatter/CMakeLists.txt
   teshsuite/smpi/shared/CMakeLists.txt
-  teshsuite/smpi/struct/CMakeLists.txt
-  teshsuite/smpi/vector/CMakeLists.txt
   teshsuite/smpi/isp/umpire/CMakeLists.txt
   teshsuite/smpi/mpich3-test/CMakeLists.txt
   teshsuite/smpi/mpich3-test/attr/CMakeLists.txt
index 08799d8..772a7c6 100644 (file)
@@ -309,7 +309,6 @@ IF(NOT enable_memcheck)
     ADD_TESH_FACTORIES(tesh-smpi-pt2pt           "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/pingpong --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pingpong pt2pt.tesh)
     ADD_TESH_FACTORIES(tesh-smpi-bcast           "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/bcast --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/bcast bcast.tesh)
     ADD_TESH_FACTORIES(tesh-smpi-reduce          "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/reduce --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/reduce reduce.tesh)
-    ADD_TESH_FACTORIES(tesh-smpi-hvector         "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/hvector --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/hvector hvector.tesh)
     ADD_TESH_FACTORIES(tesh-smpi-indexed         "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/indexed --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/indexed indexed.tesh)
     ADD_TESH_FACTORIES(tesh-smpi-compute         "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/compute --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/compute compute.tesh)
     # smpi broken usage