Logo AND Algorithmique Numérique Distribuée

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