Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update .mailmap.
[simgrid.git] / examples / smpi / CMakeLists.txt
1 if(enable_smpi)
2   set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
3   set(CMAKE_CXX_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicxx")
4   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
5
6   file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mc/")
7
8   foreach(x replay ampi_test trace trace_simple trace_call_location energy gemm simple-execute)
9     add_executable       (smpi_${x} EXCLUDE_FROM_ALL ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x})
10     target_link_libraries(smpi_${x} simgrid)
11     set_target_properties(smpi_${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
12     add_dependencies(tests smpi_${x})
13   endforeach()
14
15   set_target_properties(smpi_trace_call_location PROPERTIES COMPILE_FLAGS "-trace-call-location")
16
17   foreach(x bugged1 bugged2 bugged1_liveness only_send_deterministic mutual_exclusion non_termination1
18             non_termination2 non_termination3 non_termination4 sendsend)
19     if(SIMGRID_HAVE_MC)
20       add_executable       (smpi_${x} EXCLUDE_FROM_ALL ${CMAKE_CURRENT_SOURCE_DIR}/mc/${x}.c)
21       target_link_libraries(smpi_${x} simgrid)
22       set_target_properties(smpi_${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mc)
23       add_dependencies(tests smpi_${x})
24     endif()
25   endforeach()
26 endif()
27
28 foreach(x ampi_test replay)
29   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
30 endforeach()
31 foreach(x trace trace_simple trace_call_location energy gemm simple-execute)
32   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
33 endforeach()
34 foreach(x bugged1 bugged2 bugged1_liveness only_send_deterministic mutual_exclusion non_termination1
35     non_termination2 non_termination3 non_termination4 sendsend)
36   set(examples_src  ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/mc/${x}.c)
37 endforeach()
38
39 set(examples_src  ${examples_src}                                                                          PARENT_SCOPE)
40 set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/energy/energy.tesh
41                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace/trace.tesh
42                                    ${CMAKE_CURRENT_SOURCE_DIR}/simple-execute/simple-execute.tesh
43                                    ${CMAKE_CURRENT_SOURCE_DIR}/gemm/gemm.tesh
44                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_simple/trace_simple.tesh
45                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_call_location/trace_call_location.tesh
46                                    ${CMAKE_CURRENT_SOURCE_DIR}/ampi_test/ampi_test.tesh
47                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/sendsend.tesh
48                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/replay-override-replayer.tesh
49                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/replay.tesh                          PARENT_SCOPE)
50 set(bin_files     ${bin_files}     ${CMAKE_CURRENT_SOURCE_DIR}/hostfile
51                                    ${CMAKE_CURRENT_SOURCE_DIR}/energy/hostfile
52                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/promela_bugged1_liveness
53                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_bugged1_liveness
54                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_bugged1
55                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_bugged2
56                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_only_send_deterministic
57                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_mutual_exclusion
58                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_non_termination                 PARENT_SCOPE)
59 set(txt_files     ${txt_files}     ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions0.txt
60                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions1.txt
61                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_allreduce.txt
62                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_allgatherv.txt
63                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_alltoall.txt
64                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_alltoallv.txt
65                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_barrier.txt
66                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_bcast.txt
67                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_bcast_reduce_datatypes.txt
68                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_gather.txt
69                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_reducescatter.txt
70                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_waitall.txt
71                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_with_isend.txt
72                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/split_traces
73                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_call_location/adjust                  PARENT_SCOPE)
74
75 if(enable_smpi)
76   # MC is currently broken with threads (deadlock => timeout)
77   if(SIMGRID_HAVE_MC)
78     ADD_TESH(smpi-mc-only-send-determinism --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/mc --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/examples/smpi/mc ${CMAKE_HOME_DIRECTORY}/examples/smpi/mc/only_send_deterministic.tesh)
79     ADD_TESH_FACTORIES(smpi-mc-sendsend "^thread" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/mc --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/examples/smpi/mc ${CMAKE_HOME_DIRECTORY}/examples/smpi/mc/sendsend.tesh)
80   endif()
81
82   ADD_TESH(smpi-tracing        --setenv bindir=${CMAKE_BINARY_DIR}/examples/smpi/trace --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/trace --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/examples/smpi/trace ${CMAKE_HOME_DIRECTORY}/examples/smpi/trace/trace.tesh)
83   ADD_TESH(smpi-simple-execute       --setenv bindir=${CMAKE_BINARY_DIR}/examples/smpi/simple-execute --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/simple-execute --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/examples/smpi/simple-execute ${CMAKE_HOME_DIRECTORY}/examples/smpi/simple-execute/simple-execute.tesh)
84   ADD_TESH(smpi-tracing-simple --setenv bindir=${CMAKE_BINARY_DIR}/examples/smpi/trace_simple --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/trace_simple --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/examples/smpi/trace_simple ${CMAKE_HOME_DIRECTORY}/examples/smpi/trace_simple/trace_simple.tesh)
85   ADD_TESH(smpi-tracing-call-location --setenv bindir=${CMAKE_BINARY_DIR}/examples/smpi/trace_call_location --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/examples/smpi/trace_call_location ${CMAKE_HOME_DIRECTORY}/examples/smpi/trace_call_location/trace_call_location.tesh)
86   ADD_TESH(smpi-replay         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/replay.tesh)
87   ADD_TESH(smpi-replay-override-replayer --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/replay-override-replayer.tesh)
88   ADD_TESH(smpi-gemm        --setenv bindir=${CMAKE_BINARY_DIR}/examples/smpi/gemm --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/gemm --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/examples/smpi/gemm ${CMAKE_HOME_DIRECTORY}/examples/smpi/gemm/gemm.tesh)
89   ADD_TESH_FACTORIES(smpi-energy "*" --setenv bindir=${CMAKE_BINARY_DIR}/examples/smpi/energy --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/energy --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/bin --cd ${CMAKE_BINARY_DIR}/examples/smpi/energy ${CMAKE_HOME_DIRECTORY}/examples/smpi/energy/energy.tesh)
90
91   ADD_TESH(smpi-ampi --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/ampi_test/ampi_test.tesh)
92 endif()