Line data Source code
1 : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2 : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3 : !!!!
4 : !!!! MIT License
5 : !!!!
6 : !!!! ParaMonte: plain powerful parallel Monte Carlo library.
7 : !!!!
8 : !!!! Copyright (C) 2012-present, The Computational Data Science Lab
9 : !!!!
10 : !!!! This file is part of the ParaMonte library.
11 : !!!!
12 : !!!! Permission is hereby granted, free of charge, to any person obtaining a
13 : !!!! copy of this software and associated documentation files (the "Software"),
14 : !!!! to deal in the Software without restriction, including without limitation
15 : !!!! the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 : !!!! and/or sell copies of the Software, and to permit persons to whom the
17 : !!!! Software is furnished to do so, subject to the following conditions:
18 : !!!!
19 : !!!! The above copyright notice and this permission notice shall be
20 : !!!! included in all copies or substantial portions of the Software.
21 : !!!!
22 : !!!! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 : !!!! EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 : !!!! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
25 : !!!! IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
26 : !!!! DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
27 : !!!! OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
28 : !!!! OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 : !!!!
30 : !!!! ACKNOWLEDGMENT
31 : !!!!
32 : !!!! ParaMonte is an honor-ware and its currency is acknowledgment and citations.
33 : !!!! As per the ParaMonte library license agreement terms, if you use any parts of
34 : !!!! this library for any purposes, kindly acknowledge the use of ParaMonte in your
35 : !!!! work (education/research/industry/development/...) by citing the ParaMonte
36 : !!!! library as described on this page:
37 : !!!!
38 : !!!! https://github.com/cdslaborg/paramonte/blob/main/ACKNOWLEDGMENT.md
39 : !!!!
40 : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
41 : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
42 :
43 : !> \brief This include file contains the body of the submodules
44 : !> [ParaDRAM_mod@Test_SpecBase_smod](@ref paradram_mod@test_specbase_smod) and
45 : !> [ParaDISE_mod@@Test_SpecBase_smod](@ref paradise_mod@@test_specbase_smod).
46 : !> \author Amir Shahmoradi
47 :
48 : contains
49 :
50 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
51 :
52 : !> \brief
53 : !> Test the ParaDXXX sampler with a wrong input value for `chainFileFormat`.
54 12 : module function test_SpecBase_ChainFileFormat_type_1() result(assertion)
55 : implicit none
56 : logical :: assertion
57 6 : type(ParaDXXX_type) :: PD
58 6 : assertion = .true.
59 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
60 : call PD%runSampler ( ndim = 1_IK &
61 : , getLogFunc = getLogFuncMVN &
62 : , mpiFinalizeRequested = .false. &
63 : , chainFileFormat = "nonsense" &
64 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_ChainFileFormat_type_1" &
65 6 : )
66 6 : assertion = assertion .and. PD%Err%occurred
67 : #endif
68 14 : end function test_SpecBase_ChainFileFormat_type_1
69 :
70 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
71 :
72 : !> \brief
73 : !> Test the ParaDXXX sampler with a wrong input value for `chainFileFormat`.
74 6 : module function test_SpecBase_ChainFileFormat_type_2() result(assertion)
75 : implicit none
76 : logical :: assertion
77 6 : type(ParaDXXX_type) :: PD
78 6 : assertion = .true.
79 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
80 : call PD%runSampler ( ndim = 1_IK &
81 : , getLogFunc = getLogFuncMVN &
82 : , mpiFinalizeRequested = .false. &
83 : , inputFile = ParaDXXX_NML//" chainFileFormat = 'nonsense' /" &
84 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_ChainFileFormat_type_2" &
85 6 : )
86 6 : assertion = assertion .and. PD%Err%occurred
87 : #endif
88 20 : end function test_SpecBase_ChainFileFormat_type_2
89 :
90 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
91 :
92 : !> \brief
93 : !> Test the ParaDXXX sampler with a valid input value for `chainFileFormat`.
94 6 : module function test_SpecBase_ChainFileFormat_type_3() result(assertion)
95 : implicit none
96 : logical :: assertion
97 6 : type(ParaDXXX_type) :: PD
98 6 : assertion = .true.
99 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
100 : call PD%runSampler ( ndim = 1_IK &
101 : , getLogFunc = getLogFuncMVN &
102 : , mpiFinalizeRequested = .false. &
103 : , inputFile = ParaDXXX_NML//" chainFileFormat = 'VerBose' /" &
104 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_ChainFileFormat_type_3" &
105 6 : )
106 6 : assertion = assertion .and. .not. PD%Err%occurred
107 : #endif
108 72 : end function test_SpecBase_ChainFileFormat_type_3
109 :
110 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
111 :
112 : !> \brief
113 : !> Test the ParaDXXX sampler with a valid input value for `chainFileFormat`.
114 6 : module function test_SpecBase_ChainFileFormat_type_4() result(assertion)
115 : implicit none
116 : logical :: assertion
117 6 : type(ParaDXXX_type) :: PD
118 6 : assertion = .true.
119 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
120 : call PD%runSampler ( ndim = 1_IK &
121 : , getLogFunc = getLogFuncMVN &
122 : , mpiFinalizeRequested = .false. &
123 : , inputFile = ParaDXXX_NML//" chainFileFormat = 'Compact' /" &
124 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_ChainFileFormat_type_4" &
125 6 : )
126 6 : assertion = assertion .and. .not. PD%Err%occurred
127 : #endif
128 72 : end function test_SpecBase_ChainFileFormat_type_4
129 :
130 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
131 :
132 : !> \brief
133 : !> Test the ParaDXXX sampler with a valid input value for `chainFileFormat`.
134 6 : module function test_SpecBase_ChainFileFormat_type_5() result(assertion)
135 : implicit none
136 : logical :: assertion
137 6 : type(ParaDXXX_type) :: PD
138 6 : assertion = .true.
139 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
140 : call PD%runSampler ( ndim = 1_IK &
141 : , getLogFunc = getLogFuncMVN &
142 : , mpiFinalizeRequested = .false. &
143 : , inputFile = ParaDXXX_NML//" chainFileFormat = 'BiNaRy' /" &
144 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_ChainFileFormat_type_5" &
145 6 : )
146 6 : assertion = assertion .and. .not. PD%Err%occurred
147 : #endif
148 72 : end function test_SpecBase_ChainFileFormat_type_5
149 :
150 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
151 :
152 : !> \brief
153 : !> Test the ParaDXXX sampler with a too-small input value for `domainLowerLimitVec`.
154 6 : module function test_SpecBase_DomainLowerLimitVec_type_1() result(assertion)
155 6 : use Constants_mod, only: IK, RK, HUGE_RK
156 : implicit none
157 : logical :: assertion
158 : real(RK), parameter :: domainLowerLimitVec(*) = [-HUGE_RK/2._RK] ! NOTE: HUGE_RK is the null value.
159 6 : type(ParaDXXX_type) :: PD
160 6 : assertion = .true.
161 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
162 : call PD%runSampler ( ndim = 1_IK &
163 : , getLogFunc = getLogFuncMVN &
164 : , mpiFinalizeRequested = .false. &
165 : , domainLowerLimitVec = domainLowerLimitVec &
166 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_DomainLowerLimitVec_type_1" &
167 6 : )
168 6 : assertion = assertion .and. PD%Err%occurred
169 : #endif
170 14 : end function test_SpecBase_DomainLowerLimitVec_type_1
171 :
172 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
173 :
174 : !> \brief
175 : !> Test the ParaDXXX sampler with a too-small input value for `domainLowerLimitVec`.
176 6 : module function test_SpecBase_DomainLowerLimitVec_type_2() result(assertion)
177 6 : use Constants_mod, only: IK, RK, HUGE_RK
178 : use String_mod, only: num2str
179 : implicit none
180 : logical :: assertion
181 : real(RK), parameter :: domainLowerLimitVec(*) = [-HUGE_RK/2._RK] ! NOTE: HUGE_RK is the null value.
182 6 : type(ParaDXXX_type) :: PD
183 6 : assertion = .true.
184 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
185 : call PD%runSampler ( ndim = 1_IK &
186 : , getLogFunc = getLogFuncMVN &
187 : , mpiFinalizeRequested = .false. &
188 : , inputFile = ParaDXXX_NML//" domainLowerLimitVec = "//num2str(domainLowerLimitVec)//" /" &
189 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_DomainLowerLimitVec_type_2" &
190 6 : )
191 6 : assertion = assertion .and. PD%Err%occurred
192 : #endif
193 14 : end function test_SpecBase_DomainLowerLimitVec_type_2
194 :
195 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
196 :
197 : !> \brief
198 : !> Test the ParaDXXX sampler with a too-large input value for `domainUpperLimitVec`.
199 6 : module function test_SpecBase_DomainUpperLimitVec_type_1() result(assertion)
200 6 : use Constants_mod, only: IK, RK, HUGE_RK
201 : implicit none
202 : logical :: assertion
203 : real(RK), parameter :: domainUpperLimitVec(*) = [+HUGE_RK/2._RK] ! NOTE: HUGE_RK is the null value.
204 6 : type(ParaDXXX_type) :: PD
205 6 : assertion = .true.
206 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
207 : call PD%runSampler ( ndim = 1_IK &
208 : , getLogFunc = getLogFuncMVN &
209 : , mpiFinalizeRequested = .false. &
210 : , domainUpperLimitVec = domainUpperLimitVec &
211 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_DomainUpperLimitVec_type_1" &
212 6 : )
213 6 : assertion = assertion .and. PD%Err%occurred
214 : #endif
215 14 : end function test_SpecBase_DomainUpperLimitVec_type_1
216 :
217 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
218 :
219 : !> \brief
220 : !> Test the ParaDXXX sampler with a too-large input value for `domainUpperLimitVec`.
221 6 : module function test_SpecBase_DomainUpperLimitVec_type_2() result(assertion)
222 6 : use Constants_mod, only: IK, RK, HUGE_RK
223 : use String_mod, only: num2str
224 : implicit none
225 : logical :: assertion
226 : real(RK), parameter :: domainUpperLimitVec(*) = [+HUGE_RK/2._RK] ! NOTE: HUGE_RK is the null value.
227 6 : type(ParaDXXX_type) :: PD
228 6 : assertion = .true.
229 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
230 : call PD%runSampler ( ndim = 1_IK &
231 : , getLogFunc = getLogFuncMVN &
232 : , mpiFinalizeRequested = .false. &
233 : , inputFile = ParaDXXX_NML//" domainUpperLimitVec = "//num2str(domainUpperLimitVec)//" /" &
234 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_DomainUpperLimitVec_type_2" &
235 6 : )
236 6 : assertion = assertion .and. PD%Err%occurred
237 : #endif
238 14 : end function test_SpecBase_DomainUpperLimitVec_type_2
239 :
240 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
241 :
242 : !> \brief
243 : !> Test the ParaDXXX sampler with an input value for `domainUpperLimitVec`
244 : !> that is smaller than the input value for `domainLowerLimitVec`.
245 6 : module function test_SpecBase_DomainUpperLimitVec_type_3() result(assertion)
246 6 : use Constants_mod, only: IK, RK
247 : implicit none
248 : logical :: assertion
249 : real(RK), parameter :: domainLowerLimitVec(*) = [+2._RK]
250 : real(RK), parameter :: domainUpperLimitVec(*) = [-2._RK]
251 6 : type(ParaDXXX_type) :: PD
252 6 : assertion = .true.
253 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
254 : call PD%runSampler ( ndim = 1_IK &
255 : , getLogFunc = getLogFuncMVN &
256 : , mpiFinalizeRequested = .false. &
257 : , domainLowerLimitVec = domainLowerLimitVec &
258 : , domainUpperLimitVec = domainUpperLimitVec &
259 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_DomainUpperLimitVec_type_3" &
260 6 : )
261 6 : assertion = assertion .and. PD%Err%occurred
262 : #endif
263 14 : end function test_SpecBase_DomainUpperLimitVec_type_3
264 :
265 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
266 :
267 : !> \brief
268 : !> Test the ParaDXXX sampler with an input value for `domainUpperLimitVec`
269 : !> that is equal to the input value for `domainLowerLimitVec`.
270 6 : module function test_SpecBase_DomainUpperLimitVec_type_4() result(assertion)
271 6 : use Constants_mod, only: IK, RK
272 : implicit none
273 : logical :: assertion
274 : real(RK), parameter :: domainLowerLimitVec(*) = [+2._RK]
275 : real(RK), parameter :: domainUpperLimitVec(*) = [+2._RK]
276 6 : type(ParaDXXX_type) :: PD
277 6 : assertion = .true.
278 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
279 : call PD%runSampler ( ndim = 1_IK &
280 : , getLogFunc = getLogFuncMVN &
281 : , mpiFinalizeRequested = .false. &
282 : , domainLowerLimitVec = domainLowerLimitVec &
283 : , domainUpperLimitVec = domainUpperLimitVec &
284 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_DomainUpperLimitVec_type_4" &
285 6 : )
286 6 : assertion = assertion .and. PD%Err%occurred
287 : #endif
288 14 : end function test_SpecBase_DomainUpperLimitVec_type_4
289 :
290 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
291 :
292 : !> \brief
293 : !> Test whether the ParaDXXX sampler quits with an error message when `maxNumDomainCheckToWarn < 1`.
294 6 : module function test_SpecBase_MaxNumDomainCheckToWarn_type_1() result(assertion)
295 6 : use Constants_mod, only: IK, RK
296 : implicit none
297 : logical :: assertion
298 : real(RK), parameter :: domainLowerLimitVec(*) = [-1.e-1_RK]
299 : real(RK), parameter :: domainUpperLimitVec(*) = [+1.e+1_RK]
300 6 : type(ParaDXXX_type) :: PD
301 6 : assertion = .true.
302 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
303 : call PD%runSampler ( ndim = 1_IK &
304 : , getLogFunc = getLogFuncMVN &
305 : , mpiFinalizeRequested = .false. &
306 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_MaxNumDomainCheckToWarn_type_1" &
307 : , domainLowerLimitVec = domainLowerLimitVec &
308 : , domainUpperLimitVec = domainUpperLimitVec &
309 : , maxNumDomainCheckToWarn = 0_IK &
310 6 : )
311 6 : assertion = assertion .and. PD%Err%occurred
312 : #endif
313 14 : end function test_SpecBase_MaxNumDomainCheckToWarn_type_1
314 :
315 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
316 :
317 : !> \brief
318 : !> Test whether the ParaDXXX sampler quits with an error message when `maxNumDomainCheckToWarn < 1`.
319 6 : module function test_SpecBase_MaxNumDomainCheckToWarn_type_2() result(assertion)
320 6 : use Constants_mod, only: IK, RK
321 : implicit none
322 : logical :: assertion
323 : real(RK), parameter :: domainLowerLimitVec(*) = [-1.e-1_RK]
324 : real(RK), parameter :: domainUpperLimitVec(*) = [+1.e+1_RK]
325 6 : type(ParaDXXX_type) :: PD
326 6 : assertion = .true.
327 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
328 : call PD%runSampler ( ndim = 1_IK &
329 : , getLogFunc = getLogFuncMVN &
330 : , mpiFinalizeRequested = .false. &
331 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_MaxNumDomainCheckToWarn_type_2" &
332 : , domainLowerLimitVec = domainLowerLimitVec &
333 : , domainUpperLimitVec = domainUpperLimitVec &
334 : , inputFile = ParaDXXX_NML//" maxNumDomainCheckToWarn = 0 /" &
335 6 : )
336 6 : assertion = assertion .and. PD%Err%occurred
337 : #endif
338 14 : end function test_SpecBase_MaxNumDomainCheckToWarn_type_2
339 :
340 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
341 :
342 : !> \brief
343 : !> Test whether the ParaDXXX sampler quits with an error message when `maxNumDomainCheckToWarn < 1`.
344 6 : module function test_SpecBase_MaxNumDomainCheckToWarn_type_3() result(assertion)
345 6 : use Constants_mod, only: IK, RK
346 : implicit none
347 : logical :: assertion
348 : real(RK), parameter :: domainLowerLimitVec(*) = [-1.e-2_RK]
349 : real(RK), parameter :: domainUpperLimitVec(*) = [+1.e-2_RK]
350 6 : type(ParaDXXX_type) :: PD
351 6 : assertion = .true.
352 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
353 : call PD%runSampler ( ndim = 1_IK &
354 : , getLogFunc = getLogFuncMVN &
355 : , mpiFinalizeRequested = .false. &
356 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_MaxNumDomainCheckToWarn_type_3" &
357 : , inputFile = ParaDXXX_NML//" maxNumDomainCheckToWarn = 1 /" &
358 : , domainLowerLimitVec = domainLowerLimitVec &
359 : , domainUpperLimitVec = domainUpperLimitVec &
360 : , chainSize = 10_IK &
361 6 : )
362 6 : assertion = assertion .and. .not. PD%Err%occurred
363 : #endif
364 66 : end function test_SpecBase_MaxNumDomainCheckToWarn_type_3
365 :
366 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
367 :
368 : !> \brief
369 : !> Test whether the ParaDXXX sampler quits with an error message when `maxNumDomainCheckToStop < 1`.
370 : !>
371 : !> \todo
372 : !> When run in parallel, it is essential for the tests on `MaxNumDomainCheckToStop_type` to use `multichain` parallelism
373 : !> since fatal error communication and the subsequent exit from the simulation by all images is currently not implemented.
374 : !> This testing weakness, although rather insignificant can be fixed in the future.
375 6 : module function test_SpecBase_MaxNumDomainCheckToStop_type_1() result(assertion)
376 6 : use Constants_mod, only: IK, RK
377 : implicit none
378 : logical :: assertion
379 : real(RK), parameter :: domainLowerLimitVec(*) = [-1.e-2_RK]
380 : real(RK), parameter :: domainUpperLimitVec(*) = [+1.e-2_RK]
381 6 : type(ParaDXXX_type) :: PD
382 6 : assertion = .true.
383 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
384 : call PD%runSampler ( ndim = 1_IK &
385 : , getLogFunc = getLogFuncMVN &
386 : , mpiFinalizeRequested = .false. &
387 : , parallelizationModel = "multi chain" &
388 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_MaxNumDomainCheckToStop_type_1" &
389 : , domainLowerLimitVec = domainLowerLimitVec &
390 : , domainUpperLimitVec = domainUpperLimitVec &
391 : , maxNumDomainCheckToStop = 0_IK &
392 6 : )
393 6 : assertion = assertion .and. PD%Err%occurred
394 : #endif
395 30 : end function test_SpecBase_MaxNumDomainCheckToStop_type_1
396 :
397 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
398 :
399 : !> \brief
400 : !> Test whether the ParaDXXX sampler quits with an error message when `maxNumDomainCheckToStop` has reached.
401 : !>
402 : !> \todo
403 : !> When run in parallel, it is essential for the tests on `MaxNumDomainCheckToStop_type` to use `multichain` parallelism
404 : !> since fatal error communication and the subsequent exit from the simulation by all images is currently not implemented.
405 : !> This testing weakness, although rather insignificant can be fixed in the future.
406 6 : module function test_SpecBase_MaxNumDomainCheckToStop_type_2() result(assertion)
407 6 : use Constants_mod, only: IK, RK
408 : implicit none
409 : logical :: assertion
410 : real(RK), parameter :: domainLowerLimitVec(*) = [-1.e-2_RK]
411 : real(RK), parameter :: domainUpperLimitVec(*) = [+1.e-2_RK]
412 6 : type(ParaDXXX_type) :: PD
413 6 : assertion = .true.
414 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
415 : call PD%runSampler ( ndim = 1_IK &
416 : , getLogFunc = getLogFuncMVN &
417 : , mpiFinalizeRequested = .false. &
418 : , parallelizationModel = "multi chain" &
419 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_MaxNumDomainCheckToStop_type_2" &
420 : , domainLowerLimitVec = domainLowerLimitVec &
421 : , domainUpperLimitVec = domainUpperLimitVec &
422 : , inputFile = ParaDXXX_NML//" maxNumDomainCheckToStop = 0 /" &
423 6 : )
424 6 : assertion = assertion .and. PD%Err%occurred
425 : #endif
426 30 : end function test_SpecBase_MaxNumDomainCheckToStop_type_2
427 :
428 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
429 :
430 : !> \brief
431 : !> Test whether the ParaDXXX sampler quits with an error message when `maxNumDomainCheckToStop` has reached.
432 : !>
433 : !> \todo
434 : !> When run in parallel, it is essential for the tests on `MaxNumDomainCheckToStop_type` to use `multichain` parallelism
435 : !> since fatal error communication and the subsequent exit from the simulation by all images is currently not implemented.
436 : !> This testing weakness, although rather insignificant can be fixed in the future.
437 6 : module function test_SpecBase_MaxNumDomainCheckToStop_type_3() result(assertion)
438 6 : use Constants_mod, only: IK, RK
439 : implicit none
440 : logical :: assertion
441 : real(RK), parameter :: domainLowerLimitVec(*) = [-1.e-2_RK]
442 : real(RK), parameter :: domainUpperLimitVec(*) = [+1.e-2_RK]
443 6 : type(ParaDXXX_type) :: PD
444 6 : assertion = .true.
445 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
446 : call PD%runSampler ( ndim = 1_IK &
447 : , getLogFunc = getLogFuncMVN &
448 : , mpiFinalizeRequested = .false. &
449 : , parallelizationModel = "multi chain" &
450 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_MaxNumDomainCheckToStop_type_3" &
451 : , domainLowerLimitVec = domainLowerLimitVec &
452 : , domainUpperLimitVec = domainUpperLimitVec &
453 : , maxNumDomainCheckToStop = 1_IK &
454 6 : )
455 6 : assertion = assertion .and. PD%Err%occurred
456 : #endif
457 78 : end function test_SpecBase_MaxNumDomainCheckToStop_type_3
458 :
459 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
460 :
461 : !> \brief
462 : !> Test whether the ParaDXXX sampler quits with an error message when `outputColumnWidth < 0`.
463 6 : module function test_SpecBase_OutputColumnWidth_type_1() result(assertion)
464 6 : use Constants_mod, only: IK, RK
465 : implicit none
466 : logical :: assertion
467 6 : type(ParaDXXX_type) :: PD
468 6 : assertion = .true.
469 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
470 : call PD%runSampler ( ndim = 1_IK &
471 : , getLogFunc = getLogFuncMVN &
472 : , mpiFinalizeRequested = .false. &
473 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_OutputColumnWidth_type_1" &
474 : , outputColumnWidth = -1_IK &
475 6 : )
476 6 : assertion = assertion .and. PD%Err%occurred
477 : #endif
478 14 : end function test_SpecBase_OutputColumnWidth_type_1
479 :
480 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
481 :
482 : !> \brief
483 : !> Test whether the ParaDXXX sampler quits with an error message when `outputColumnWidth < 0`.
484 6 : module function test_SpecBase_OutputColumnWidth_type_2() result(assertion)
485 6 : use Constants_mod, only: IK, RK
486 : implicit none
487 : logical :: assertion
488 6 : type(ParaDXXX_type) :: PD
489 6 : assertion = .true.
490 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
491 : call PD%runSampler ( ndim = 1_IK &
492 : , getLogFunc = getLogFuncMVN &
493 : , mpiFinalizeRequested = .false. &
494 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_OutputColumnWidth_type_2" &
495 : , inputFile = ParaDXXX_NML//" outputColumnWidth = -1 /" &
496 6 : )
497 6 : assertion = assertion .and. PD%Err%occurred
498 : #endif
499 14 : end function test_SpecBase_OutputColumnWidth_type_2
500 :
501 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
502 :
503 : !> \brief
504 : !> Test whether the ParaDXXX sampler quits with an error message when `outputColumnWidth < outputRealPrecision + 7`.
505 6 : module function test_SpecBase_OutputColumnWidth_type_3() result(assertion)
506 6 : use Constants_mod, only: IK, RK
507 : implicit none
508 : logical :: assertion
509 6 : type(ParaDXXX_type) :: PD
510 6 : assertion = .true.
511 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
512 : call PD%runSampler ( ndim = 1_IK &
513 : , getLogFunc = getLogFuncMVN &
514 : , mpiFinalizeRequested = .false. &
515 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_OutputColumnWidth_type_3" &
516 : , outputRealPrecision = 8_IK &
517 : , outputColumnWidth = 14_IK &
518 6 : )
519 6 : assertion = assertion .and. PD%Err%occurred
520 : #endif
521 14 : end function test_SpecBase_OutputColumnWidth_type_3
522 :
523 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
524 :
525 : !> \brief
526 : !> Test whether the ParaDXXX sampler successfully return with a valid value for `outputColumnWidth`.
527 6 : module function test_SpecBase_OutputColumnWidth_type_4() result(assertion)
528 6 : use Constants_mod, only: IK, RK
529 : implicit none
530 : logical :: assertion
531 6 : type(ParaDXXX_type) :: PD
532 6 : assertion = .true.
533 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
534 : call PD%runSampler ( ndim = 1_IK &
535 : , getLogFunc = getLogFuncMVN &
536 : , mpiFinalizeRequested = .false. &
537 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_OutputColumnWidth_type_4" &
538 : , outputRealPrecision = 8_IK &
539 : , outputColumnWidth = 21_IK &
540 6 : )
541 6 : assertion = assertion .and. .not. PD%Err%occurred
542 : #endif
543 66 : end function test_SpecBase_OutputColumnWidth_type_4
544 :
545 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
546 :
547 : !> \brief
548 : !> Test whether the ParaDXXX sampler quits with an error message when `outputDelimiter` contains `.`.
549 6 : module function test_SpecBase_OutputDelimiter_type_1() result(assertion)
550 6 : use Constants_mod, only: IK, RK
551 : implicit none
552 : logical :: assertion
553 6 : type(ParaDXXX_type) :: PD
554 6 : assertion = .true.
555 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
556 : call PD%runSampler ( ndim = 1_IK &
557 : , getLogFunc = getLogFuncMVN &
558 : , mpiFinalizeRequested = .false. &
559 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_OutputDelimiter_type_1" &
560 : , outputDelimiter = "this.that" &
561 6 : )
562 6 : assertion = assertion .and. PD%Err%occurred
563 : #endif
564 14 : end function test_SpecBase_OutputDelimiter_type_1
565 :
566 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
567 :
568 : !> \brief
569 : !> Test whether the ParaDXXX sampler quits with an error message when `outputDelimiter` contains `+`.
570 6 : module function test_SpecBase_OutputDelimiter_type_2() result(assertion)
571 6 : use Constants_mod, only: IK, RK
572 : implicit none
573 : logical :: assertion
574 6 : type(ParaDXXX_type) :: PD
575 6 : assertion = .true.
576 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
577 : call PD%runSampler ( ndim = 1_IK &
578 : , getLogFunc = getLogFuncMVN &
579 : , mpiFinalizeRequested = .false. &
580 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_OutputDelimiter_type_2" &
581 : , inputFile = ParaDXXX_NML//" outputDelimiter = 'this+that' /" &
582 6 : )
583 6 : assertion = assertion .and. PD%Err%occurred
584 : #endif
585 14 : end function test_SpecBase_OutputDelimiter_type_2
586 :
587 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
588 :
589 : !> \brief
590 : !> Test whether the ParaDXXX sampler quits with an error message when `outputDelimiter` contains digit.
591 6 : module function test_SpecBase_OutputDelimiter_type_3() result(assertion)
592 6 : use Constants_mod, only: IK, RK
593 : implicit none
594 : logical :: assertion
595 6 : type(ParaDXXX_type) :: PD
596 6 : assertion = .true.
597 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
598 : call PD%runSampler ( ndim = 1_IK &
599 : , getLogFunc = getLogFuncMVN &
600 : , mpiFinalizeRequested = .false. &
601 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_OutputDelimiter_type_3" &
602 : , inputFile = ParaDXXX_NML//" outputDelimiter = 'this1234that' /" &
603 6 : )
604 6 : assertion = assertion .and. PD%Err%occurred
605 : #endif
606 14 : end function test_SpecBase_OutputDelimiter_type_3
607 :
608 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
609 :
610 : !> \brief
611 : !> Test whether the ParaDXXX sampler converts `\t` to tab character when `outputDelimiter = "\t"`.
612 6 : module function test_SpecBase_OutputDelimiter_type_4() result(assertion)
613 6 : use Constants_mod, only: IK, RK, TAB
614 : implicit none
615 : logical :: assertion
616 6 : type(ParaDXXX_type) :: PD
617 6 : assertion = .true.
618 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
619 : call PD%runSampler ( ndim = 1_IK &
620 : , getLogFunc = getLogFuncMVN &
621 : , mpiFinalizeRequested = .false. &
622 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_OutputDelimiter_type_4" &
623 : , outputDelimiter = "\t" &
624 6 : )
625 6 : assertion = assertion .and. .not. PD%Err%occurred .and. PD%SpecBase%OutputDelimiter%val == TAB
626 : #endif
627 66 : end function test_SpecBase_OutputDelimiter_type_4
628 :
629 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
630 :
631 : !> \brief
632 : !> Test whether the ParaDXXX sampler converts `\\t` to `\t` when `outputDelimiter = "\\t"`.
633 6 : module function test_SpecBase_OutputDelimiter_type_5() result(assertion)
634 6 : use Constants_mod, only: IK, RK
635 : implicit none
636 : logical :: assertion
637 6 : type(ParaDXXX_type) :: PD
638 6 : assertion = .true.
639 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
640 : call PD%runSampler ( ndim = 1_IK &
641 : , getLogFunc = getLogFuncMVN &
642 : , mpiFinalizeRequested = .false. &
643 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_OutputDelimiter_type_5" &
644 : , outputDelimiter = "\\t" &
645 6 : )
646 6 : assertion = assertion .and. .not. PD%Err%occurred .and. PD%SpecBase%OutputDelimiter%val == "\t"
647 : #endif
648 66 : end function test_SpecBase_OutputDelimiter_type_5
649 :
650 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
651 :
652 : !> \brief
653 : !> Test whether the ParaDXXX sampler converts `""` to `" "` when `outputDelimiter = ""` contains digit.
654 6 : module function test_SpecBase_OutputDelimiter_type_6() result(assertion)
655 6 : use Constants_mod, only: IK, RK
656 : implicit none
657 : logical :: assertion
658 6 : type(ParaDXXX_type) :: PD
659 6 : assertion = .true.
660 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
661 : call PD%runSampler ( ndim = 1_IK &
662 : , getLogFunc = getLogFuncMVN &
663 : , mpiFinalizeRequested = .false. &
664 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_OutputDelimiter_type_6" &
665 : , outputDelimiter = "" &
666 6 : )
667 6 : assertion = assertion .and. .not. PD%Err%occurred .and. PD%SpecBase%OutputDelimiter%val == " " .and. len(PD%SpecBase%OutputDelimiter%val) == 1
668 : #endif
669 66 : end function test_SpecBase_OutputDelimiter_type_6
670 :
671 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
672 :
673 : !> \brief
674 : !> Test whether the ParaDXXX sampler quits with an error message when `outputRealPrecision < 1`.
675 6 : module function test_SpecBase_OutputRealPrecision_type_1() result(assertion)
676 6 : use Constants_mod, only: IK, RK
677 : implicit none
678 : logical :: assertion
679 6 : type(ParaDXXX_type) :: PD
680 6 : assertion = .true.
681 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
682 : call PD%runSampler ( ndim = 1_IK &
683 : , getLogFunc = getLogFuncMVN &
684 : , mpiFinalizeRequested = .false. &
685 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_OutputRealPrecision_type_1" &
686 : , outputRealPrecision = 0_IK &
687 6 : )
688 6 : assertion = assertion .and. PD%Err%occurred
689 : #endif
690 14 : end function test_SpecBase_OutputRealPrecision_type_1
691 :
692 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
693 :
694 : !> \brief
695 : !> Test whether the ParaDXXX sampler quits with an error message when `outputRealPrecision < 1`.
696 6 : module function test_SpecBase_OutputRealPrecision_type_2() result(assertion)
697 6 : use Constants_mod, only: IK, RK
698 : implicit none
699 : logical :: assertion
700 6 : type(ParaDXXX_type) :: PD
701 6 : assertion = .true.
702 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
703 : call PD%runSampler ( ndim = 1_IK &
704 : , getLogFunc = getLogFuncMVN &
705 : , mpiFinalizeRequested = .false. &
706 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_OutputRealPrecision_type_1" &
707 : , inputFile = ParaDXXX_NML//" outputRealPrecision = 0 /" &
708 6 : )
709 6 : assertion = assertion .and. PD%Err%occurred
710 : #endif
711 6 : end function test_SpecBase_OutputRealPrecision_type_2
712 :
713 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
714 :
715 : !> \brief
716 : !> Test whether the ParaDXXX sampler overwrites existing simulation files when `overwriteRequested = .true.`.
717 6 : module function test_SpecBase_OverwriteRequested_type_1() result(assertion)
718 6 : use Constants_mod, only: IK, RK
719 : implicit none
720 : logical :: assertion
721 6 : type(ParaDXXX_type) :: PD
722 6 : assertion = .true.
723 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
724 : call PD%runSampler ( ndim = 1_IK &
725 : , getLogFunc = getLogFuncMVN &
726 : , mpiFinalizeRequested = .false. &
727 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_OverwriteRequested_type_1" &
728 : , overwriteRequested = .true. &
729 6 : )
730 6 : assertion = assertion .and. .not. PD%Err%occurred
731 : call PD%runSampler ( ndim = 1_IK &
732 : , getLogFunc = getLogFuncMVN &
733 : , mpiFinalizeRequested = .false. &
734 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_OverwriteRequested_type_1" &
735 : , inputFile = ParaDXXX_NML//" overwriteRequested = true /" &
736 6 : )
737 6 : assertion = assertion .and. .not. PD%Err%occurred
738 : #endif
739 66 : end function test_SpecBase_OverwriteRequested_type_1
740 :
741 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
742 :
743 : !> \brief
744 : !> Test whether the ParaDXXX sampler exits with an error message when attempting to overwrite an existing simulation with `overwriteRequested = .false.`.
745 6 : module function test_SpecBase_OverwriteRequested_type_2() result(assertion)
746 6 : use Constants_mod, only: IK, RK
747 : implicit none
748 : logical :: assertion
749 6 : type(ParaDXXX_type) :: PD
750 6 : assertion = .true.
751 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
752 : call PD%runSampler ( ndim = 1_IK &
753 : , getLogFunc = getLogFuncMVN &
754 : , mpiFinalizeRequested = .false. &
755 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_OverwriteRequested_type_2" &
756 : , overwriteRequested = .false. &
757 6 : )
758 6 : assertion = assertion .and. .not. PD%Err%occurred
759 : call PD%runSampler ( ndim = 1_IK &
760 : , getLogFunc = getLogFuncMVN &
761 : , mpiFinalizeRequested = .false. &
762 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_OverwriteRequested_type_2" &
763 : , inputFile = ParaDXXX_NML//" overwriteRequested = false /" &
764 6 : )
765 6 : assertion = assertion .and. PD%Err%occurred
766 : #endif
767 58 : end function test_SpecBase_OverwriteRequested_type_2
768 :
769 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
770 :
771 : !> \brief
772 : !> Test whether the ParaDXXX sampler handles properly the `singleChain` parallelization model.
773 6 : module function test_SpecBase_ParallelizationModel_type_1() result(assertion)
774 6 : use Constants_mod, only: IK, RK
775 : implicit none
776 : logical :: assertion
777 6 : type(ParaDXXX_type) :: PD
778 6 : assertion = .true.
779 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
780 : call PD%runSampler ( ndim = 1_IK &
781 : , getLogFunc = getLogFuncMVN &
782 : , mpiFinalizeRequested = .false. &
783 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_ParallelizationModel_type_1" &
784 : , parallelizationModel = "SinGleChAin" &
785 6 : )
786 6 : assertion = assertion .and. .not. PD%Err%occurred
787 : #endif
788 66 : end function test_SpecBase_ParallelizationModel_type_1
789 :
790 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
791 :
792 : !> \brief
793 : !> Test whether the ParaDXXX sampler handles properly the `multiChain` parallelization model.
794 6 : module function test_SpecBase_ParallelizationModel_type_2() result(assertion)
795 6 : use Constants_mod, only: IK, RK
796 : implicit none
797 : logical :: assertion
798 6 : type(ParaDXXX_type) :: PD
799 6 : assertion = .true.
800 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
801 : call PD%runSampler ( ndim = 1_IK &
802 : , getLogFunc = getLogFuncMVN &
803 : , mpiFinalizeRequested = .false. &
804 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_ParallelizationModel_type_2" &
805 : , inputFile = ParaDXXX_NML//" parallelizationModel = 'MULTI ChAin' /" &
806 6 : )
807 6 : assertion = assertion .and. .not. PD%Err%occurred
808 : #endif
809 90 : end function test_SpecBase_ParallelizationModel_type_2
810 :
811 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
812 :
813 : !> \brief
814 : !> Test whether the ParaDXXX sampler exits with an error message when the specified value for `parallelizationModel` is not recognized.
815 6 : module function test_SpecBase_ParallelizationModel_type_3() result(assertion)
816 6 : use Constants_mod, only: IK, RK
817 : implicit none
818 : logical :: assertion
819 6 : type(ParaDXXX_type) :: PD
820 6 : assertion = .true.
821 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
822 : call PD%runSampler ( ndim = 1_IK &
823 : , getLogFunc = getLogFuncMVN &
824 : , mpiFinalizeRequested = .false. &
825 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_ParallelizationModel_type_3" &
826 : , inputFile = ParaDXXX_NML//" parallelizationModel = 'nonsense' /" &
827 6 : )
828 6 : assertion = assertion .and. PD%Err%occurred
829 : #endif
830 14 : end function test_SpecBase_ParallelizationModel_type_3
831 :
832 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
833 :
834 : !> \brief
835 : !> Test whether the ParaDXXX sampler exits with an error message when the `progressReportPeriod < 1`.
836 6 : module function test_SpecBase_ProgressReportPeriod_type_1() result(assertion)
837 6 : use Constants_mod, only: IK, RK
838 : implicit none
839 : logical :: assertion
840 6 : type(ParaDXXX_type) :: PD
841 6 : assertion = .true.
842 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
843 : call PD%runSampler ( ndim = 1_IK &
844 : , getLogFunc = getLogFuncMVN &
845 : , mpiFinalizeRequested = .false. &
846 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_ProgressReportPeriod_type_1" &
847 : , progressReportPeriod = -1_IK &
848 6 : )
849 6 : assertion = assertion .and. PD%Err%occurred
850 : #endif
851 14 : end function test_SpecBase_ProgressReportPeriod_type_1
852 :
853 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
854 :
855 : !> \brief
856 : !> Test whether the ParaDXXX sampler exits with an error message when the `progressReportPeriod < 1`.
857 6 : module function test_SpecBase_ProgressReportPeriod_type_2() result(assertion)
858 6 : use Constants_mod, only: IK, RK
859 : implicit none
860 : logical :: assertion
861 6 : type(ParaDXXX_type) :: PD
862 6 : assertion = .true.
863 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
864 : call PD%runSampler ( ndim = 1_IK &
865 : , getLogFunc = getLogFuncMVN &
866 : , mpiFinalizeRequested = .false. &
867 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_ProgressReportPeriod_type_2" &
868 : , inputFile = ParaDXXX_NML//" progressReportPeriod = 0 /" &
869 6 : )
870 6 : assertion = assertion .and. PD%Err%occurred
871 : #endif
872 14 : end function test_SpecBase_ProgressReportPeriod_type_2
873 :
874 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
875 :
876 : !> \brief
877 : !> Test whether the ParaDXXX sampler appropriately considers the user's input random seed value.
878 6 : module function test_SpecBase_RandomSeed_type_1() result(assertion)
879 6 : use Constants_mod, only: IK, RK
880 : implicit none
881 : logical :: assertion
882 6 : type(ParaDXXX_type) :: PD
883 6 : assertion = .true.
884 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
885 : call PD%runSampler ( ndim = 1_IK &
886 : , getLogFunc = getLogFuncMVN &
887 : , mpiFinalizeRequested = .false. &
888 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_RandomSeed_type_1" &
889 : , randomSeed = -12345_IK &
890 6 : )
891 6 : assertion = assertion .and. .not. PD%Err%occurred
892 : #endif
893 66 : end function test_SpecBase_RandomSeed_type_1
894 :
895 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
896 :
897 : !> \brief
898 : !> Test whether the ParaDXXX sampler appropriately considers the user's input random seed value.
899 6 : module function test_SpecBase_RandomSeed_type_2() result(assertion)
900 6 : use Constants_mod, only: IK, RK
901 : implicit none
902 : logical :: assertion
903 6 : type(ParaDXXX_type) :: PD
904 6 : assertion = .true.
905 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
906 : call PD%runSampler ( ndim = 1_IK &
907 : , getLogFunc = getLogFuncMVN &
908 : , mpiFinalizeRequested = .false. &
909 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_RandomSeed_type_2" &
910 : , inputFile = ParaDXXX_NML//" randomSeed = 12345 /" &
911 6 : )
912 6 : assertion = assertion .and. .not. PD%Err%occurred
913 : #endif
914 66 : end function test_SpecBase_RandomSeed_type_2
915 :
916 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
917 :
918 : !> \brief
919 : !> Test whether the ParaDXXX sampler appropriately considers a binary restart file format.
920 6 : module function test_SpecBase_RestartFileFormat_type_1() result(assertion)
921 6 : use Constants_mod, only: IK, RK
922 : implicit none
923 : logical :: assertion
924 6 : type(ParaDXXX_type) :: PD
925 6 : assertion = .true.
926 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
927 : call PD%runSampler ( ndim = 1_IK &
928 : , getLogFunc = getLogFuncMVN &
929 : , mpiFinalizeRequested = .false. &
930 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_RestartFileFormat_type_1" &
931 : , restartFileFormat = "BINARY" &
932 6 : )
933 6 : assertion = assertion .and. .not. PD%Err%occurred
934 : #endif
935 66 : end function test_SpecBase_RestartFileFormat_type_1
936 :
937 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
938 :
939 : !> \brief
940 : !> Test whether the ParaDXXX sampler appropriately considers an ascii restart file format.
941 6 : module function test_SpecBase_RestartFileFormat_type_2() result(assertion)
942 6 : use Constants_mod, only: IK, RK
943 : implicit none
944 : logical :: assertion
945 6 : type(ParaDXXX_type) :: PD
946 6 : assertion = .true.
947 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
948 : call PD%runSampler ( ndim = 1_IK &
949 : , getLogFunc = getLogFuncMVN &
950 : , mpiFinalizeRequested = .false. &
951 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_RestartFileFormat_type_2" &
952 : , inputFile = ParaDXXX_NML//" restartFileFormat = 'asCII' /" &
953 6 : )
954 6 : assertion = assertion .and. .not. PD%Err%occurred
955 : #endif
956 66 : end function test_SpecBase_RestartFileFormat_type_2
957 :
958 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
959 :
960 : !> \brief
961 : !> Test whether the ParaDXXX sampler exits with an error message when the specified restart file format is not recognized.
962 6 : module function test_SpecBase_RestartFileFormat_type_3() result(assertion)
963 6 : use Constants_mod, only: IK, RK
964 : implicit none
965 : logical :: assertion
966 6 : type(ParaDXXX_type) :: PD
967 6 : assertion = .true.
968 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
969 : call PD%runSampler ( ndim = 1_IK &
970 : , getLogFunc = getLogFuncMVN &
971 : , mpiFinalizeRequested = .false. &
972 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_RestartFileFormat_type_3" &
973 : , inputFile = ParaDXXX_NML//" restartFileFormat = 'nonsense' /" &
974 6 : )
975 6 : assertion = assertion .and. PD%Err%occurred
976 : #endif
977 14 : end function test_SpecBase_RestartFileFormat_type_3
978 :
979 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
980 :
981 : !> \brief
982 : !> Test whether the ParaDXXX sampler succeeds with a valid value for `sampleSize`.
983 6 : module function test_SpecBase_SampleSize_type_1() result(assertion)
984 6 : use Constants_mod, only: IK, RK
985 : implicit none
986 : logical :: assertion
987 6 : type(ParaDXXX_type) :: PD
988 6 : assertion = .true.
989 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
990 : call PD%runSampler ( ndim = 1_IK &
991 : , getLogFunc = getLogFuncMVN &
992 : , mpiFinalizeRequested = .false. &
993 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_SampleSize_type_1" &
994 : , sampleSize = -1_IK &
995 6 : )
996 6 : assertion = assertion .and. .not. PD%Err%occurred
997 : #endif
998 66 : end function test_SpecBase_SampleSize_type_1
999 :
1000 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1001 :
1002 : !> \brief
1003 : !> Test whether the ParaDXXX sampler succeeds with a valid value for `sampleSize`.
1004 6 : module function test_SpecBase_SampleSize_type_2() result(assertion)
1005 6 : use Constants_mod, only: IK, RK
1006 : implicit none
1007 : logical :: assertion
1008 6 : type(ParaDXXX_type) :: PD
1009 6 : assertion = .true.
1010 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
1011 : call PD%runSampler ( ndim = 1_IK &
1012 : , getLogFunc = getLogFuncMVN &
1013 : , mpiFinalizeRequested = .false. &
1014 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_SampleSize_type_2" &
1015 : , sampleSize = -2_IK &
1016 6 : )
1017 6 : assertion = assertion .and. .not. PD%Err%occurred
1018 : #endif
1019 66 : end function test_SpecBase_SampleSize_type_2
1020 :
1021 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1022 :
1023 : !> \brief
1024 : !> Test whether the ParaDXXX sampler succeeds with a valid value for `sampleSize`.
1025 6 : module function test_SpecBase_SampleSize_type_3() result(assertion)
1026 6 : use Constants_mod, only: IK, RK
1027 : implicit none
1028 : logical :: assertion
1029 6 : type(ParaDXXX_type) :: PD
1030 6 : assertion = .true.
1031 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
1032 : call PD%runSampler ( ndim = 1_IK &
1033 : , getLogFunc = getLogFuncMVN &
1034 : , mpiFinalizeRequested = .false. &
1035 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_SampleSize_type_3" &
1036 : , sampleSize = 200_IK &
1037 6 : )
1038 6 : assertion = assertion .and. .not. PD%Err%occurred
1039 : #endif
1040 66 : end function test_SpecBase_SampleSize_type_3
1041 :
1042 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1043 :
1044 : !> \brief
1045 : !> Test whether the ParaDXXX sampler succeeds with a valid value for `sampleSize`.
1046 6 : module function test_SpecBase_SampleSize_type_4() result(assertion)
1047 6 : use Constants_mod, only: IK, RK
1048 : implicit none
1049 : logical :: assertion, exist
1050 : integer :: iostat
1051 6 : type(ParaDXXX_type) :: PD
1052 6 : assertion = .true.
1053 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
1054 : call PD%runSampler ( ndim = 1_IK &
1055 : , getLogFunc = getLogFuncMVN &
1056 : , mpiFinalizeRequested = .false. &
1057 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_SampleSize_type_4" &
1058 : , sampleSize = 0_IK &
1059 6 : )
1060 6 : assertion = assertion .and. .not. PD%Err%occurred
1061 6 : inquire(file = PD%SampleFile%Path%original, exist = exist, iostat = iostat)
1062 6 : assertion = assertion .and. .not. exist .and. iostat == 0
1063 : #endif
1064 66 : end function test_SpecBase_SampleSize_type_4
1065 :
1066 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1067 :
1068 : !> \brief
1069 : !> Test whether the ParaDXXX sampler exits with an error message when the specified `targetAcceptanceRate` is out of range.
1070 6 : module function test_SpecBase_TargetAcceptanceRate_type_1() result(assertion)
1071 6 : use Constants_mod, only: IK, RK
1072 : implicit none
1073 : logical :: assertion
1074 6 : type(ParaDXXX_type) :: PD
1075 : real(RK), parameter :: targetAcceptanceRate(*) = [-1._RK, 0.5_RK]
1076 6 : assertion = .true.
1077 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
1078 : call PD%runSampler ( ndim = 1_IK &
1079 : , getLogFunc = getLogFuncMVN &
1080 : , mpiFinalizeRequested = .false. &
1081 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_TargetAcceptanceRate_type_1" &
1082 : , targetAcceptanceRate = targetAcceptanceRate &
1083 6 : )
1084 6 : assertion = assertion .and. PD%Err%occurred
1085 : #endif
1086 14 : end function test_SpecBase_TargetAcceptanceRate_type_1
1087 :
1088 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1089 :
1090 : !> \brief
1091 : !> Test whether the ParaDXXX sampler exits with an error message when the specified `targetAcceptanceRate` is out of range.
1092 6 : module function test_SpecBase_TargetAcceptanceRate_type_2() result(assertion)
1093 6 : use Constants_mod, only: IK, RK
1094 : implicit none
1095 : logical :: assertion
1096 6 : type(ParaDXXX_type) :: PD
1097 6 : assertion = .true.
1098 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
1099 : call PD%runSampler ( ndim = 1_IK &
1100 : , getLogFunc = getLogFuncMVN &
1101 : , mpiFinalizeRequested = .false. &
1102 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_TargetAcceptanceRate_type_2" &
1103 : , inputFile = ParaDXXX_NML//" targetAcceptanceRate = +2. /" &
1104 6 : )
1105 6 : assertion = assertion .and. PD%Err%occurred
1106 : #endif
1107 14 : end function test_SpecBase_TargetAcceptanceRate_type_2
1108 :
1109 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1110 :
1111 : !> \brief
1112 : !> Test whether the ParaDXXX sampler exits with an error message when the specified `targetAcceptanceRate` is out of range.
1113 6 : module function test_SpecBase_TargetAcceptanceRate_type_3() result(assertion)
1114 6 : use Constants_mod, only: IK, RK
1115 : implicit none
1116 : logical :: assertion
1117 6 : type(ParaDXXX_type) :: PD
1118 6 : assertion = .true.
1119 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
1120 : call PD%runSampler ( ndim = 1_IK &
1121 : , getLogFunc = getLogFuncMVN &
1122 : , mpiFinalizeRequested = .false. &
1123 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_TargetAcceptanceRate_type_3" &
1124 : , inputFile = ParaDXXX_NML//" targetAcceptanceRate = +0.5d0, 0.2d0 /" &
1125 6 : )
1126 6 : assertion = assertion .and. PD%Err%occurred
1127 : #endif
1128 14 : end function test_SpecBase_TargetAcceptanceRate_type_3
1129 :
1130 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1131 :
1132 : !> \brief
1133 : !> Test whether the ParaDXXX sampler exits with an error message when the specified `targetAcceptanceRate` is out of range.
1134 6 : module function test_SpecBase_TargetAcceptanceRate_type_4() result(assertion)
1135 6 : use Constants_mod, only: IK, RK
1136 : implicit none
1137 : logical :: assertion
1138 6 : type(ParaDXXX_type) :: PD
1139 6 : assertion = .true.
1140 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
1141 : call PD%runSampler ( ndim = 1_IK &
1142 : , getLogFunc = getLogFuncMVN &
1143 : , mpiFinalizeRequested = .false. &
1144 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_TargetAcceptanceRate_type_4" &
1145 : , inputFile = ParaDXXX_NML//" targetAcceptanceRate(1) = 1. /" &
1146 6 : )
1147 6 : assertion = assertion .and. PD%Err%occurred
1148 : #endif
1149 14 : end function test_SpecBase_TargetAcceptanceRate_type_4
1150 :
1151 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1152 :
1153 : !> \brief
1154 : !> Test whether the ParaDXXX sampler exits with an error message when the specified `targetAcceptanceRate` is out of range.
1155 6 : module function test_SpecBase_TargetAcceptanceRate_type_5() result(assertion)
1156 6 : use Constants_mod, only: IK, RK
1157 : implicit none
1158 : logical :: assertion
1159 6 : type(ParaDXXX_type) :: PD
1160 6 : assertion = .true.
1161 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
1162 : call PD%runSampler ( ndim = 1_IK &
1163 : , getLogFunc = getLogFuncMVN &
1164 : , mpiFinalizeRequested = .false. &
1165 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_TargetAcceptanceRate_type_5" &
1166 : , inputFile = ParaDXXX_NML//" targetAcceptanceRate(2) = 0. /" &
1167 6 : )
1168 6 : assertion = assertion .and. PD%Err%occurred
1169 : #endif
1170 14 : end function test_SpecBase_TargetAcceptanceRate_type_5
1171 :
1172 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1173 :
1174 : !> \brief
1175 : !> Test whether the ParaDXXX sampler does not do scaling when the `targetAcceptanceRate = [0., 1.]`.
1176 6 : module function test_SpecBase_TargetAcceptanceRate_type_6() result(assertion)
1177 6 : use Constants_mod, only: IK, RK
1178 : implicit none
1179 : logical :: assertion
1180 6 : type(ParaDXXX_type) :: PD
1181 : real(RK), parameter :: targetAcceptanceRate(*) = [0._RK, 1._RK]
1182 6 : assertion = .true.
1183 : #if defined CODECOV_ENABLED || defined SAMPLER_TEST_ENABLED
1184 : call PD%runSampler ( ndim = 1_IK &
1185 : , getLogFunc = getLogFuncMVN &
1186 : , mpiFinalizeRequested = .false. &
1187 : , outputFileName = Test%outDir//"/"//MODULE_NAME//"@SpecBase/test_SpecBase_TargetAcceptanceRate_type_6" &
1188 : , targetAcceptanceRate = targetAcceptanceRate &
1189 6 : )
1190 6 : assertion = assertion .and. .not. PD%Err%occurred .and. .not. PD%SpecBase%TargetAcceptanceRate%scalingRequested
1191 : #endif
1192 66 : end function test_SpecBase_TargetAcceptanceRate_type_6
1193 :
1194 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|