Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
various cleanups in the CMakeLists.txt files
[simgrid.git] / teshsuite / smpi / isp / umpire / CMakeLists.txt
1 # See http://formalverification.cs.utah.edu/ISP_Tests/
2
3 set(umpire_tests_passing
4   change-send-buffer
5   comm-dup-no-error
6   comm-dup-no-free
7   comm-dup-no-free2
8   comm-simple
9   comm-split-no-free
10   comm-translate-ranks
11   hello
12   no-error
13   no-error2
14   no-error3
15   no-error3-any_src
16   no-error-any_src
17   no-error-interleaved-isend
18   no-error-test
19   no-error-testall
20   no-error-testany
21   no-error-vector-isend
22   no-error-wait
23   no-error-waitany-any_src2
24   no-error-waitany-any_src3
25   no-error-waitany
26   no-error-wait-any_src
27   no-error-wait-any_src2
28   no-error-wait-any_src3
29   no-error-wait-any_src4
30   no-error-waitany-any_src
31   partial-recv
32   sendrecv-deadlock
33   send-recv-ok
34   irecv-isend-ok
35   irecv-isend-ok2
36   lost-request-waitall
37  ) # Passing (no deadlock) tests
38
39 # These are supposed to deadlock but ISP does not find deadlock
40 # and we don't either. What should be test here?
41 set(umpire_tests_missed_deadlock
42   any_src-deadlock
43   any_src-can-deadlock
44   any_src-can-deadlock2
45   any_src-can-deadlock3
46   )
47
48 set(umpire_tests_deadlock
49   any_src-can-deadlock10
50   any_src-can-deadlock10_mod
51   any_src-can-deadlock11
52   any_src-can-deadlock4
53   any_src-can-deadlock4_mod
54   any_src-can-deadlock5
55   any_src-can-deadlock5_mod
56   any_src-can-deadlock6
57   any_src-can-deadlock6_mod
58   any_src-can-deadlock7
59   any_src-can-deadlock8
60   any_src-can-deadlock9
61   any_src-waitall-deadlock
62   any_src-waitall-deadlock2
63   any_src-waitall-deadlock3
64   any_src-waitany-deadlock2
65   any_src-waitany-deadlock
66   any_src-wait-deadlock
67   any_src-wait-deadlock2
68   basic-deadlock
69   basic-deadlock-comm_create
70   basic-deadlock-comm_dup
71   basic-deadlock-comm_split
72   bcast-deadlock
73   collective-misorder
74   collective-misorder2
75   collective-misorder-allreduce
76   comm-bcast-deadlock
77   comm-deadlock
78   complex-deadlock
79   dropped-req
80   finalize-deadlock
81   irecv-deadlock
82   waitall-deadlock
83   waitany-deadlock
84   wait-deadlock
85  ) # failing (deadlocking) tests
86  
87 set(umpire_tests_problematic
88   deadlock-config # No deadlock detected by ISP unless MPI_Send blocking activated
89
90  ) # problematic tests
91  
92  # These files are not listed on http://formalverification.cs.utah.edu/ISP_Tests/
93 set(umpire_src_other
94   abort1.c
95   abort2.c
96   abort3.c
97   abort.c
98   basic-deadlock-cart_create.c
99   basic-deadlock-cart_sub.c
100   basic-deadlock-graph_create.c
101   basic-deadlock-intercomm_create.c
102   basic-deadlock-intercomm_merge.c
103   change-send-buffer-exhaustive.c
104   change-send-buffer-type-exhaustive.c
105   collective-exhaustive-byte-int-mismatch.c
106   collective-exhaustive-no-error.c
107   collective-misorder.c
108   collective-misorder2.c
109
110   deadlock-config_blocking.c
111   errhandler-no-error.c
112   errhandler-no-free.c
113   group-no-error2.c
114   group-no-error3.c
115   group-no-error.c
116   group-no-error-exhaustive.c
117   group-no-free2.c
118   group-no-free3.c
119   group-no-free.c
120   group-no-free-exhaustive.c
121   intercomm_create-deadlock2.c
122   intercomm_create-deadlock3.c
123   intercomm_create-deadlock4.c
124   intercomm_create-deadlock.c
125   intercomm_create-no-error.c
126   intercomm_merge-deadlock.c
127   lost-request2.c
128   lost-request3.c
129   lost-request.c  
130   no-error4-any_src.c
131   no-error4.c
132   no-error-derived-comms.c
133     
134   no-error-persistent-all-completions.c
135   no-error-persistent.c
136   no-error-persistent-test.c
137   no-error-persistent-testpartial.c
138   no-error-persistent-waitpartial.c
139   no-error-probe-any_src.c
140   no-error-probe-any_tag.c
141   no-error-probe.c
142   
143   no-error-wait2.c # Does not compile.
144   no-error-waitall-any_src2.c
145   no-error-waitall-any_src3.c
146   no-error-waitall-any_src.c
147   no-error-waitall.c
148   no-error-waitany2.c
149   
150   op-no-error.c
151   op-no-free.c
152   partial-recv-exhaustive.c
153   partial-recv-persistent2.c
154   partial-recv-persistent3.c
155   partial-recv-persistent4.c
156   partial-recv-persistent.c
157   persistent2.c
158   persistent3.c
159   persistent4.c
160   persistent.c
161   probe-any_src-types-can-mismatch.c
162   probe-any_tag-types-can-mismatch.c
163   probe-deadlock.c
164   pt2pt-byte-int-mismatch.c
165   remote_group-no-error.c
166   type-commit-twice.c
167   type-no-error.c
168   type-no-error-exhaustive.c
169   type-no-error-exhaustive-with-isends.c
170   type-no-free2.c
171   type-no-free3.c
172   type-no-free.c
173   type-no-free-exhaustive.c
174   )
175
176 # Add these files to the archive
177 #################
178
179 set(sources "${CMAKE_CURRENT_SOURCE_DIR}/README")
180 foreach(file ${umpire_src_other})
181   set(sources ${sources} ${CMAKE_CURRENT_SOURCE_DIR}/${file})
182 endforeach()
183
184 foreach(file ${umpire_tests_passing} ${umpire_tests_deadlock} ${umpire_tests_missed_deadlock} ${umpire_tests_problematic}  ) 
185   set(sources ${sources} ${CMAKE_CURRENT_SOURCE_DIR}/${file}.c)
186 endforeach()
187 set(txt_files ${txt_files} ${sources} PARENT_SCOPE)
188
189 # Build the tests
190 #################
191
192 if(enable_smpi AND enable_model-checking AND enable_smpi_ISP_testsuite)
193   set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
194   set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
195
196   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
197
198   foreach (test ${umpire_tests_passing} ${umpire_tests_deadlock} ${umpire_tests_problematic} )
199     add_executable(${test} ${test}.c)
200     target_link_libraries(${test} simgrid)
201     set_source_files_properties(${test}.c PROPERTIES COMPILE_FLAGS "-Wno-error")
202     set(umpire_tesh ${umpire_tesh} ${test})
203     set(files_to_clean ${files_to_clean} ${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh)
204   endforeach(test)
205   
206   # TODO, what should we do about ${umpire_tests_missed_deadlock}?
207
208   foreach (test ${umpire_tests_passing})
209     write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! timeout 30")
210     write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! output display" APPEND)
211     write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "\$ \${bindir:=.}/../../../../bin/smpirun -wrapper \"\${bindir:=.}/../../../../bin/simgrid-mc\" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich \${bindir:=.}/${test} --log=smpi_coll.thresh:error" APPEND)
212   endforeach()
213
214   foreach (test ${umpire_tests_deadlock} ${umpire_tests_problematic} )
215     write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! timeout 30"     )
216     write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! expect return 3" APPEND)
217     write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! output display"  APPEND)
218     write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "\$ \${bindir:=.}/../../../../bin/smpirun -wrapper \"\${bindir:=.}/../../../../bin/simgrid-mc\" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich \${bindir:=.}/${test} --log=smpi_coll.thresh:error" APPEND)
219   endforeach()
220 endif()
221
222 # Erase all tesh files on cleanup: they are generated anyway
223 set_directory_properties ( PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${files_to_clean}" )
224
225 if(enable_smpi AND enable_model-checking AND enable_smpi_ISP_testsuite)
226   foreach (tesh ${umpire_tesh})
227     ADD_TESH(mc-umpire-${tesh}
228       --setenv srcdir=${CMAKE_CURRENT_SOURCE_DIR}
229       --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}
230       --cd ${CMAKE_CURRENT_SOURCE_DIR}
231       ${CMAKE_CURRENT_BINARY_DIR}/${tesh}.tesh)
232   endforeach()
233 endif()