Logo AND Algorithmique Numérique Distribuée

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