Conversation
|
I was able to build this after the soca-science/#625 on orion that updates spack-stack version. All the ctests pass for soca. I am testing with HAT10 now, will update soon. |
fmahebert
left a comment
There was a problem hiding this comment.
Mine is not an expert review, but these code changes look as expected to me
|
@hga007 FYI, in case any of this is useful to you. Yours should be more straightforward since you don't have the northern tripolar fold or cyclic E/W boundaries to deal with. I have code here that does extra checking to see which duplicate halo points need to be removed before being passed to atlas... but you shouldn't have any duplicates to worry about. |
|
@travissluka, Thank you! Indeed, it will be easier. I looked at your code and think it will be easier if I follow your approach. You did an excellent work implementing this feature. Cheers. |
|
note, tests pass, except for clang. not sure why, I don't have clang.... ignore that one for now. |
|
note to self, I disabled the FPE trapping on the diffusion dirac test. I'm not entirely sure why that's failing on clang only (see https://cdash.jcsda.org/test/186729). Odds are, like the other FPE issues, its something weird going on in a region of the halo that I don't care about, or on land. I'm not opening an issue because it's already on my todo list to someday go through and fix and remove as many |
|
The regional experiment fails with the following error |
That's weird, me thinking "eh, it should work, I don't need to test it with regional!" is usually never wrong!! |
|
@fmahebert I could look at your code, but it's probably faster for me to ask you: for the regional FV3, with the "halo" points that aren't owned by anyone because they are at the boundary of the regional domain, do you just assign them to the PE for the patch that is sitting closest to those "boundary halo-ish" points? |
| TEST_DEPENDS test_soca_gridgen | ||
| test_soca_static_socaerror_init) | ||
|
|
||
| # NOTE the following test throws a FPE only on clang |
There was a problem hiding this comment.
In the past I've seen clang-specific FPEs arising from clang's choice to optimize by speculatively evaluating possible branches, ignoring the fact that evaluating floating-point operations can have side effects like FPEs. As an example of what I mean, you could hide a division under if (denominator != 0) but clang might evaluate the branch anyway just in case it can use that early evaluation to optimize the code.
Could be what's happening here.
One workaround, if this is the problem and after it is localized, is to insert something the optimizer can't optimize into the if block, like an assembly-level instruction.
I say all this not as a change request but to share the info...
There was a problem hiding this comment.
ah, thanks for the info, that's good to know. That sounds like a likely cause, I believe the error is happening inside a gpnorm function where divide by 0 is possible so there should be an if checking for that.
Someday I'll get clang working on my linux machine to debug things like this.
@travissluka that's correct. My rationale was that if we later want to apply a proper boundary condition, that would likely be populated into the fv3 halos on that PE anyway. |
|
@kbhargava it should work for hat10 now. I only ran a check on the gridgen, not a full cycle. But I have changed the logic so that the nodes/cells representing the halo outside the domain to the north and east are removed. (note to self, that in the future we'll want to change that logic when/if we remove the "virtual land" that surrounds our domain) here is the mesh with HAT10 on 16 PEs and as a sanity check, a PE in the middle of the domain has halos on all sides: but the PE on the NE corner does not have halos above and to the right |
There was a problem hiding this comment.
Did you test at "high-res" @travissluka or @kbhargava ? Did you notice a change in the time it takes to run the geometry constructor?
Thanks for the pretty figures ...
|
|
@guillaumevernieres you doubt my mental ctests??? Fine, let me test with 1/4 deg global. oh wait... |
|
@guillaumevernieres @kbhargava never mind, false alarm! I was trying to test 1/4 deg but my I only tested the grid generation, I did not test a full cycle (I leave that as an exercise for the user!). Here is 1/4 deg with 32 PEs and the last PE along the tripolar fold showing halos and @guillaumevernieres there is no noticeable difference in run time, creating the atlas mesh is fast. |
|
The OOPS PR has been merged; this PR can be merged as well. (Unless if the clang CI needs more attention?) |
@fmahebert the clang CI was apparently breaking with NaNs before this PR... i just never noticed it. Deal with that later. |





Description
"evaporates the point cloud functionspace" 🌧️
Builds a proper atlas functionspace with mesh connectivity.
Geometryconstructor has been changed to pull the mesh information from the Fortran side, then pass the constructed functionspace back to FortrantoFieldSetAD(), passinglonlatfrom Fortran to C++, the weird hacks that were needed to avoid duplicate halo points)gmshdata when the grid is generated so that it can be viewed withgmsh(see images below, andgridgen.yml)Testing
note, spack stack 1.5.1 is required for these branches to work.
Here is what the grid looks like with the 5deg grid on 16 PEs

And if you're curious how weird the tripolar fold looks, here is one PE with halos

Dependencies
build-group=https://github.com/JCSDA-internal/oops/pull/2465
build-group=https://github.com/JCSDA-internal/saber/pull/729