ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
test_pm_arraySpace.F90
Go to the documentation of this file.
1!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3!!!! !!!!
4!!!! ParaMonte: Parallel Monte Carlo and Machine Learning Library. !!!!
5!!!! !!!!
6!!!! Copyright (C) 2012-present, The Computational Data Science Lab !!!!
7!!!! !!!!
8!!!! This file is part of the ParaMonte library. !!!!
9!!!! !!!!
10!!!! LICENSE !!!!
11!!!! !!!!
12!!!! https://github.com/cdslaborg/paramonte/blob/main/LICENSE.md !!!!
13!!!! !!!!
14!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
24
26
28 use pm_err, only: err_type
29 use pm_test, only: test_type, LK
30 implicit none
31
32 private
33 public :: setTest
34 type(test_type) :: test
35
36!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37
38 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
39
40 interface
41#if CK5_ENABLED
42 module function test_getLinSpace_CK5() result(assertion); logical(LK) :: assertion; end function
43#endif
44#if CK4_ENABLED
45 module function test_getLinSpace_CK4() result(assertion); logical(LK) :: assertion; end function
46#endif
47#if CK3_ENABLED
48 module function test_getLinSpace_CK3() result(assertion); logical(LK) :: assertion; end function
49#endif
50#if CK2_ENABLED
51 module function test_getLinSpace_CK2() result(assertion); logical(LK) :: assertion; end function
52#endif
53#if CK1_ENABLED
54 module function test_getLinSpace_CK1() result(assertion); logical(LK) :: assertion; end function
55#endif
56 end interface
57
58 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
59
60 interface
61#if RK5_ENABLED
62 module function test_getLinSpace_RK5() result(assertion); logical(LK) :: assertion; end function
63#endif
64#if RK4_ENABLED
65 module function test_getLinSpace_RK4() result(assertion); logical(LK) :: assertion; end function
66#endif
67#if RK3_ENABLED
68 module function test_getLinSpace_RK3() result(assertion); logical(LK) :: assertion; end function
69#endif
70#if RK2_ENABLED
71 module function test_getLinSpace_RK2() result(assertion); logical(LK) :: assertion; end function
72#endif
73#if RK1_ENABLED
74 module function test_getLinSpace_RK1() result(assertion); logical(LK) :: assertion; end function
75#endif
76 end interface
77
78 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
79
80!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
81
82 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
83
84 interface
85#if CK5_ENABLED
86 module function test_setLinSpace_CK5() result(assertion); logical(LK) :: assertion; end function
87#endif
88#if CK4_ENABLED
89 module function test_setLinSpace_CK4() result(assertion); logical(LK) :: assertion; end function
90#endif
91#if CK3_ENABLED
92 module function test_setLinSpace_CK3() result(assertion); logical(LK) :: assertion; end function
93#endif
94#if CK2_ENABLED
95 module function test_setLinSpace_CK2() result(assertion); logical(LK) :: assertion; end function
96#endif
97#if CK1_ENABLED
98 module function test_setLinSpace_CK1() result(assertion); logical(LK) :: assertion; end function
99#endif
100 end interface
101
102 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
103
104 interface
105#if RK5_ENABLED
106 module function test_setLinSpace_RK5() result(assertion); logical(LK) :: assertion; end function
107#endif
108#if RK4_ENABLED
109 module function test_setLinSpace_RK4() result(assertion); logical(LK) :: assertion; end function
110#endif
111#if RK3_ENABLED
112 module function test_setLinSpace_RK3() result(assertion); logical(LK) :: assertion; end function
113#endif
114#if RK2_ENABLED
115 module function test_setLinSpace_RK2() result(assertion); logical(LK) :: assertion; end function
116#endif
117#if RK1_ENABLED
118 module function test_setLinSpace_RK1() result(assertion); logical(LK) :: assertion; end function
119#endif
120 end interface
121
122 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
123
124!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
125
126 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
127
128 interface
129#if CK5_ENABLED
130 module function test_getLogSpace_CK5() result(assertion); logical(LK) :: assertion; end function
131#endif
132#if CK4_ENABLED
133 module function test_getLogSpace_CK4() result(assertion); logical(LK) :: assertion; end function
134#endif
135#if CK3_ENABLED
136 module function test_getLogSpace_CK3() result(assertion); logical(LK) :: assertion; end function
137#endif
138#if CK2_ENABLED
139 module function test_getLogSpace_CK2() result(assertion); logical(LK) :: assertion; end function
140#endif
141#if CK1_ENABLED
142 module function test_getLogSpace_CK1() result(assertion); logical(LK) :: assertion; end function
143#endif
144 end interface
145
146 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
147
148 interface
149#if RK5_ENABLED
150 module function test_getLogSpace_RK5() result(assertion); logical(LK) :: assertion; end function
151#endif
152#if RK4_ENABLED
153 module function test_getLogSpace_RK4() result(assertion); logical(LK) :: assertion; end function
154#endif
155#if RK3_ENABLED
156 module function test_getLogSpace_RK3() result(assertion); logical(LK) :: assertion; end function
157#endif
158#if RK2_ENABLED
159 module function test_getLogSpace_RK2() result(assertion); logical(LK) :: assertion; end function
160#endif
161#if RK1_ENABLED
162 module function test_getLogSpace_RK1() result(assertion); logical(LK) :: assertion; end function
163#endif
164 end interface
165
166 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
167
168!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
169
170 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
171
172 interface
173#if CK5_ENABLED
174 module function test_setLogSpace_CK5() result(assertion); logical(LK) :: assertion; end function
175#endif
176#if CK4_ENABLED
177 module function test_setLogSpace_CK4() result(assertion); logical(LK) :: assertion; end function
178#endif
179#if CK3_ENABLED
180 module function test_setLogSpace_CK3() result(assertion); logical(LK) :: assertion; end function
181#endif
182#if CK2_ENABLED
183 module function test_setLogSpace_CK2() result(assertion); logical(LK) :: assertion; end function
184#endif
185#if CK1_ENABLED
186 module function test_setLogSpace_CK1() result(assertion); logical(LK) :: assertion; end function
187#endif
188 end interface
189
190 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
191
192 interface
193#if RK5_ENABLED
194 module function test_setLogSpace_RK5() result(assertion); logical(LK) :: assertion; end function
195#endif
196#if RK4_ENABLED
197 module function test_setLogSpace_RK4() result(assertion); logical(LK) :: assertion; end function
198#endif
199#if RK3_ENABLED
200 module function test_setLogSpace_RK3() result(assertion); logical(LK) :: assertion; end function
201#endif
202#if RK2_ENABLED
203 module function test_setLogSpace_RK2() result(assertion); logical(LK) :: assertion; end function
204#endif
205#if RK1_ENABLED
206 module function test_setLogSpace_RK1() result(assertion); logical(LK) :: assertion; end function
207#endif
208 end interface
209
210 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
211
212!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
213
214contains
215
216!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
217
218 subroutine setTest()
219
220 implicit none
222
223 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
224
225 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
226
227#if CK5_ENABLED
228 call test%run(test_getLinSpace_CK5, SK_"test_getLinSpace_CK5")
229#endif
230#if CK4_ENABLED
231 call test%run(test_getLinSpace_CK4, SK_"test_getLinSpace_CK4")
232#endif
233#if CK3_ENABLED
234 call test%run(test_getLinSpace_CK3, SK_"test_getLinSpace_CK3")
235#endif
236#if CK2_ENABLED
237 call test%run(test_getLinSpace_CK2, SK_"test_getLinSpace_CK2")
238#endif
239#if CK1_ENABLED
240 call test%run(test_getLinSpace_CK1, SK_"test_getLinSpace_CK1")
241#endif
242
243 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
244
245#if RK5_ENABLED
246 call test%run(test_getLinSpace_RK5, SK_"test_getLinSpace_RK5")
247#endif
248#if RK4_ENABLED
249 call test%run(test_getLinSpace_RK4, SK_"test_getLinSpace_RK4")
250#endif
251#if RK3_ENABLED
252 call test%run(test_getLinSpace_RK3, SK_"test_getLinSpace_RK3")
253#endif
254#if RK2_ENABLED
255 call test%run(test_getLinSpace_RK2, SK_"test_getLinSpace_RK2")
256#endif
257#if RK1_ENABLED
258 call test%run(test_getLinSpace_RK1, SK_"test_getLinSpace_RK1")
259#endif
260
261 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
262
263 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
264
265#if CK5_ENABLED
266 call test%run(test_setLinSpace_CK5, SK_"test_setLinSpace_CK5")
267#endif
268#if CK4_ENABLED
269 call test%run(test_setLinSpace_CK4, SK_"test_setLinSpace_CK4")
270#endif
271#if CK3_ENABLED
272 call test%run(test_setLinSpace_CK3, SK_"test_setLinSpace_CK3")
273#endif
274#if CK2_ENABLED
275 call test%run(test_setLinSpace_CK2, SK_"test_setLinSpace_CK2")
276#endif
277#if CK1_ENABLED
278 call test%run(test_setLinSpace_CK1, SK_"test_setLinSpace_CK1")
279#endif
280
281 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
282
283#if RK5_ENABLED
284 call test%run(test_setLinSpace_RK5, SK_"test_setLinSpace_RK5")
285#endif
286#if RK4_ENABLED
287 call test%run(test_setLinSpace_RK4, SK_"test_setLinSpace_RK4")
288#endif
289#if RK3_ENABLED
290 call test%run(test_setLinSpace_RK3, SK_"test_setLinSpace_RK3")
291#endif
292#if RK2_ENABLED
293 call test%run(test_setLinSpace_RK2, SK_"test_setLinSpace_RK2")
294#endif
295#if RK1_ENABLED
296 call test%run(test_setLinSpace_RK1, SK_"test_setLinSpace_RK1")
297#endif
298
299 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
300
301 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
302
303 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
304
305#if CK5_ENABLED
306 call test%run(test_getLogSpace_CK5, SK_"test_getLogSpace_CK5")
307#endif
308#if CK4_ENABLED
309 call test%run(test_getLogSpace_CK4, SK_"test_getLogSpace_CK4")
310#endif
311#if CK3_ENABLED
312 call test%run(test_getLogSpace_CK3, SK_"test_getLogSpace_CK3")
313#endif
314#if CK2_ENABLED
315 call test%run(test_getLogSpace_CK2, SK_"test_getLogSpace_CK2")
316#endif
317#if CK1_ENABLED
318 call test%run(test_getLogSpace_CK1, SK_"test_getLogSpace_CK1")
319#endif
320
321 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
322
323#if RK5_ENABLED
324 call test%run(test_getLogSpace_RK5, SK_"test_getLogSpace_RK5")
325#endif
326#if RK4_ENABLED
327 call test%run(test_getLogSpace_RK4, SK_"test_getLogSpace_RK4")
328#endif
329#if RK3_ENABLED
330 call test%run(test_getLogSpace_RK3, SK_"test_getLogSpace_RK3")
331#endif
332#if RK2_ENABLED
333 call test%run(test_getLogSpace_RK2, SK_"test_getLogSpace_RK2")
334#endif
335#if RK1_ENABLED
336 call test%run(test_getLogSpace_RK1, SK_"test_getLogSpace_RK1")
337#endif
338
339 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
340
341 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
342
343#if CK5_ENABLED
344 call test%run(test_setLogSpace_CK5, SK_"test_setLogSpace_CK5")
345#endif
346#if CK4_ENABLED
347 call test%run(test_setLogSpace_CK4, SK_"test_setLogSpace_CK4")
348#endif
349#if CK3_ENABLED
350 call test%run(test_setLogSpace_CK3, SK_"test_setLogSpace_CK3")
351#endif
352#if CK2_ENABLED
353 call test%run(test_setLogSpace_CK2, SK_"test_setLogSpace_CK2")
354#endif
355#if CK1_ENABLED
356 call test%run(test_setLogSpace_CK1, SK_"test_setLogSpace_CK1")
357#endif
358
359 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
360
361#if RK5_ENABLED
362 call test%run(test_setLogSpace_RK5, SK_"test_setLogSpace_RK5")
363#endif
364#if RK4_ENABLED
365 call test%run(test_setLogSpace_RK4, SK_"test_setLogSpace_RK4")
366#endif
367#if RK3_ENABLED
368 call test%run(test_setLogSpace_RK3, SK_"test_setLogSpace_RK3")
369#endif
370#if RK2_ENABLED
371 call test%run(test_setLogSpace_RK2, SK_"test_setLogSpace_RK2")
372#endif
373#if RK1_ENABLED
374 call test%run(test_setLogSpace_RK1, SK_"test_setLogSpace_RK1")
375#endif
376
377 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
378
379 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
380
381 call test%summarize()
382
383 end subroutine setTest
384
385!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
386
387end module test_pm_arraySpace ! LCOV_EXCL_LINE
This module contains procedures and generic interfaces for generating arrays with linear or logarithm...
character(*, SK), parameter MODULE_NAME
This module contains classes and procedures for reporting and handling errors.
Definition: pm_err.F90:52
This module contains a simple unit-testing framework for the Fortran libraries, including the ParaMon...
Definition: pm_test.F90:42
This module contains tests of the module pm_arraySpace.
This is the derived type for generating objects to gracefully and verbosely handle runtime unexpected...
Definition: pm_err.F90:157
This is the derived type test_type for generating objects that facilitate testing of a series of proc...
Definition: pm_test.F90:209