From 303946b912534d9e857c8b6f2725beca80e86c3e Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Wed, 16 Mar 2016 16:25:24 +0100 Subject: [PATCH] rename SMPI macro related tests and kill dumb ones (a.k.a old examples) --- .gitignore | 10 ++----- teshsuite/smpi/CMakeLists.txt | 30 ++++++++++++------- teshsuite/smpi/compute/CMakeLists.txt | 27 ----------------- teshsuite/smpi/compute/compute.c | 28 ----------------- teshsuite/smpi/compute/compute2.c | 30 ------------------- .../macro-sample.c} | 0 .../macro-sample.tesh} | 14 +-------- .../shared.c => macro-shared/macro-shared.c} | 0 .../macro-shared.tesh} | 2 +- teshsuite/smpi/shared/CMakeLists.txt | 17 ----------- tools/cmake/DefinePackages.cmake | 2 -- 11 files changed, 23 insertions(+), 137 deletions(-) delete mode 100644 teshsuite/smpi/compute/CMakeLists.txt delete mode 100644 teshsuite/smpi/compute/compute.c delete mode 100644 teshsuite/smpi/compute/compute2.c rename teshsuite/smpi/{compute/compute3.c => macro-sample/macro-sample.c} (100%) rename teshsuite/smpi/{compute/compute.tesh => macro-sample/macro-sample.tesh} (71%) rename teshsuite/smpi/{shared/shared.c => macro-shared/macro-shared.c} (100%) rename teshsuite/smpi/{shared/shared.tesh => macro-shared/macro-shared.tesh} (94%) delete mode 100644 teshsuite/smpi/shared/CMakeLists.txt diff --git a/.gitignore b/.gitignore index 645753a6c0..b041b0030b 100644 --- a/.gitignore +++ b/.gitignore @@ -315,10 +315,7 @@ teshsuite/smpi/coll-alltoallv/coll-alltoallv teshsuite/smpi/coll-bcast/coll-bcast teshsuite/smpi/coll-barrier/coll-barrier teshsuite/smpi/coll-gather/coll-gather -teshsuite/smpi/compute/compute -teshsuite/smpi/compute/compute2 -teshsuite/smpi/compute/compute3 -teshsuite/smpi/dsend +teshsuite/smpi/macro-sample/macro-sample teshsuite/smpi/type-hvector/type-hvector teshsuite/smpi/type-indexed/type-indexed teshsuite/smpi/isp/umpire/abort @@ -981,11 +978,8 @@ teshsuite/smpi/pt2pt-pingpong/pt2pt-pingpong teshsuite/smpi/coll-reduce/coll-reduce teshsuite/smpi/coll-reduce-scatter/coll-reduce-scatter teshsuite/smpi/coll-scatter/coll-scatter -teshsuite/smpi/shared/shared -teshsuite/smpi/smpi_sendrecv -teshsuite/smpi/split +teshsuite/smpi/macro-shared/macro-shared teshsuite/smpi/type-struct/type-struct -teshsuite/smpi/ttest01 teshsuite/smpi/type-vector/type-vector teshsuite/surf/lmm_usage/lmm_usage teshsuite/surf/maxmin_bench/maxmin_bench diff --git a/teshsuite/smpi/CMakeLists.txt b/teshsuite/smpi/CMakeLists.txt index 6c12f2cc05..5a1d6de78e 100644 --- a/teshsuite/smpi/CMakeLists.txt +++ b/teshsuite/smpi/CMakeLists.txt @@ -7,7 +7,7 @@ if(enable_smpi) include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") foreach(x coll-allgather coll-allgatherv coll-allreduce coll-alltoall coll-alltoallv coll-barrier coll-bcast - coll-gather coll-reduce coll-reduce-scatter coll-scatter pt2pt-dsend pt2pt-pingpong + coll-gather coll-reduce coll-reduce-scatter coll-scatter macro-sample pt2pt-dsend pt2pt-pingpong type-hvector type-indexed type-struct type-vector bug-17132) add_executable (${x} ${x}/${x}.c) target_link_libraries(${x} simgrid) @@ -19,6 +19,14 @@ if(enable_smpi) 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() + if(NOT WIN32) + add_executable (macro-shared macro-shared/macro-shared.c) + target_link_libraries(macro-shared simgrid) + set_target_properties(macro-shared PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/macro-shared) + + ADD_TESH_FACTORIES(tesh-smpi-macro-shared "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-shared --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/macro-shared macro-shared.tesh) + endif() + foreach (ALLGATHER 2dmesh 3dmesh bruck GB loosely_lr NTSLR_NB pair rdb rhv ring SMP_NTS smp_simple spreading_simple ompi mpich ompi_neighborexchange mvapich2 mvapich2_smp impi) ADD_TESH(tesh-smpi-coll-allgather-${ALLGATHER} --cfg smpi/allgather:${ALLGATHER} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/coll-allgather --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/coll-allgather coll-allgather.tesh) @@ -72,23 +80,23 @@ if(enable_smpi) ADD_TESH(tesh-smpi-coll-scatter-${SCATTER} --cfg smpi/scatter:${SCATTER} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/coll-scatter --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/coll-scatter coll-scatter.tesh) endforeach() -# Extra allreduce test: large automatic -ADD_TESH(tesh-smpi-coll-allreduce-large --cfg smpi/allreduce:ompi_ring_segmented --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/coll-allreduce --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/coll-allreduce coll-allreduce-large.tesh) -ADD_TESH(tesh-smpi-coll-allreduce-automatic --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/coll-allreduce --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/coll-allreduce coll-allreduce-automatic.tesh) - -# Extra allreduce test: cluster-types -ADD_TESH(tesh-smpi-cluster-types --cfg smpi/alltoall:mvapich2 --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/coll-alltoall --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/coll-alltoall clusters.tesh) + # Extra allreduce test: large automatic + ADD_TESH(tesh-smpi-coll-allreduce-large --cfg smpi/allreduce:ompi_ring_segmented --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/coll-allreduce --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/coll-allreduce coll-allreduce-large.tesh) + ADD_TESH(tesh-smpi-coll-allreduce-automatic --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/coll-allreduce --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/coll-allreduce coll-allreduce-automatic.tesh) -# Extra pt2pt pingpong test: broken usage ti-tracing -ADD_TESH_FACTORIES(tesh-smpi-broken "thread" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/pt2pt-pingpong --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt-pingpong broken_hostfiles.tesh) -ADD_TESH(tesh-smpi-replay-ti-tracing --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/pt2pt-pingpong --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt-pingpong TI_output.tesh) + # Extra allreduce test: cluster-types + ADD_TESH(tesh-smpi-cluster-types --cfg smpi/alltoall:mvapich2 --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/coll-alltoall --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/coll-alltoall clusters.tesh) + # Extra pt2pt pingpong test: broken usage ti-tracing + ADD_TESH_FACTORIES(tesh-smpi-broken "thread" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/pt2pt-pingpong --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt-pingpong broken_hostfiles.tesh) + ADD_TESH(tesh-smpi-replay-ti-tracing --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/pt2pt-pingpong --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt-pingpong TI_output.tesh) endif() -set(teshsuite_src ${teshsuite_src} PARENT_SCOPE) +set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/macro-shared/macro-shared.c PARENT_SCOPE) set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/coll-allreduce/coll-allreduce-large.tesh ${CMAKE_CURRENT_SOURCE_DIR}/coll-allreduce/coll-allreduce-automatic.tesh ${CMAKE_CURRENT_SOURCE_DIR}/coll-alltoall/clusters.tesh + ${CMAKE_CURRENT_SOURCE_DIR}/macro-shared/macro-shared.tesh ${CMAKE_CURRENT_SOURCE_DIR}/pt2pt-pingpong/broken_hostfiles.tesh ${CMAKE_CURRENT_SOURCE_DIR}/pt2pt-pingpong/TI_output.tesh PARENT_SCOPE) set(bin_files ${bin_files} ${CMAKE_CURRENT_SOURCE_DIR}/hostfile diff --git a/teshsuite/smpi/compute/CMakeLists.txt b/teshsuite/smpi/compute/CMakeLists.txt deleted file mode 100644 index fc11182c96..0000000000 --- a/teshsuite/smpi/compute/CMakeLists.txt +++ /dev/null @@ -1,27 +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 (compute compute.c) - target_link_libraries(compute simgrid) - add_executable (compute2 compute2.c) - target_link_libraries(compute2 simgrid) - add_executable (compute3 compute3.c) - target_link_libraries(compute3 simgrid) - 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) -endif() - -set(tesh_files - ${tesh_files} - ${CMAKE_CURRENT_SOURCE_DIR}/compute.tesh - PARENT_SCOPE) -set(examples_src - ${examples_src} - ${CMAKE_CURRENT_SOURCE_DIR}/compute.c - ${CMAKE_CURRENT_SOURCE_DIR}/compute2.c - ${CMAKE_CURRENT_SOURCE_DIR}/compute3.c - PARENT_SCOPE) diff --git a/teshsuite/smpi/compute/compute.c b/teshsuite/smpi/compute/compute.c deleted file mode 100644 index 92bce0f1e1..0000000000 --- a/teshsuite/smpi/compute/compute.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (c) 2009-2010, 2012-2014. The SimGrid Team. - * All rights reserved. */ - -/* This program is free software; you can redistribute it and/or modify it - * under the terms of the license (GNU LGPL) which comes with this package. */ - -#include -#include - -int main(int argc, char *argv[]) -{ - int i, n; - double d; - MPI_Init(&argc, &argv); - n = argc > 1 ? atoi(argv[1]) : 0; - d = 2.0; - for (i = 0; i < n; i++) { - if (d < 10000) { - d = d * d; - } else { - d = 2; - } - } - printf("%d %f\n", i, d); - MPI_Comm_rank(MPI_COMM_WORLD, &i); - MPI_Finalize(); - return 0; -} diff --git a/teshsuite/smpi/compute/compute2.c b/teshsuite/smpi/compute/compute2.c deleted file mode 100644 index 3102858088..0000000000 --- a/teshsuite/smpi/compute/compute2.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (c) 2009-2010, 2012-2014. The SimGrid Team. - * All rights reserved. */ - -/* This program is free software; you can redistribute it and/or modify it - * under the terms of the license (GNU LGPL) which comes with this package. */ - -#include -#include - -int main(int argc, char *argv[]) -{ - int i, n; - double d; - MPI_Init(&argc, &argv); - n = argc > 1 ? atoi(argv[1]) : 0; - d = 2.0; - /* Run it only once across the whole set of processes */ - SMPI_SAMPLE_GLOBAL(1, -1) { - for (i = 0; i < n; i++) { - if (d < 10000) { - d = d * d; - } else { - d = 2; - } - } - printf("%d %f\n", i, d); - } - MPI_Finalize(); - return 0; -} diff --git a/teshsuite/smpi/compute/compute3.c b/teshsuite/smpi/macro-sample/macro-sample.c similarity index 100% rename from teshsuite/smpi/compute/compute3.c rename to teshsuite/smpi/macro-sample/macro-sample.c diff --git a/teshsuite/smpi/compute/compute.tesh b/teshsuite/smpi/macro-sample/macro-sample.tesh similarity index 71% rename from teshsuite/smpi/compute/compute.tesh rename to teshsuite/smpi/macro-sample/macro-sample.tesh index 5757bbadbd..1404acb17c 100644 --- a/teshsuite/smpi/compute/compute.tesh +++ b/teshsuite/smpi/macro-sample/macro-sample.tesh @@ -1,19 +1,7 @@ -p Test compute -! timeout 5 -$ ${bindir:=.}/../../../bin/smpirun -hostfile ../hostfile -platform ../../../examples/platforms/small_platform_with_routers.xml -np 3 --log=root.thres:warning ${bindir:=.}/compute 7 --log=smpi_kernel.thres:warning -> 7 16.000000 -> 7 16.000000 -> 7 16.000000 - -p Test compute only once -! timeout 5 -$ ${bindir:=.}/../../../bin/smpirun -hostfile ../hostfile -platform ../../../examples/platforms/small_platform_with_routers.xml -np 3 --log=root.thres:warning ${bindir:=.}/compute2 7 --log=smpi_kernel.thres:warning -> 7 16.000000 - p Test compute and bench ! output sort ! timeout 45 -$ ${bindir:=.}/../../../bin/smpirun -hostfile ../hostfile -platform ../../../examples/platforms/small_platform_with_routers.xml -np 3 --log=root.thres:warning ${bindir:=.}/compute3 quiet --log=smpi_kernel.thres:warning +$ ${bindir:=.}/../../../bin/smpirun -hostfile ../hostfile -platform ../../../examples/platforms/small_platform_with_routers.xml -np 3 --log=root.thres:warning ${bindir:=.}/macro-sample quiet --log=smpi_kernel.thres:warning > (0) Run the first computation. It's globally benched, and I want no more than 4 benchmarks (thres<0) > (0) Run the first computation. It's globally benched, and I want no more than 4 benchmarks (thres<0) > (0) Run the first computation. It's globally benched, and I want no more than 4 benchmarks (thres<0) diff --git a/teshsuite/smpi/shared/shared.c b/teshsuite/smpi/macro-shared/macro-shared.c similarity index 100% rename from teshsuite/smpi/shared/shared.c rename to teshsuite/smpi/macro-shared/macro-shared.c diff --git a/teshsuite/smpi/shared/shared.tesh b/teshsuite/smpi/macro-shared/macro-shared.tesh similarity index 94% rename from teshsuite/smpi/shared/shared.tesh rename to teshsuite/smpi/macro-shared/macro-shared.tesh index c713955521..169af5d6e4 100644 --- a/teshsuite/smpi/shared/shared.tesh +++ b/teshsuite/smpi/macro-shared/macro-shared.tesh @@ -2,7 +2,7 @@ p Test compute ! setenv LD_LIBRARY_PATH=../../lib ! output sort ! timeout 5 -$ ${bindir:=.}/../../../bin/smpirun -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/shared --log=smpi_kernel.thres:warning +$ ${bindir:=.}/../../../bin/smpirun -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/macro-shared --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/shared/CMakeLists.txt b/teshsuite/smpi/shared/CMakeLists.txt deleted file mode 100644 index 170f5ce311..0000000000 --- a/teshsuite/smpi/shared/CMakeLists.txt +++ /dev/null @@ -1,17 +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") - - if(NOT WIN32) - add_executable (shared shared.c) - target_link_libraries(shared simgrid) - ADD_TESH_FACTORIES(tesh-smpi-shared "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/shared --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/shared shared.tesh) - endif() -endif() - -set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/shared.tesh PARENT_SCOPE) -set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/shared.c PARENT_SCOPE) diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 8d93d21924..6afb9b4b41 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -1009,8 +1009,6 @@ set(CMAKEFILES_TXT teshsuite/simix/stack_overflow/CMakeLists.txt teshsuite/smpi/CMakeLists.txt - teshsuite/smpi/compute/CMakeLists.txt - teshsuite/smpi/shared/CMakeLists.txt teshsuite/smpi/isp/umpire/CMakeLists.txt teshsuite/smpi/mpich3-test/CMakeLists.txt teshsuite/smpi/mpich3-test/attr/CMakeLists.txt -- 2.20.1