Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[examples] smpi replay on steroids
[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
9             trace trace_simple trace_call_location energy)
10     add_executable       (smpi_${x} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x})
11     target_link_libraries(smpi_${x} simgrid)
12     set_target_properties(smpi_${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${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)
19     if(SIMGRID_HAVE_MC)
20       add_executable       (smpi_${x} ${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     endif()
24   endforeach()
25 endif()
26
27 foreach(x replay)
28   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
29 endforeach()
30 foreach(x trace trace_simple trace_call_location energy)
31   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
32 endforeach()
33 foreach(x bugged1 bugged2 bugged1_liveness only_send_deterministic mutual_exclusion non_termination1
34     non_termination2 non_termination3 non_termination4)
35   set(examples_src  ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/mc/${x}.c)
36 endforeach()
37
38 set(examples_src  ${examples_src}                                                                          PARENT_SCOPE)
39 set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/energy/energy.tesh
40                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace/trace.tesh
41                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_simple/trace_simple.tesh
42                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_call_location/trace_call_location.tesh
43                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/replay.tesh                          PARENT_SCOPE)
44 set(bin_files     ${bin_files}     ${CMAKE_CURRENT_SOURCE_DIR}/hostfile
45                                    ${CMAKE_CURRENT_SOURCE_DIR}/energy/hostfile
46                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/promela_bugged1_liveness
47                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_bugged1_liveness
48                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_bugged1
49                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_bugged2
50                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_only_send_deterministic
51                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_mutual_exclusion
52                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_non_termination                 PARENT_SCOPE)
53 set(txt_files     ${txt_files}     ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions0.txt
54                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions1.txt
55                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_allreduce.txt
56                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_allgatherv.txt
57                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_alltoall.txt
58                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_alltoallv.txt
59                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_barrier.txt
60                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_bcast.txt
61                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_bcast_reduce_datatypes.txt
62                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_gather.txt
63                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_reducescatter.txt
64                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_waitall.txt
65                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_with_isend.txt
66                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/split_traces                         PARENT_SCOPE)
67
68 if(enable_smpi)
69   if(SIMGRID_HAVE_MC)
70     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)
71   endif()
72
73   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)
74   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)
75   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)
76   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)
77   ADD_TESH_FACTORIES(smpi-energy "thread;ucontext;raw;boost" --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)
78 endif()