Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
7fea2c9dfa79c6c5a8b409156c15f6cfc818c4b5
[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     set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x})
14   endforeach()
15
16   set_target_properties(smpi_trace_call_location PROPERTIES COMPILE_FLAGS "-trace-call-location")
17
18   foreach(x bugged1 bugged2 bugged1_liveness only_send_deterministic mutual_exclusion non_termination1 
19             non_termination2 non_termination3 non_termination4)
20     if(SIMGRID_HAVE_MC)
21       add_executable       (smpi_${x} ${CMAKE_CURRENT_SOURCE_DIR}/mc/${x}.c)
22       target_link_libraries(smpi_${x} simgrid)
23       set_target_properties(smpi_${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mc)
24     endif()
25   endforeach()
26 endif()
27
28 foreach(x 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)
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)
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}/trace_simple/trace_simple.tesh
43                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_call_location/trace_call_location.tesh
44                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/replay.tesh                          PARENT_SCOPE)
45 set(bin_files     ${bin_files}     ${CMAKE_CURRENT_SOURCE_DIR}/hostfile
46                                    ${CMAKE_CURRENT_SOURCE_DIR}/energy/hostfile
47                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/promela_bugged1_liveness
48                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_bugged1_liveness
49                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_bugged1
50                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_bugged2
51                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_only_send_deterministic
52                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_mutual_exclusion
53                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_non_termination                 PARENT_SCOPE)
54 set(txt_files     ${txt_files}     ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions0.txt
55                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions1.txt
56                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_allReduce.txt
57                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_allgatherv.txt
58                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_alltoall.txt
59                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_alltoallv.txt
60                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_barrier.txt
61                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_bcast.txt
62                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_bcast_reduce_datatypes.txt
63                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_gather.txt
64                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_reducescatter.txt
65                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_waitall.txt
66                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_with_isend.txt
67                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/split_traces                         PARENT_SCOPE)
68
69 if(enable_smpi)
70   if(SIMGRID_HAVE_MC)
71     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)
72   endif()
73
74   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)
75   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)
76   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)
77   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)
78   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)
79 endif()