teshsuite/smpi/mpich-test/pt2pt/waitall4
teshsuite/smpi/mpich-test/pt2pt/waitany
teshsuite/smpi/mpich-test/*/*.stdo
-teshsuite/smpi/pingpong/dsend
-teshsuite/smpi/pingpong/pingpong
+teshsuite/smpi/pt2pt-dsend/pt2pt-dsend
+teshsuite/smpi/pt2pt-pingpong/pt2pt-pingpong
teshsuite/smpi/reduce_coll
teshsuite/smpi/reduce/reduce
teshsuite/smpi/reduce/reduce_coll
include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
foreach(x coll-allgather coll-allgatherv coll-alltoallv coll-barrier coll-bcast coll-gather coll-scatter
- type-hvector type-indexed type-struct type-vector)
+ pt2pt-dsend pt2pt-pingpong type-hvector type-indexed type-struct type-vector)
add_executable (${x} ${x}/${x}.c)
target_link_libraries(${x} simgrid)
set_target_properties(${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
endforeach()
endif()
+# 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(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)
+ ${CMAKE_CURRENT_SOURCE_DIR}/hostfile_coll
+ ${CMAKE_CURRENT_SOURCE_DIR}/hostfile_empty PARENT_SCOPE)
+++ /dev/null
-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 (pingpong pingpong.c)
- target_link_libraries(pingpong simgrid)
- add_executable (dsend dsend.c)
- target_link_libraries(dsend simgrid)
-endif()
-
-set(tesh_files
- ${tesh_files}
- ${CMAKE_CURRENT_SOURCE_DIR}/pt2pt.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/TI_output.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/broken_hostfiles.tesh
- PARENT_SCOPE)
-set(examples_src
- ${examples_src}
- ${CMAKE_CURRENT_SOURCE_DIR}/dsend.c
- ${CMAKE_CURRENT_SOURCE_DIR}/pingpong.c
- PARENT_SCOPE)
-set(txt_files
- ${txt_files}
- ${CMAKE_CURRENT_SOURCE_DIR}/empty-hostfile.txt
- PARENT_SCOPE)
+++ /dev/null
-! setenv LD_LIBRARY_PATH=../../lib
-! expect return 1
-$ ${bindir:=.}/../../../bin/smpirun -hostfile empty-hostfile.txt -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/pingpong -q --log=smpi_kernel.thres:warning
-> [smpirun] ** error: the hostfile 'empty-hostfile.txt' is empty. Aborting.
-
-! expect return 1
-$ ${bindir:=.}/../../../bin/smpirun -hostfile hostfile-does-not-exist.txt -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/pingpong -q --log=smpi_kernel.thres:warning
-> [smpirun] ** error: the file 'hostfile-does-not-exist.txt' does not exist. Aborting.
int main(int argc, char *argv[]) {
int rank;
int data=11;
-
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-
+
if (rank==1) {
data=22;
MPI_Send(&data,1,MPI_INT,(rank+1)%2,666,MPI_COMM_WORLD);
-// smpi_sleep(1000);
} else {
MPI_Recv(&data,1,MPI_INT,MPI_ANY_SOURCE,666,MPI_COMM_WORLD,NULL);
if (data !=22) {
--- /dev/null
+p Test dsend
+! setenv LD_LIBRARY_PATH=../../lib
+! output sort
+$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 2 ${bindir:=.}/pt2pt-dsend -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'
+> [Jupiter:1:(2) 0.000000] [dsend/INFO] rank 1: data exchanged
+> [Tremblay:0:(1) 0.002945] [dsend/INFO] rank 0: data exchanged
+> [rank 0] -> Tremblay
+> [rank 1] -> Jupiter
p generate a trace with pingpong, and replay itself, then check that output trace of the second run is the same as in the first (once sorted)
! setenv LD_LIBRARY_PATH=../../lib
! output sort
-$ ${bindir:=.}/../../../bin/smpirun -trace-ti --cfg=tracing/filename:out_in_ti.txt --cfg=smpi/cpu_threshold:-1 -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/pingpong -q --log=smpi_kernel.thres:warning
+$ ${bindir:=.}/../../../bin/smpirun -trace-ti --cfg=tracing/filename:out_in_ti.txt --cfg=smpi/cpu_threshold:-1 -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/pt2pt-pingpong -q --log=smpi_kernel.thres:warning
> *** Ping-pong test (MPI_Send/MPI_Recv) ***
> == pivot=0 : pingpong [0] <--> [1]
> == pivot=1 : pingpong [1] <--> [2]
$ rm out_ti.txt
$ rm out_in_ti.txt
-
-
p Same test, but only using one output file for all processes
p generate a trace with pingpong, and replay itself, then check that output trace of the second run is the same as in the first (once sorted)
! output sort
-$ ${bindir:=.}/../../../bin/smpirun -trace-ti --cfg=tracing/filename:out_in_ti.txt --cfg=tracing/smpi/format/ti_one_file:yes -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/pingpong -q --log=smpi_kernel.thres:warning
+$ ${bindir:=.}/../../../bin/smpirun -trace-ti --cfg=tracing/filename:out_in_ti.txt --cfg=tracing/smpi/format/ti_one_file:yes -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/pt2pt-pingpong -q --log=smpi_kernel.thres:warning
> *** Ping-pong test (MPI_Send/MPI_Recv) ***
> == pivot=0 : pingpong [0] <--> [1]
> == pivot=1 : pingpong [1] <--> [2]
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/format/ti_one_file' to 'yes'
> [Jupiter:1:(2) 0.016798] [smpi_replay/INFO] Simulation time 0.016798
-
-
$ rm -rf ./out_ti.txt_files
$ rm -rf ./out_in_ti.txt_files
$ rm out_ti.txt
$ rm out_in_ti.txt
-
-
-
--- /dev/null
+! setenv LD_LIBRARY_PATH=../../lib
+! expect return 1
+$ ${bindir:=.}/../../../bin/smpirun -hostfile ../hostfile_empty -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/pt2pt-pingpong -q --log=smpi_kernel.thres:warning
+> [smpirun] ** error: the hostfile '../hostfile_empty' is empty. Aborting.
+
+! expect return 1
+$ ${bindir:=.}/../../../bin/smpirun -hostfile hostfile-does-not-exist.txt -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/pt2pt-pingpong -q --log=smpi_kernel.thres:warning
+> [smpirun] ** error: the file 'hostfile-does-not-exist.txt' does not exist. Aborting.
int main(int argc, char *argv[])
{
const int tag1 = 42, tag2 = 43; /* Message tag */
- int rank;
- int size;
+ int rank, size;
int msg = 99;
int err;
int pivot;
/* start pingpong tests between several pairs */
for (pivot = 0; pivot < size - 1; pivot++) {
-
if (pivot == rank) {
- printf("\n== pivot=%d : pingpong [%d] <--> [%d]\n", pivot, pivot,
- pivot + 1);
+ printf("\n== pivot=%d : pingpong [%d] <--> [%d]\n", pivot, pivot, pivot + 1);
int dst = rank + 1;
- printf("[%d] About to send 1st message '%d' to process [%d]\n",
- rank, msg, dst);
+ printf("[%d] About to send 1st message '%d' to process [%d]\n", rank, msg, dst);
MPI_Send(&msg, 1, MPI_INT, dst, tag1, MPI_COMM_WORLD);
MPI_Recv(&msg, 1, MPI_INT, dst, tag2, MPI_COMM_WORLD, &status); /* Receive a message */
- printf("[%d] Received reply message '%d' from process [%d]\n", rank,
- msg, dst);
-
+ printf("[%d] Received reply message '%d' from process [%d]\n", rank, msg, dst);
}
if ((pivot + 1) == rank) {
int src = rank - 1;
MPI_Recv(&msg, 1, MPI_INT, src, tag1, MPI_COMM_WORLD, &status); /* Receive a message */
- printf("[%d] Received 1st message '%d' from process [%d]\n", rank,
- msg, src);
+ printf("[%d] Received 1st message '%d' from process [%d]\n", rank, msg, src);
msg++;
printf("[%d] increment message's value to '%d'\n", rank, msg);
- printf("[%d] About to send back message '%d' to process [%d]\n",
- rank, msg, src);
+ printf("[%d] About to send back message '%d' to process [%d]\n", rank, msg, src);
MPI_Send(&msg, 1, MPI_INT, src, tag2, MPI_COMM_WORLD);
}
}
- MPI_Finalize(); /* Terminate MPI */
+ MPI_Finalize();
return 0;
}
-p Test dsend
-! setenv LD_LIBRARY_PATH=../../lib
-! output sort
-$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 2 ${bindir:=.}/dsend -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'
-> [Jupiter:1:(2) 0.000000] [dsend/INFO] rank 1: data exchanged
-> [Tremblay:0:(1) 0.002945] [dsend/INFO] rank 0: data exchanged
-> [rank 0] -> Tremblay
-> [rank 1] -> Jupiter
-
-
p Test pingpong
! setenv LD_LIBRARY_PATH=../../lib
! output sort
-$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/pingpong -q --log=smpi_kernel.thres:warning
+$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/pt2pt-pingpong -q --log=smpi_kernel.thres:warning
> *** Ping-pong test (MPI_Send/MPI_Recv) ***
> == pivot=0 : pingpong [0] <--> [1]
> == pivot=1 : pingpong [1] <--> [2]
> [rank 1] -> Jupiter
> [rank 2] -> Fafard
> [rank 3] -> Ginette
-
teshsuite/smpi/allreduce/CMakeLists.txt
teshsuite/smpi/alltoall/CMakeLists.txt
teshsuite/smpi/compute/CMakeLists.txt
- teshsuite/smpi/pingpong/CMakeLists.txt
teshsuite/smpi/reduce/CMakeLists.txt
teshsuite/smpi/shared/CMakeLists.txt
teshsuite/smpi/isp/umpire/CMakeLists.txt
IF(enable_smpi)
# BEGIN TESH TESTS
# smpi examples
- 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-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-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
- ADD_TESH_FACTORIES(tesh-smpi-broken "thread" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/pingpong --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pingpong broken_hostfiles.tesh)
- ADD_TESH(tesh-smpi-replay-ti-tracing --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/pingpong --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pingpong TI_output.tesh)
FOREACH (ALLREDUCE_COLL default lr rab1 rab2 rab_rdb
rdb smp_binomial smp_binomial_pipeline
smp_rdb smp_rsag smp_rsag_lr smp_rsag_rab redbcast ompi mpich ompi_ring_segmented mvapich2 mvapich2_rs mvapich2_two_level impi)