Line data Source code
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 :
17 : !> \brief
18 : !> This file contains the implementations of the generic interfaces in [pm_sampling]@(ref pm_sampling).
19 : !>
20 : !> \test
21 : !> [test_pm_sampling](@ref test_pm_sampling)
22 : !>
23 : !> \finmain
24 : !>
25 : !> \author
26 : !> \AmirShahmoradi, September 1, 2012, 12:00 AM, National Institute for Fusion Studies, The University of Texas at Austin
27 :
28 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
29 :
30 : submodule (pm_sampling) routines
31 :
32 : ! \bug
33 : ! Avoid Intel ifort bug for too many `use` statements in a submodule by placing them all in the submodule header.
34 : #if CHECK_ENABLED
35 : use pm_err, only: setAsserted, getFine
36 : #define CHECK_ASSERTION(LINE,ASSERTION,MSG) \
37 : call setAsserted(ASSERTION,getFine(__FILE__,LINE)//MODULE_NAME//MSG);
38 : #else
39 : #define CHECK_ASSERTION(LINE,ASSERTION,MSG) continue;
40 : #endif
41 :
42 : !use pm_str, only: UNDEFINED
43 : use pm_sampleCor, only: getCor
44 : use pm_statest, only: getProbKS
45 : use pm_sampleMean, only: setMean
46 : use pm_distanceKolm, only: ascending
47 : use pm_distanceKolm, only: getDisKolm
48 : use pm_arrayVerbose, only: getVerbose
49 : use pm_matrixCopy, only: setMatCopy, rdpack, transHerm
50 : use pm_sampleCov, only: setCovMean, setCov, lowDia, uppDia
51 : use pm_distGeomCyclic, only: isFailedGeomCyclicFit
52 : use pm_arrayComplement, only: getComplementRange
53 : use pm_parallelism, only: setForkJoinScaling
54 : use pm_arrayUnique, only: setUnique
55 : use pm_arraySort, only: setSorted
56 : use pm_kind, only: modelr_type
57 : use pm_container, only: css_type
58 : use pm_io, only: getErrTableRead, trans
59 : use, intrinsic :: iso_fortran_env, only: output_unit
60 : use pm_arrayFill, only: getFilled
61 : use pm_mathCumSum, only: setCumSum
62 : use pm_distUnif, only: getUnifRand
63 : use pm_arrayInit, only: setCoreHalo
64 : use pm_arrayCenter, only: setCentered
65 : use pm_arrayReplace, only: getReplaced
66 : use pm_io, only: INDENT, display_type
67 : use pm_distUnif, only: setUnifRand
68 : use pm_distUnif, only: getUnifRandState
69 : use pm_distUnif, only: getUnifRandStateSize
70 : use pm_mathNumSys, only: getCountDigit
71 : use pm_matrixInit, only: getMatInit, setMatInit, uppLowDia
72 : use pm_parallelism, only: setImageCount, isFailedImage
73 : use pm_sysPath, only: LENPATH => MAX_LEN_FILE_PATH
74 : use pm_strASCII, only: getStrLower, setStrLower
75 : use pm_sysShell, only: isFailedGetShellWidth
76 : use pm_option, only: getOption
77 : use pm_val2str, only: getStr
78 : use pm_err, only: err_type
79 : use pm_except, only: setNAN
80 : use pm_except, only: setInfPos
81 : use pm_arraySplit, only: setSplit
82 : use pm_arrayResize, only: setResized
83 : use pm_arrayRebind, only: setRebound
84 : use pm_matrixChol, only: setMatChol
85 : use pm_distUnif, only: xoshiro256ssw_type
86 : use pm_dateTime, only: getDateTime
87 : !use pm_except, only: isInfNeg, setInfNeg
88 : use pm_arrayRefine, only: setRefined
89 : use pm_sampleWeight, only: setReweight
90 : use pm_sampleWeight, only: getReweight
91 : use pm_mathLogSumExp, only: getLogSumExp
92 : use pm_sampleQuan, only: getQuan, neimean!, piwilin ! piwilin is problematic, because some states can be repeated, although highly unlikely.
93 : use pm_io, only: getFileUnit
94 : use pm_err, only: getLine
95 :
96 : implicit none
97 :
98 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
99 :
100 : contains
101 :
102 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
103 :
104 : #define getErrSampling_ENABLED 1
105 :
106 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
107 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
108 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
109 :
110 : #define ParaDRAM_ENABLED 1
111 :
112 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
113 :
114 : #define RK_ENABLED 1
115 :
116 : #if RK5_ENABLED
117 : module procedure getErrParaDRAM_RK5
118 : #define pm_sampling_kernel pm_sampling_kernel_dram_RK5
119 : #include "pm_sampling@routines.inc.F90"
120 : #undef pm_sampling_kernel
121 : end procedure
122 : #endif
123 :
124 : #if RK4_ENABLED
125 0 : module procedure getErrParaDRAM_RK4
126 : #define pm_sampling_kernel pm_sampling_kernel_dram_RK4
127 : #include "pm_sampling@routines.inc.F90"
128 : #undef pm_sampling_kernel
129 0 : end procedure
130 : #endif
131 :
132 : #if RK3_ENABLED
133 0 : module procedure getErrParaDRAM_RK3
134 : #define pm_sampling_kernel pm_sampling_kernel_dram_RK3
135 : #include "pm_sampling@routines.inc.F90"
136 : #undef pm_sampling_kernel
137 0 : end procedure
138 : #endif
139 :
140 : #if RK2_ENABLED
141 12 : module procedure getErrParaDRAM_RK2
142 : #define pm_sampling_kernel pm_sampling_kernel_dram_RK2
143 : #include "pm_sampling@routines.inc.F90"
144 : #undef pm_sampling_kernel
145 269 : end procedure
146 : #endif
147 :
148 : #if RK1_ENABLED
149 1 : module procedure getErrParaDRAM_RK1
150 : #define pm_sampling_kernel pm_sampling_kernel_dram_RK1
151 : #include "pm_sampling@routines.inc.F90"
152 : #undef pm_sampling_kernel
153 27 : end procedure
154 : #endif
155 :
156 : #undef RK_ENABLED
157 :
158 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
159 :
160 : #undef ParaDRAM_ENABLED
161 :
162 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
163 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
164 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
165 :
166 : #define ParaDISE_ENABLED 1
167 :
168 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
169 :
170 : #define RK_ENABLED 1
171 :
172 : #if RK5_ENABLED
173 : module procedure getErrParaDISE_RK5
174 : #define pm_sampling_kernel pm_sampling_kernel_dram_RK5
175 : #include "pm_sampling@routines.inc.F90"
176 : #undef pm_sampling_kernel
177 : end procedure
178 : #endif
179 :
180 : #if RK4_ENABLED
181 0 : module procedure getErrParaDISE_RK4
182 : #define pm_sampling_kernel pm_sampling_kernel_dram_RK4
183 : #include "pm_sampling@routines.inc.F90"
184 : #undef pm_sampling_kernel
185 0 : end procedure
186 : #endif
187 :
188 : #if RK3_ENABLED
189 0 : module procedure getErrParaDISE_RK3
190 : #define pm_sampling_kernel pm_sampling_kernel_dram_RK3
191 : #include "pm_sampling@routines.inc.F90"
192 : #undef pm_sampling_kernel
193 0 : end procedure
194 : #endif
195 :
196 : #if RK2_ENABLED
197 0 : module procedure getErrParaDISE_RK2
198 : #define pm_sampling_kernel pm_sampling_kernel_dram_RK2
199 : #include "pm_sampling@routines.inc.F90"
200 : #undef pm_sampling_kernel
201 0 : end procedure
202 : #endif
203 :
204 : #if RK1_ENABLED
205 0 : module procedure getErrParaDISE_RK1
206 : #define pm_sampling_kernel pm_sampling_kernel_dram_RK1
207 : #include "pm_sampling@routines.inc.F90"
208 : #undef pm_sampling_kernel
209 0 : end procedure
210 : #endif
211 :
212 : #undef RK_ENABLED
213 :
214 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
215 :
216 : #undef ParaDISE_ENABLED
217 :
218 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
219 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
220 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
221 :
222 : #undef getErrSampling_ENABLED
223 :
224 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
225 :
226 0 : subroutine killMeAlreadyCMake1_RK5(); use pm_sampling_kernel_dise_RK5, only: RKC; end subroutine
227 0 : subroutine killMeAlreadyCMake1_RK4(); use pm_sampling_kernel_dise_RK4, only: RKC; end subroutine
228 0 : subroutine killMeAlreadyCMake1_RK3(); use pm_sampling_kernel_dise_RK3, only: RKC; end subroutine
229 0 : subroutine killMeAlreadyCMake1_RK2(); use pm_sampling_kernel_dise_RK2, only: RKC; end subroutine
230 0 : subroutine killMeAlreadyCMake1_RK1(); use pm_sampling_kernel_dise_RK1, only: RKC; end subroutine
231 :
232 0 : subroutine killMeAlreadyCMake2_RK5(); use pm_sampling_kernel_dram_RK5, only: RKC; end subroutine
233 0 : subroutine killMeAlreadyCMake2_RK4(); use pm_sampling_kernel_dram_RK4, only: RKC; end subroutine
234 0 : subroutine killMeAlreadyCMake2_RK3(); use pm_sampling_kernel_dram_RK3, only: RKC; end subroutine
235 0 : subroutine killMeAlreadyCMake2_RK2(); use pm_sampling_kernel_dram_RK2, only: RKC; end subroutine
236 0 : subroutine killMeAlreadyCMake2_RK1(); use pm_sampling_kernel_dram_RK1, only: RKC; end subroutine
237 :
238 : !subroutine killMeAlreadyCMake3_RK5(); use pm_sampling_kernel_nest_RK5, only: RKC; end subroutine
239 : !subroutine killMeAlreadyCMake3_RK4(); use pm_sampling_kernel_nest_RK4, only: RKC; end subroutine
240 : !subroutine killMeAlreadyCMake3_RK3(); use pm_sampling_kernel_nest_RK3, only: RKC; end subroutine
241 : !subroutine killMeAlreadyCMake3_RK2(); use pm_sampling_kernel_nest_RK2, only: RKC; end subroutine
242 : !subroutine killMeAlreadyCMake3_RK1(); use pm_sampling_kernel_nest_RK1, only: RKC; end subroutine
243 :
244 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
245 :
246 : end submodule routines
|