CMakeLists.txt 9.07 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
###################################################################################################
#
# Tests for core module
#
###################################################################################################

########
# cell #
########

waLBerla_compile_test( FILES cell/CellTest.cpp )
waLBerla_execute_test( NAME CellTest )

waLBerla_compile_test( FILES cell/CellIntervalTest.cpp )
waLBerla_execute_test( NAME CellIntervalTest )

##########
# config #
##########

waLBerla_compile_test( FILES config/ConfigTest.cpp )
waLBerla_execute_test( NAME ConfigTest COMMAND $<TARGET_FILE:ConfigTest> ${CMAKE_CURRENT_SOURCE_DIR}/config/ConfigTest.dat )

Michael Kuron's avatar
Michael Kuron committed
24
25
26
27
if( WALBERLA_BUILD_WITH_BOOST )
   waLBerla_compile_test( FILES config/MultiArrayIOTest.cpp )
   waLBerla_execute_test( NAME MultiArrayIOTest COMMAND $<TARGET_FILE:MultiArrayIOTest> )
endif( WALBERLA_BUILD_WITH_BOOST )
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83

#########
# debug #
#########

waLBerla_compile_test( FILES debug/DebugTest.cpp)
waLBerla_execute_test( NAME DebugTest )

waLBerla_compile_test( FILES debug/CheckMacroTest.cpp )
waLBerla_execute_test( NAME CheckMacroTest )

waLBerla_compile_test( FILES debug/PrintStacktraceTest.cpp )

###########
# logging #
###########

waLBerla_compile_test( FILES logging/LoggingTest.cpp)
waLBerla_execute_test( NAME LoggingTest )

########
# math #
########

waLBerla_compile_test( FILES math/PrimesTest.cpp )
waLBerla_execute_test( NAME PrimesTest )

waLBerla_compile_test( FILES math/RandomTest.cpp )
waLBerla_execute_test( NAME RandomTest )

waLBerla_compile_test( FILES math/SampleTest.cpp )
waLBerla_execute_test( NAME SampleTest1Proc  COMMAND $<TARGET_FILE:SampleTest> )
waLBerla_execute_test( NAME SampleTest4Proc  COMMAND $<TARGET_FILE:SampleTest> PROCESSES 4  )
waLBerla_execute_test( NAME SampleTest10Proc COMMAND $<TARGET_FILE:SampleTest> PROCESSES 10 LABELS longrun CONFIGURATIONS Release RelWithDbgInfo )

waLBerla_compile_test( FILES math/DistributedSampleTest.cpp )
waLBerla_execute_test( NAME DistributedSampleTest1Proc  COMMAND $<TARGET_FILE:DistributedSampleTest> )
waLBerla_execute_test( NAME DistributedSampleTest4Proc  COMMAND $<TARGET_FILE:DistributedSampleTest> PROCESSES 4  )
waLBerla_execute_test( NAME DistributedSampleTest10Proc COMMAND $<TARGET_FILE:DistributedSampleTest> PROCESSES 10 LABELS longrun )

waLBerla_compile_test( FILES math/ParserTest.cpp)
waLBerla_execute_test( NAME ParserTest )

waLBerla_compile_test( FILES math/PlaneTest.cpp )
waLBerla_execute_test( NAME PlaneTest )

waLBerla_compile_test( FILES math/MatrixVector2Test.cpp )
waLBerla_execute_test( NAME MatrixVector2Test )


waLBerla_compile_test( FILES math/Matrix3Test.cpp )
waLBerla_execute_test( NAME Matrix3Test )

waLBerla_compile_test( FILES math/GenericAABBTest.cpp DEPENDS stencil domain_decomposition )
waLBerla_execute_test( NAME GenericAABBTest )

Michael Kuron's avatar
Michael Kuron committed
84
if( WALBERLA_BUILD_WITH_BOOST )
Markus Holzer's avatar
Markus Holzer committed
85
86
87
waLBerla_compile_test( FILES math/PhysicalCheckTest.cpp DEPENDS stencil )
waLBerla_execute_test( NAME PhysicalCheckTest
                       COMMAND $<TARGET_FILE:PhysicalCheckTest>  ${CMAKE_CURRENT_SOURCE_DIR}/math/PhysicalCheckTestInput.prm )
Michael Kuron's avatar
Michael Kuron committed
88
endif( WALBERLA_BUILD_WITH_BOOST )
89
90
91
92
93
94
95
96
97


waLBerla_compile_test( FILES math/FastInvSqrtTest.cpp )
waLBerla_execute_test( NAME FastInvSqrtTest )

########################
# math/equation_system #
########################

Michael Kuron's avatar
Michael Kuron committed
98
99
100
101
if( WALBERLA_BUILD_WITH_BOOST )
   waLBerla_compile_test( FILES math/equation_system/EquationSolverTest.cpp )
   waLBerla_execute_test( NAME EquationSolverTest )
endif( WALBERLA_BUILD_WITH_BOOST )
102
103
104
105
106
107
108
109

#######
# mpi #
#######

waLBerla_compile_test( FILES mpi/BufferTest.cpp )
waLBerla_execute_test( NAME BufferTest )

110
111
waLBerla_compile_test( FILES mpi/BufferSystemTest.cpp )
waLBerla_execute_test( NAME BufferSystemTest PROCESSES 4 )
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154

waLBerla_compile_test( FILES mpi/BroadcastTest.cpp )
waLBerla_execute_test( NAME BroadcastTest1 COMMAND $<TARGET_FILE:BroadcastTest> )
waLBerla_execute_test( NAME BroadcastTest4 COMMAND $<TARGET_FILE:BroadcastTest> PROCESSES 4)

waLBerla_compile_test( FILES mpi/ReduceTest.cpp )
waLBerla_execute_test( NAME ReduceTest1 COMMAND $<TARGET_FILE:ReduceTest> )
waLBerla_execute_test( NAME ReduceTest4 COMMAND $<TARGET_FILE:ReduceTest> PROCESSES 4)

waLBerla_compile_test( FILES mpi/GatherTest.cpp )
waLBerla_execute_test( NAME GatherTest1 COMMAND $<TARGET_FILE:GatherTest> )
waLBerla_execute_test( NAME GatherTest4 COMMAND $<TARGET_FILE:GatherTest> PROCESSES 4)

waLBerla_compile_test( FILES mpi/GathervTest.cpp )
waLBerla_execute_test( NAME GathervTest1 COMMAND $<TARGET_FILE:GathervTest> )
waLBerla_execute_test( NAME GathervTest4 COMMAND $<TARGET_FILE:GathervTest> PROCESSES 4)

waLBerla_compile_test( FILES mpi/MPITextFileTest.cpp )
waLBerla_execute_test( NAME MPITextFileTest1 COMMAND $<TARGET_FILE:MPITextFileTest> MPI_Testfile_1.txt 16 )
waLBerla_execute_test( NAME MPITextFileTest4 COMMAND $<TARGET_FILE:MPITextFileTest> MPI_Testfile_4.txt 16 PROCESSES 4 )
waLBerla_execute_test( NAME MPITextFileTest8 COMMAND $<TARGET_FILE:MPITextFileTest> MPI_Testfile_8.txt 16 PROCESSES 8 )

waLBerla_compile_test( FILES mpi/SetReductionTest.cpp )
waLBerla_execute_test( NAME SetReductionTest1  COMMAND $<TARGET_FILE:SetReductionTest> )
waLBerla_execute_test( NAME SetReductionTest2  COMMAND $<TARGET_FILE:SetReductionTest> PROCESSES 2 )
waLBerla_execute_test( NAME SetReductionTest3  COMMAND $<TARGET_FILE:SetReductionTest> PROCESSES 3 )
waLBerla_execute_test( NAME SetReductionTest4  COMMAND $<TARGET_FILE:SetReductionTest> PROCESSES 4 )
waLBerla_execute_test( NAME SetReductionTest5  COMMAND $<TARGET_FILE:SetReductionTest> PROCESSES 5 )
waLBerla_execute_test( NAME SetReductionTest27 COMMAND $<TARGET_FILE:SetReductionTest> PROCESSES 27 )



##############
# selectable #
##############

waLBerla_compile_test( FILES selectable/SetSelectableObjectTest.cpp )
waLBerla_execute_test( NAME SetSelectableObjectTest  )

##########
# timing #
##########

Sebastian Eibl's avatar
Sebastian Eibl committed
155
156
157
waLBerla_compile_test( FILES timing/ParallelTimerTest.cpp )
waLBerla_execute_test( NAME ParallelTimerTest PROCESSES 2 )

158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
waLBerla_compile_test( FILES timing/TimerTest.cpp )
waLBerla_execute_test( NAME TimerTest )

waLBerla_compile_test( FILES timing/TimingPoolTest.cpp )
waLBerla_execute_test( NAME TimingPoolTest PROCESSES 3  )

waLBerla_compile_test( FILES timing/TimingTreeTest.cpp )
waLBerla_execute_test( NAME TimingTreeTest PROCESSES 3)

waLBerla_compile_test( FILES timing/SweepTimeloopTimerReduction.cpp DEPENDS timeloop blockforest )
waLBerla_execute_test( NAME SweepTimeloopTimerReduction PROCESSES 9  )


########
# core #
########

175
176
177
178
179
if ( WALBERLA_BUILD_WITH_PYTHON )
   waLBerla_compile_test( FILES AllHeaderTest.cpp DEPENDS blockforest field geometry pe pe_coupling python_coupling )
else()
   waLBerla_compile_test( FILES AllHeaderTest.cpp DEPENDS blockforest field geometry pe pe_coupling )
endif()
180
181
waLBerla_execute_test( NAME AllHeaderTest )

182
183
184
waLBerla_compile_test( FILES Angles.test.cpp )
waLBerla_execute_test( NAME Angles )

185
186
187
188
189
190
waLBerla_compile_test( FILES ConcatIterator.cpp )
waLBerla_execute_test( NAME ConcatIterator )

waLBerla_compile_test( FILES DataTypesTest.cpp )
waLBerla_execute_test( NAME DataTypesTest )

Dominik Thoennes's avatar
Dominik Thoennes committed
191
192
193
194
waLBerla_compile_test( FILES DebugSTLTest.cpp )
waLBerla_execute_test( NAME DebugSTLTest )
set_tests_properties(DebugSTLTest PROPERTIES WILL_FAIL TRUE)

195
196
197
waLBerla_compile_test( FILES FunctionTraitsTest.cpp )
waLBerla_execute_test( NAME FunctionTraitsTest )

198
199
200
waLBerla_compile_test( FILES GridGeneratorTest.cpp )
waLBerla_execute_test( NAME GridGeneratorTest )

201
#TODO: find fix for this test with intel OneApi compiler
202
if(NOT WALBERLA_CXX_COMPILER_IS_INTELLLVM )
203
204
205
   waLBerla_compile_test( FILES MemoryUsage.cpp )
   waLBerla_execute_test( NAME MemoryUsage )
endif()
206

207
208
209
waLBerla_compile_test( FILES OpenMPWrapperTest.cpp )
waLBerla_execute_test( NAME OpenMPWrapperTest )

210
211
212
waLBerla_compile_test( FILES RandomUUID.cpp )
waLBerla_execute_test( NAME RandomUUID )

213
214
215
216
217
218
219
220
waLBerla_compile_test( FILES SetTest.cpp )
waLBerla_execute_test( NAME SetTest )

waLBerla_compile_test( NAME UNIQUEID FILES UniqueID.cpp )
waLBerla_execute_test( NAME UNIQUEID PROCESSES 4)

waLBerla_compile_test( FILES VersionTest.cpp )
waLBerla_execute_test( NAME VersionTest )
221

222
if ( WALBERLA_CXX_COMPILER_IS_INTEL AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "20.0" )
223
224
225
  waLBerla_compile_test( FILES VariantTest )
  waLBerla_execute_test( NAME VariantTest )
endif()
Stephan Seitz's avatar
Stephan Seitz committed
226

227
228
229
230
231
232
233
234
235
236
237
238
239
240
##################
# load_balancing #
##################

if( WALBERLA_BUILD_WITH_METIS )
   waLBerla_compile_test( NAME MetisTest FILES load_balancing/MetisTest.cpp DEPENDS field )
   waLBerla_execute_test( NAME MetisTest COMMAND $<TARGET_FILE:MetisTest> 64 64  4 --no-vtk )
endif()

if( WALBERLA_BUILD_WITH_PARMETIS )
   waLBerla_compile_test( NAME ParMetisTest FILES load_balancing/ParMetisTest.cpp DEPENDS blockforest field stencil vtk  )
   waLBerla_execute_test( NAME ParMetisTest1 COMMAND $<TARGET_FILE:ParMetisTest> 64 64  4 --no-vtk )
   waLBerla_execute_test( NAME ParMetisTest2 COMMAND $<TARGET_FILE:ParMetisTest> 64 64  8 --no-vtk PROCESSES 2 )
   waLBerla_execute_test( NAME ParMetisTest4 COMMAND $<TARGET_FILE:ParMetisTest> 64 64 16 --no-vtk PROCESSES 4 )
241
242
243
244

   waLBerla_compile_test( NAME PlainParMetisTest FILES load_balancing/PlainParMetisTest.cpp )
   waLBerla_execute_test( NAME PlainParMetisTest PROCESSES 3 )
endif()