-
Notifications
You must be signed in to change notification settings - Fork 253
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
Test MAPL v2.53.0 in UFS weather model #2346
Comments
@lipan-NOAA Can you confirm this version of MAPL works in GOCART for GEFSv13? Thanks |
@Hang-Lei-NOAA is MAPL 2.46.2 installed on Acorn/WCOSS2? |
I will add these today.
…On Mon, Jul 1, 2024 at 8:06 AM Brian Curtis ***@***.***> wrote:
@Hang-Lei-NOAA <https://github.com/Hang-Lei-NOAA> is MAPL 2.46.2
installed on Acorn/WCOSS2?
—
Reply to this email directly, view it on GitHub
<#2346 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKWSMFE5DZSFI5WKMRDN65LZKFA25AVCNFSM6AAAAABKB6TLROVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJZHE3DSNJQGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@Hang-Lei-NOAA Can you tell me where you installed it? |
@Li Pan - NOAA Affiliate ***@***.***> Please check here
module use
/lfs/h1/emc/nceplibs/noscrub/hpc-stack/libs/hpc-stack/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.9
module load esmf/8.6.1
module load mapl/4.6.2-esmf-8.6.1
…On Tue, Jul 2, 2024 at 10:47 AM lipan-NOAA ***@***.***> wrote:
@Hang-Lei-NOAA <https://github.com/Hang-Lei-NOAA> Can you tell me where
you installed it?
—
Reply to this email directly, view it on GitHub
<#2346 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKWSMFBJID7JN5QQCTIGLFDZKK4RPAVCNFSM6AAAAABKB6TLROVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBTGQYTMMBYGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
do you want this installed in spack-stack/1.6.0? and on which machine? |
@DusanJovic-NOAA @junwang-noaa new maple and esmf version are available on hercules and orion for the test and debug activities. @RatkoVasic-NOAA thanks for the installation!
|
As an FYI, the MAPL 2.46.3 fix was when using externally initialized MPI. (Which is something you all do but we don't do internally). We also had this notice to users:
My guess is you do not need to call |
@weiyuan-jiang may I ask what compiler/mpi versions you want to test? Thanks |
@junwang-noaa Well for that version of MAPL, we would have been testing with:
We never had Intel ifort 2021.9 on any machines we have. Are any of these possible? |
@AlexanderRichert-NOAA do we have these intel and GCC version on Hera or Hercules orGaea? |
I can't get onto Hera at the moment but for the others:
|
As we have access to Hercules/Orion, I guess ifort 2021.12 is our best bet at the moment (though I'd have to imagine there must be a recent-ish gcc on there). I'm fairly certain we can run with 2021.12. There were some bugfixes needed in places of GEOS (I don't think MAPL, but I can find out), so by the time we got them all in, 2021.13 was out, but I think 2021.12 works. Plus, we have 2021.12 on discover, so we can do some matching if need be. |
@weiyuan-jiang @mathomp4 Which MAPL version would you like us to test in UFS? I assume the ESMF version is 8.6.1 |
@junwang-noaa It doesn't matter. I can always replace the MAPL as long as it can be built and run under new compiler on Hercules |
MAPL code I reference is here: I do not understand where that special value should be provided and how is MAPL going to use that value? |
I didn't mean that MAPL should somehow reach into CMEPS for the value. I was just pointing out that by setting a special value (one that is never encountered), you can map to all destination points. |
Sorry, I still do not understand what should be set to a special value, a grid mask? The problem is that some of the fv3atm grid points have grid mask set to 0 and MAPL considers them as destination grid points that should be masked out. The fv3atm grid mask is defined in this routine https://github.com/NOAA-EMC/fv3atm/blob/a7d46eee01a78f0915373ebc58c9b20ba14a6c36/atmos_model.F90#L3654 |
The I'm probably misunderstanding, since I've never looked at MAPL. But the issue is that when the destination is ATM, you want all destination points mapped, right? Or is the destination in this case the aerosol "grid/mesh" ? |
Yes, it can be. But it is currently set to 0 (MAPL_MASK_OUT is 0). Here. That means any fv3atm destination point with grid mask 0 (all ocean points) will be masked out.
Yes. All fv3atm destination points should be mapped, ie. it should not have grid mask set to 0. If we can not redefine fv3atm grid mask to not use 0 for any grid point, which it seems we can not do, then either we pass the information to MAPL to not use 0 to mask out destination points. Or maybe somewhere in fv3atm or maybe in gocart we redefine grid mask that is going to be passed to MAPL. |
But why does the |
@weiyuan-jiang @tclune UFS is using a land sea mask on FV3 cubed sphere grid (0 for ocean and 1 for land) for coupling purposes. May I ask if the following line (MAPL_MASK_OUT) can be updated so that mask value 0 in UFS won't be considered undefined?
|
I think the constant value of MAPL_MASK_OUT should be updated |
With this change in GOCART I was able to make a successful (no floating point exception) run. diff --git a/ESMF/UFS/Aerosol_Cap.F90 b/ESMF/UFS/Aerosol_Cap.F90
index b753afa..e21ed11 100644
--- a/ESMF/UFS/Aerosol_Cap.F90
+++ b/ESMF/UFS/Aerosol_Cap.F90
@@ -243,6 +243,7 @@ contains
type(MAPL_CapOptions) :: maplCapOptions
type(Aerosol_InternalState_T) :: is
type(Aerosol_Tracer_T), pointer :: trp
+ integer(kind=ESMF_KIND_I4), pointer :: maskPtr(:,:)
! begin
rc = ESMF_SUCCESS
@@ -338,6 +339,10 @@ contains
file=__FILE__)) &
return ! bail out
+ call ESMF_GridGetItem(grid, itemflag=ESMF_GRIDITEM_MASK, &
+ staggerloc=ESMF_STAGGERLOC_CENTER, farrayPtr=maskPtr, _RC)
+ maskPtr = 1
+
! provide model grid to MAPL
call cap % cap_gc % set_grid(grid, lm=nlev, _RC) This change explicitly sets all grid mask points to 1, before passing the grid to MAPL. |
Ben has a new PR (GEOS-ESM/MAPL#3281) to solve the problem on MAPL. So no need to change on ufs |
@weiyuan-jiang Thanks for the update. It's good to know that no changes in fv3atm nor gocart are necessary to solve the issues with masking in MAPL regridding. Any progress with cubed sphere subgrids issue when threading is used. |
@DusanJovic-NOAA I have opened an issue on MAPL. (GEOS-ESM/MAPL#3274) . It seems multi-threading is not working at this point |
@weiyuan-jiang I see the MAPL team has released version 2.52.0, which includes the fix for grid masks. I tested it together with recently releases ESMF 8.8.0 on Hercules and all ufs-weather-model regression test passed (using intel compiler, I did not test gnu). I had to turn off OpenMP threading in GOCART due to the first issue with cubed-sphere grids and threading. |
@DusanJovic-NOAA Do you want mapl to be updated to 2.52.0 for spack-stack-1.9.0 (we already have esmf 8.8.0)? We are hoping to cut the release branch tomorrow, thus this would be just in time. Thanks! |
Note: We do think we have the fix for the GOCART OpenMP issue here: I believe it worked for @weiyuan-jiang on Hercules, but if it works for you, I could get a MAPL version out tomorrow. Also, MAPL 2.52 doesn't (yet) require ESMF 8.8 as we don't need any features from that yet in MAPL2. MAPL3 does currently require it. |
Thanks for the update @mathomp4. I am using a shell script provided by @AlexanderRichert-NOAA to build chained spack environment with updated ESMF and MAPL to run test on Hercules. If you can make a temporary tag or branch or something that spack can point to (I'm not sure if it has to be release), I should be able to try that version that includes OpenMP fix from 3350 PR you mentioned above. And if we can get that tested before @climbfuji needs to cut release for 1.9.0 spack-stack that would be perfect. |
Other components/models need esmf 8.8.0, might as well use that across the board if it works for Dusan. Thanks Matt! |
@DusanJovic-NOAA I've tagged with |
Thanks. @AlexanderRichert-NOAA is there a way to use this tag (specific commit hash) in your env chainer script to build MAPL. |
@DusanJovic-NOAA in theory yes-- I just made a small tweak in the env chainer script to allow it to use Spack's built-in support for using git references. For the mapl spec, it would be something like |
Thanks. Let me try that. |
I just confirmed with @weiyuan-jiang that he didn't do anything else after using that new MAPL code. He kept OpenMP on in his test. He did mention you'll need to make sure you have |
I successfully compiled MAPL tag (commit 260d563d08ff0d3e8436ec33ed98a362110e731b) using @AlexanderRichert-NOAA instructions, and I am running all intel ufs-wm regression tests. So far all tests passed (most importantly, cpld_control_p8_intel passed, which is the test that was failing previously). This is the configuration with:
So looks like we finally have a version of MAPL that fixes both issues, cubed_sphere grid with threading and masking of ESMF_grid due to mask value conflict between fv3atm and mapl. In the meantime I will try to build spack-stack using GNU, and run gnu ufs-wm regression tests, just to be sure. |
I should also mention that in order to use ufs-wm with ESMF v8.8.0 an update in GOCART was needed. In my tests, I used a branch @theurich created that has some updates for esmf 8.8.0. This one. So before we can actually switch to 8.8.0 this change will need to be merged in gocart. The only issue is that we (ufs-wm) are still using a gocart commit from Sep 2023. And Gerhard's changes are on top of that commit. Somebody will need to port Gerhard's changes to newer gocart and then update ufs-wm to use that version. |
@mathomp4 or @DusanJovic-NOAA Would you mind creating an issue in github.com/jcsda/spack-stack to update MAPL to version x.y.z for spack-stack-1.9.0, and list changes to the build options (if applicable)? Thanks! |
I'm going to work on getting MAPL 2.53 out now. Shouldn't take me too long. Then you'll have a semver tag rather than a crazy git-hash. ETA: Well, might take about 30-40 minutes. My final test is a full run on discover to make sure it is zero-diff, etc. and good ol' CMake has decided to rebuild the full model. I really hope |
MAPL 2.53.0 has been released: https://github.com/GEOS-ESM/MAPL/releases/tag/v2.53.0 And I have a PR to spack: and an issue for JCSDA/spack-stack: Though that last one might not be "complete" as I'm not sure if any updates are needed for how MAPL is built, etc. |
Thanks @mathomp4 ! |
Description
MAPL 2.46.2 has fixes for issue #2162. UFS weather model needs to be tested and updated with this version.
20240830:
MAPL 2.46.2 has a bug. MAPL 2.46.3 should be installed and tested in UFS weather model. The issue title is updated.
Solution
Alternatives
Related to
The text was updated successfully, but these errors were encountered: