-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
farrayPtr2DCpy (a.k.a. arrayDup) is not initialized in ESMF_ArrayCreateGetUTest.F90 #288
Comments
@theurich @oehmke We could
|
I agree that this test is fundamentally problematic, and can only be guaranteed 100% when using compiler level initialization as you point out. However, that gets tricky and requires maintenance when supporting many different compilers, and their versions... which is why I would like to stay away from that. I think we could make the test more robust (not 100% but better than now) by (1) more obscure init data (as you suggest), and (2) turning around the verification logic. Currently the logic sets |
* fill array with huge - localpet * fail if every element in array matches
* fill array with random number 0 - 1000 * fail if every element in array matches
esmf/src/Infrastructure/Array/tests/ESMF_ArrayCreateGetUTest.F90
Line 408 in 82ba326
Test Failure
Verify Array vs Array Copy (ALLOC) no data copy, ESMF_ArrayCreateGetUTest.F90, line 411: Unexpected data copy
if (abs(farrayPtr2D(i,j)-farrayPtr2DCpy(i,j)) < 1.d-10) dataCorrect=.false.
Initialization for farrayPtr2DCpy never happens because it is created with ESMF_DATACOPY_ALLOC
arrayDup = ESMF_ArrayCreate(array, datacopyflag=ESMF_DATACOPY_ALLOC, rc=rc)
Initialization for farrayPtr2D
farrayPtr2D = real(localPet+10, ESMF_KIND_R8)
This causes intermittent failures
The text was updated successfully, but these errors were encountered: