Skip to content

support for ufs-s2s-model debug compilaiton#40

Merged
MinsukJi-NOAA merged 4 commits into
NOAA-EMC:developfrom
MinsukJi-NOAA:feature/s2s_debug
Apr 27, 2020
Merged

support for ufs-s2s-model debug compilaiton#40
MinsukJi-NOAA merged 4 commits into
NOAA-EMC:developfrom
MinsukJi-NOAA:feature/s2s_debug

Conversation

@MinsukJi-NOAA
Copy link
Copy Markdown
Collaborator

  • automatically enable NEMS_BUILDOPT=DEBUG=Y based on coupledFV3_MOM6_CICE_debug.appBuilder
  • automatically use esmf/8.0.0g module based on coupledFV3_MOM6_CICE_debug.appBuilder

* automatically enable NEMS_BUILDOPT=DEBUG=Y based on coupledFV3_MOM6_CICE_debug.appBuilder
* automatically use esmf/8.0.0g module based on coupledFV3_MOM6_CICE_debug.appBuilder
@DeniseWorthen
Copy link
Copy Markdown
Contributor

I will try this in the s2s branch I am working for with CMEPS. In that case, we build the alternate mediator using COMPONENTS=( FMS FV3%CMEPS=Y MOM6 CICE CMEPS ) in the appbuilder. The debug version uses CMEPS%DEBUG=Y, so I need to add the MAKE_OPT to the component_CMEPS.mk. Will the configure_rules.mk break if a component is listed that isn't being built?

@MinsukJi-NOAA
Copy link
Copy Markdown
Collaborator Author

I will try this in the s2s branch I am working for with CMEPS. In that case, we build the alternate mediator using COMPONENTS=( FMS FV3%CMEPS=Y MOM6 CICE CMEPS ) in the appbuilder. The debug version uses CMEPS%DEBUG=Y, so I need to add the MAKE_OPT to the component_CMEPS.mk. Will the configure_rules.mk break if a component is listed that isn't being built?

If you specify "COMPONENTS=( FMS FV3%DEBUG=Y%CMEPS=Y MOM6%DEBUG=Y CICE%DEBUG=Y CMEPS%DEBUG=Y )", it should work.

@MinsukJi-NOAA
Copy link
Copy Markdown
Collaborator Author

ufs-weather-model regression tests passed on hera:
RegressionTests_hera.intel.log

@DeniseWorthen
Copy link
Copy Markdown
Contributor

I tried the CMEPS version of the build but I had two problems.

  1. The auto-set of the esmf g library didn't work
  2. The NEMS mediator compile still doesn't seem to pick up the compiler flags from the esmf.mk. I do see that the cice_cap, the mom_cap and the CMEP/mediator code all compiles w/ the fflags of the debug esmf library.

My test build is here: /scratch2/NCEPDEV/climate/Denise.Worthen/WORK/TSTdebug/CMEPS_br/NEMS

In NEMS/debugbuild_setg I've set the esmfg manually. See line 2213 for the compile of module_MEDIATOR.F90 using '-O2 -debug minimal'.

I will try with just the NEMS version and report back.

@DeniseWorthen
Copy link
Copy Markdown
Contributor

I apologize for this taking so long for me to review. It appears to be working on hera; I now see the code w/in NEMS/src compiled with debug flags. I've also built the CMEPS mediator version and that also compiles w/ the correct debug flags if I add CMEPS_MAKEOPT to the component_CMEPS.mk. When we move to cmeps we'll need to add that as a debug option.

The auto-load of the esmf debug modules I now realize is problematic though. It works on Hera because we have a single module to point to (esmf8.0.0g). It is different on Cheyenne though (first load esmf_libs/8.0.0 and then a specific debug module). I think we might just have to leave it to the user to load the correct esmf debug modules.

@JessicaMeixner-NOAA
Copy link
Copy Markdown
Contributor

At one point, we would specify which module file to use in the appBuilder file. Now that is done in conf/before_components.mk Maybe we would add a module file fv3_coupled_debug and choose that module file in conf/before_components.mk based on some setting. I don't remember the order of what gets read first.

@MinsukJi-NOAA
Copy link
Copy Markdown
Collaborator Author

Right...it is specified in before_components.mk. I can't remember the details now, but it was not so straightforward to auto load a different esmf module, because it was a prerequisite of build_NEMS target in NEMS.mk. For this PR, let me remove the automatic esmf module change. So... it will just be the NEMS_BUILDOPT=DEBUG=Y.

*Remove the previous approach of auto-loading esmf debug module
*Use S2S_DEBUB_MODULE env var to load machine-dependent esmf debug module
*Require ufs-s2s-model/modules/${BUILD_TARGET}/fv3_coupled_debug file
@MinsukJi-NOAA
Copy link
Copy Markdown
Collaborator Author

  • ufs-s2s-model successfully completed RT on Hera ( @binli2337 )
  • ufs-weather-model successfully completed RT (NEMSCompsetRun) on Hera

@MinsukJi-NOAA MinsukJi-NOAA merged commit 6e36027 into NOAA-EMC:develop Apr 27, 2020
DeniseWorthen added a commit to DeniseWorthen/NEMS that referenced this pull request Apr 27, 2020
support for ufs-s2s-model debug compilaiton (NOAA-EMC#40)
@MinsukJi-NOAA MinsukJi-NOAA deleted the feature/s2s_debug branch May 8, 2020 13:40
DeniseWorthen added a commit to DeniseWorthen/NEMS that referenced this pull request May 23, 2020
* support for ufs-s2s-model debug compilaiton (NOAA-EMC#40)

* automatically enable NEMS_BUILDOPT=DEBUG=Y based on coupledFV3_MOM6_CICE_debug.appBuilder
* automatically use esmf/8.0.0g module based on coupledFV3_MOM6_CICE_debug.appBuilder

* Change debug flag check from ifeq to findstring

* Loading machine-dependent esmf debug module

*Use S2S_DEBUB_MODULE env var to load machine-dependent esmf debug module
*Require ufs-s2s-model/modules/${BUILD_TARGET}/fv3_coupled_debug file

* cmeps integration changes (NOAA-EMC#55)

* Bugfix i2a & Add Orion to module-setup (NOAA-EMC#61)

* Add Orion to module-setup.*.inc

* src/incmake/component_CCPP.mk: SUITES argument no longer mandatory for calling ccpp_prebuild.py (NOAA-EMC#62)

Co-authored-by: Minsuk Ji <57227195+MinsukJi-NOAA@users.noreply.github.com>
Co-authored-by: Mariana Vertenstein <mvertens@ucar.edu>
Co-authored-by: Dom Heinzeller <dom.heinzeller@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants