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)
+++ /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 (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)
+++ /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 (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)
#define SIZE 4
int main(int argc, char **argv) {
-
int rank, i, j;
double a[SIZE][SIZE] = {{0}};
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;
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'
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'
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'
+++ /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 (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)
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
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