Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simplify allredude tests
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 7 Mar 2016 19:30:40 +0000 (20:30 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 7 Mar 2016 19:30:40 +0000 (20:30 +0100)
.gitignore
teshsuite/smpi/CMakeLists.txt
teshsuite/smpi/allreduce/CMakeLists.txt [deleted file]
teshsuite/smpi/allreduce/allreduce.c [deleted file]
teshsuite/smpi/coll-allreduce/coll-allreduce-automatic.tesh [moved from teshsuite/smpi/allreduce/allreduce_coll_automatic.tesh with 98% similarity]
teshsuite/smpi/coll-allreduce/coll-allreduce-large.tesh [moved from teshsuite/smpi/allreduce/allreduce_coll_large.tesh with 93% similarity]
teshsuite/smpi/coll-allreduce/coll-allreduce.c [moved from teshsuite/smpi/allreduce/allreduce_coll.c with 100% similarity]
teshsuite/smpi/coll-allreduce/coll-allreduce.tesh [moved from teshsuite/smpi/allreduce/allreduce_coll.tesh with 98% similarity]
tools/cmake/DefinePackages.cmake

index 541308e..85c4620 100644 (file)
@@ -315,9 +315,7 @@ teshsuite/simix/check_defaults/check_defaults
 teshsuite/simix/stack_overflow/stack_overflow
 teshsuite/smpi/coll-allgather/coll-allgather
 teshsuite/smpi/coll-allgatherv/coll-allgatherv
-teshsuite/smpi/allreduce/allreduce
-teshsuite/smpi/allreduce/allreduce_coll
-teshsuite/smpi/allreduce_coll
+teshsuite/smpi/coll-allreduce/coll-allreduce
 teshsuite/smpi/alltoall2
 teshsuite/smpi/alltoall/alltoall2
 teshsuite/smpi/alltoall/alltoall_basic
index 1230f78..7a72474 100644 (file)
@@ -6,7 +6,7 @@ if(enable_smpi)
   endif()
 
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
-  foreach(x coll-allgather coll-allgatherv coll-alltoallv coll-barrier coll-bcast coll-gather coll-scatter 
+  foreach(x coll-allgather coll-allgatherv coll-allreduce coll-alltoallv coll-barrier coll-bcast coll-gather coll-scatter 
             pt2pt-dsend pt2pt-pingpong type-hvector type-indexed type-struct type-vector)
     add_executable       (${x}  ${x}/${x}.c)
     target_link_libraries(${x}  simgrid)
@@ -27,6 +27,11 @@ if(enable_smpi)
     ADD_TESH(tesh-smpi-coll-allgatherv-${ALLGATHERV_COLL} --cfg smpi/allgatherv:${ALLGATHERV_COLL} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/coll-allgatherv --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/coll-allgatherv coll-allgatherv.tesh)
   endforeach()
 
+  foreach (ALLREDUCE_COLL lr rab1 rab2 rab_rdb rdb smp_binomial smp_binomial_pipeline smp_rdb smp_rsag smp_rsag_lr impi
+                          smp_rsag_rab redbcast ompi mpich ompi_ring_segmented mvapich2 mvapich2_rs mvapich2_two_level)
+    ADD_TESH(tesh-smpi-coll-allreduce-${ALLREDUCE_COLL} --cfg smpi/allreduce:${ALLREDUCE_COLL} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/coll-allreduce --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/coll-allreduce coll-allreduce.tesh)
+  endforeach()
+
   foreach (ALLTOALLV_COLL pair pair_light_barrier pair_mpi_barrier pair_one_barrier  ring ring_light_barrier
                           ring_mpi_barrier ring_one_barrier bruck ompi mpich mvapich2 ompi_basic_linear impi)
     ADD_TESH(tesh-smpi-coll-alltoallv-${ALLTOALLV_COLL} --cfg smpi/alltoallv:${ALLTOALLV_COLL} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/coll-alltoallv --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/coll-alltoallv coll-alltoallv.tesh)
@@ -52,13 +57,19 @@ if(enable_smpi)
   endforeach()
 endif()
 
+# 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)
 
-set(teshsuite_src ${teshsuite_src}                                                                    PARENT_SCOPE)
-set(tesh_files    ${tesh_files}     ${CMAKE_CURRENT_SOURCE_DIR}/pt2pt-pingpong/broken_hostfiles.tesh
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/pt2pt-pingpong/TI_output.tesh         PARENT_SCOPE)
+set(teshsuite_src ${teshsuite_src}                                                                         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}/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
                                     ${CMAKE_CURRENT_SOURCE_DIR}/hostfile_coll
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/hostfile_empty                        PARENT_SCOPE)
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/hostfile_empty                             PARENT_SCOPE)
diff --git a/teshsuite/smpi/allreduce/CMakeLists.txt b/teshsuite/smpi/allreduce/CMakeLists.txt
deleted file mode 100644 (file)
index 257aaee..0000000
+++ /dev/null
@@ -1,25 +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       (allreduce      allreduce.c)
-  target_link_libraries(allreduce      simgrid)
-  add_executable       (allreduce_coll allreduce_coll.c)
-  target_link_libraries(allreduce_coll simgrid)
-endif()
-
-set(tesh_files
-  ${tesh_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/allreduce_coll.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/allreduce_coll_large.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/allreduce_coll_automatic.tesh
-  PARENT_SCOPE)
-set(examples_src
-  ${examples_src}
-  ${CMAKE_CURRENT_SOURCE_DIR}/allreduce.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/allreduce_coll.c
-  PARENT_SCOPE)
diff --git a/teshsuite/smpi/allreduce/allreduce.c b/teshsuite/smpi/allreduce/allreduce.c
deleted file mode 100644 (file)
index a8044af..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Copyright (c) 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 <stdio.h>
-#include <mpi.h>
-
-/**
- * MESSAGE PASSING INTERFACE TEST CASE SUITE
- *
- * Copyright IBM Corp. 1995
- * 
- * IBM Corp. hereby grants a non-exclusive license to use, copy, modify, and
- *distribute this software for any purpose and without fee provided that the
- *above copyright notice and the following paragraphs appear in all copies.
-
- * IBM Corp. makes no representation that the test cases comprising this
- * suite are correct or are an accurate representation of any standard.
-
- * In no event shall IBM be liable to any party for direct, indirect, special
- * incidental, or consequential damage arising out of the use of this software
- * even if IBM Corp. has been advised of the possibility of such damage.
-
- * IBM CORP. SPECIFICALLY DISCLAIMS ANY WARRANTIES INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS AND IBM
- * CORP. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
- * ENHANCEMENTS, OR MODIFICATIONS.
- * ***************************************************************************
- **/
-static int ibm_test(int rank, int size)
-{
-  int success = 1;
-#define MAXLEN  10000
-
-  int root = 0, i, j, k;
-  int out[MAXLEN];
-  int in[MAXLEN];
-
-  for (j = 1; j <= MAXLEN; j *= 10) {
-    for (i = 0; i < j; i++)
-      out[i] = i;
-
-    MPI_Allreduce(out, in, j, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
-    MPI_Barrier(MPI_COMM_WORLD);
-
-    if (rank == root) {
-      for (k = 0; k < j; k++) {
-        if (in[k] != k * size) {
-          printf("bad answer (%d) at index %d of %d (should be %d)", in[k],
-                 k, j, k * size);
-          success = 0;
-          break;
-        }
-      }
-    }
-  }
-  return (success);
-}
-
-
-
-
-int main(int argc, char **argv)
-{
-  int size, rank;
-
-
-  MPI_Init(&argc, &argv);
-  MPI_Comm_size(MPI_COMM_WORLD, &size);
-  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-
-
-  if (0 == rank)
-    printf("** IBM Test Result: ... \n");
-  if (!ibm_test(rank, size))
-    printf("\t[%d] failed.\n", rank);
-  else
-    printf("\t[%d] ok.\n", rank);
-
-  MPI_Finalize();
-  return 0;
-}
@@ -3,7 +3,7 @@
 ! output sort 19
 
 p Test allreduce
-$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ../../../examples/platforms/small_platform.xml -np 16 --log=xbt_cfg.thres:critical ${bindir:=.}/allreduce_coll --log=smpi_kernel.thres:warning --log=smpi_coll.thres:error --cfg=smpi/allreduce:automatic --cfg=smpi/async_small_thresh:65536 --cfg=smpi/send_is_detached_thresh:128000 --cfg=smpi/running_power:-1 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ../../../examples/platforms/small_platform.xml -np 16 --log=xbt_cfg.thres:critical ${bindir:=.}/coll-allreduce --log=smpi_kernel.thres:warning --log=smpi_coll.thres:error --cfg=smpi/allreduce:automatic --cfg=smpi/async_small_thresh:65536 --cfg=smpi/send_is_detached_thresh:128000 --cfg=smpi/running_power:-1 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.420130] (5:4@Jupiter) The quickest allreduce was redbcast on rank 4 and took 0.007482
 > [  0.420130] (6:5@Jupiter) The quickest allreduce was redbcast on rank 5 and took 0.007513
 > [  0.420130] (7:6@Jupiter) The quickest allreduce was redbcast on rank 6 and took 0.007513
@@ -68,4 +68,3 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ..
 > [rank 7] -> Jupiter
 > [rank 8] -> Fafard
 > [rank 9] -> Fafard
-
@@ -4,7 +4,7 @@
 
 ! timeout 20
 p Test allreduce
-$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 --log=xbt_cfg.thres:critical ${bindir:=.}/allreduce_coll 300000 --log=smpi_kernel.thres:warning --log=smpi_coll.thres:error
+$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 --log=xbt_cfg.thres:critical ${bindir:=.}/coll-allreduce 300000 --log=smpi_kernel.thres:warning --log=smpi_coll.thres:error
 > [rank 0] -> Tremblay
 > [rank 1] -> Jupiter
 > [rank 2] -> Fafard
@@ -3,7 +3,7 @@
 ! output sort
 
 p Test allreduce
-$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ../../../examples/platforms/small_platform.xml -np 16 --log=xbt_cfg.thres:critical ${bindir:=.}/allreduce_coll --log=smpi_kernel.thres:warning --log=smpi_coll.thres:error
+$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ../../../examples/platforms/small_platform.xml -np 16 --log=xbt_cfg.thres:critical ${bindir:=.}/coll-allreduce --log=smpi_kernel.thres:warning --log=smpi_coll.thres:error
 > [rank 0] -> Tremblay
 > [rank 1] -> Tremblay
 > [rank 2] -> Tremblay
index b8213d5..f8b0ec3 100644 (file)
@@ -1016,7 +1016,6 @@ set(CMAKEFILES_TXT
   teshsuite/simix/stack_overflow/CMakeLists.txt
   
   teshsuite/smpi/CMakeLists.txt
-  teshsuite/smpi/allreduce/CMakeLists.txt
   teshsuite/smpi/alltoall/CMakeLists.txt
   teshsuite/smpi/compute/CMakeLists.txt
   teshsuite/smpi/reduce/CMakeLists.txt