Commit 50c4eef
committed
Avoid repeated ESMF initialization in unittestTimeManagerMod.F90
ESMF was being repeatedly initialized in unittestTimeManagerMod.F90,
which is an error. This led to unit tests failing silently. This commit
fixes the issue by checking if ESMF is already initialized before
calling ESMF_Initialize, and not calling ESMF_Finalize at the end of
each unit test.
Currently this skips any calls to ESMF_Finalize, as it is an error to
re-call ESMF_Initialize after calling ESMF_Finalize. A better solution
would be to only call ESMF_Initialize and ESMF_Finalize once per unit
test executable. I am looking into whether that's possible. I'm not sure
if it will cause any problems to not do the ESMF_Finalize.
See #3015 (comment)
for details.
Resolves #30151 parent 8cc1d42 commit 50c4eef
1 file changed
+16
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | | - | |
| 93 | + | |
93 | 94 | | |
94 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
95 | 102 | | |
96 | 103 | | |
97 | 104 | | |
| |||
219 | 226 | | |
220 | 227 | | |
221 | 228 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
226 | 235 | | |
227 | 236 | | |
228 | 237 | | |
| |||
0 commit comments