Skip to content
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

Enable build with ESMX and introduce export_all #237

Merged
merged 4 commits into from
Jul 10, 2023

Conversation

uturuncoglu
Copy link
Collaborator

@uturuncoglu uturuncoglu commented Jul 4, 2023

Description of changes

This PR aims to make couple of modification in the build system to enable build CDEPS along with new ESMF ESMX driver and option to disable FoX library for standalone build (default is OFF). In addition, this PR brings additional namelist option (export_all) to data component namelist files (d[atm|ice|lnd|ocn|rof|wav]_in) to export all the available fields without their connection status. This is especially important for the cases that runs CDEPS outside of the application and run via NUOPC connectors.

Specific notes

Contributors other than yourself, if any: N/A

CDEPS Issues Fixed (include github issue):
#172

Are there dependencies on other component PRs (if so list): No

Are changes expected to change answers (bfb, different to roundoff, more substantial): No

Any User Interface Changes (namelist or namelist defaults changes): Yes. We option (export_all) is added to component namelist file.

Testing performed (e.g. aux_cdeps, CESM prealpha, etc): CESM prealpha

Hashes used for testing: cesm2_3_beta15

@uturuncoglu
Copy link
Collaborator Author

@mvertens @billsacks I'll tests the PR with CESM and UFS to see it is working fine. Then update you. Do you want me to run all CESM testes?

@mvertens
Copy link
Collaborator

mvertens commented Jul 5, 2023

@uturuncoglu - it probably will not hurt to run the prealpha tests just to make sure that all configurations are tested. But that might be too much - I'll let @billsacks weigh in. Could you please provide a pointer to the ESMX driver or an example to see how CDEPS is used in conjunction with that.

@uturuncoglu
Copy link
Collaborator Author

@mvertens Sure. I'll run pre-alpha tests.

The ESMX documentation can be found in here, https://github.com/esmf-org/esmf/blob/develop/src/addon/ESMX/README.md

Specifically for CDEPS, I am using it in nuopc-comp-testing action, https://github.com/esmf-org/nuopc-comp-testing (not updated yet to use new version of ESMX), which allows me to test the component standalone by facing . At this point I am calling this action to test component NoahMP regularly (JTTI project). The current test (DATM+NoahMP) can be found in here, https://github.com/esmf-org/noahmp/blob/feature/nuopc_cap/.github/workflows/datm_noahmp.yaml

As an example, you need to build CDEPS using following command,

cmake -DCMAKE_INSTALL_PREFIX=../install -DPIO_C_LIBRARY=/home/runner/.spack-ci/view/lib -DPIO_C_INCLUDE_DIR=/home/runner/.spack-ci/view/include -DPIO_Fortran_LIBRARY=/home/runner/.spack-ci/view/lib -DPIO_Fortran_INCLUDE_DIR=/home/runner/.spack-ci/view/include -DCMAKE_Fortran_FLAGS="-ffree-line-length-none -fallow-argument-mismatch -fallow-invalid-boz -ffree-line-length-512 -DCPRGNU" -DDISABLE_FoX=ON ../

and then using following esmxBuild.yaml file.

application:
  disable_comps: ESMX_Data
  link_paths: /home/runner/.spack-ci/view/lib 
  link_libraries: piof

components:
  datm:
    build_type: none
    install_prefix: /test/app/cdeps/install
    libraries: datm dshr streams cdeps_share
    fort_module: cdeps_datm_comp.mod
  noahmp:
    build_type: none
    install_prefix: /test/app/noahmp/install
    fort_module: lnd_comp_nuopc.mod

and issuing ESMX_Builder command will create an executable that could drive DATM+NoahMP configuration. Anyway, if you need more information just let me know.

@uturuncoglu
Copy link
Collaborator Author

@mvertens @billsacks I run pre alpha tests using qcmd -l walltime=4:00:00 -- ./create_test --xml-category prealpha --xml-machine cheyenne --xml-compiler intel command (I am not sure that is the one that you want to test) and all the tests are passed except one due to time limit in the build.

FAIL ERP_D_Ln9_Vnuopc.C48_C48_mg17.QPC6.cheyenne_intel.cam-outfrq9s MODEL_BUILD time=247

I'll try to run this manually again to see what happens. In the mean time, let me know if you want me to run any other test. I am also plaining to run couple of CDEPS configuration from UFS RTs. I'll you update about it.

@uturuncoglu
Copy link
Collaborator Author

It seems that that particular test giving following error,

gmake: *** No rule to make target '/glade/scratch/turuncu/ERP_D_Ln9_Vnuopc.C48_C48_mg17.QPC6.cheyenne_intel.cam-outfrq9s.20230705_150646_tn00tw/bld/FMS/libfms.a', needed by '/glade/scratch/turuncu/ERP_D_Ln9_Vnuopc.C48_C48_mg17.QPC6.cheyenne_intel.cam-outfrq9s.20230705_150646_tn00tw/bld/atm/obj/atmos_cubed_sphere/libfv3core.a'.  Stop.

My run directory is in /glade/scratch/turuncu/ERP_D_Ln9_Vnuopc.C48_C48_mg17.QPC6.cheyenne_intel.cam-outfrq9s.20230705_150646_tn00tw. Let me know if you have any idea about that.

@fischer-ncar
Copy link
Collaborator

@uturuncoglu this is a known failure with the version of fms being used in the cesm2 alpha tags.

@uturuncoglu
Copy link
Collaborator Author

@fischer-ncar Thanks. It is good to know. BTW, is there any place that list the known issues and tests that are expected to fail. That would be very helpful for me as a unexperienced CESM user. If not, that kind of resource will be very helpful for the developers.

@uturuncoglu
Copy link
Collaborator Author

I also run CDEPS specific tests with ./create_test --xml-testlist ../../components/cdeps/cime_config/testdefs/testlist_cdeps.xml --xml-machine cheyenne --xml-category aux_cdeps and they all passed.

@billsacks billsacks removed their request for review July 6, 2023 22:22
@billsacks
Copy link
Member

Thanks for the invitation to review this @uturuncoglu , but I have too much on my plate to review this over the next week. I'm happy to defer to others, particularly given that you have run CESM prealpha tests and they pass.

@uturuncoglu
Copy link
Collaborator Author

@billsacks sure. No worries. I just need to test with UFS weather model and that will be ready to merge.

@uturuncoglu
Copy link
Collaborator Author

uturuncoglu commented Jul 7, 2023

@mvertens @fischer-ncar I also run the couple of UFS Weather Model RTs like datm_cdeps_control_cfsr, datm_cdeps_restart_cfsr and hafs_regional_docn_oisst they are passing without any issue. So, I think that this PR is ready to merge.

@uturuncoglu uturuncoglu merged commit ae827c3 into ESCOMP:main Jul 10, 2023
1 check passed
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.

5 participants