Hotfix - allow the latest MPAS-Model v8.4.1-1.3 build successfully - #277
Hotfix - allow the latest MPAS-Model v8.4.1-1.3 build successfully#277guoqing-noaa wants to merge 3 commits into
Conversation
…ke system, to be consistent with the CMake system
|
This looks good to me, but I will hold off on a formal "approve" until there is resolution on the stochastic_physics PR that this builds upon. |
|
Note: This PR alone does not solve all the building issues. We will need PR: dtcenter/stochastic_physics#9 as well. For those who want to use a workable version now, follow these steps: |
|
@guoqing-noaa Yeah, this sounds good. I added these variables in my module files in the (now discontinued) |
dustinswales
left a comment
There was a problem hiding this comment.
@guoqing-noaa Thanks for these changes, and the changes in the stochastic physics subcomponent #9.
|
Hi @guoqing-noaa - with this PR, should we also update the modules for each supported HPC in the modulefiles/mpas/ directory? |
@clark-evans Gerard has incorporated needed changes in his stochastic PR recently merged. |
OK, thanks - I wasn't sure if netCDF libraries also needed to be added. |
| # Auto-detect NetCDF_C_ROOT / NetCDF_FORTRAN_ROOT if NETCDF / NETCDFF are not set | ||
| ifeq "$(NETCDF)" "" | ||
| ifneq "$(NetCDF_C_ROOT)" "" | ||
| NETCDF := $(NetCDF_C_ROOT) |
There was a problem hiding this comment.
@guoqing-noaa In the module files in MPAS-Model/modulefiles/mpas, e.g. in hera.intel.lua, there is this line:
setenv("NetCDF_C_ROOT", os.getenv("netcdf_c_ROOT"))
So this defines the variable NetCDF_C_ROOT by setting it to netcdf_c_ROOT (in these variable names, case matters). NetCDF_C_ROOT is then used in the code here to set NETCDF, i.e.
NETCDF := $(NetCDF_C_ROOT)
Is there a reason to introduce the intermediate variable NetCDF_C_ROOT? To simplify things, can we just use netcdf_c_ROOT (which is set by the module load commands in the module file) instead here, i.e.
NETCDF := $(netcdf_c_ROOT)
Same for NetCDF_FORTRAN_ROOT.
There was a problem hiding this comment.
@gsketefian I don't know why spack-stack choosed to use netcdf_c_ROOT , but NetCDF_C_ROOT is the standard environmental variable name at this time if netcdf_c and netcdf_fortran are installed separately. If you check the CMake system, you will notice that it accepts only NetCDF_C_ROOT. So we want the CMake and make systems to be consistent and adhere to the industry standard.
|
@guoqing-noaa On a separate note, as I was retrying the build with your changes to there should be a line like Right now, a clean leaves the |
Thanks for identifying this issue. Happy to include it here. |
add "$(RM) -r libchem"
|
Thank @gsketefian for testing and merging the stochastic_physics PR and reviewing this PR. @clark-evans I think this PR is good to go now. Thanks! |
|
@clark-evans @joeolson42 @JeffBeck-NOAA @dustinswales 1 These Modules are needed:
Note: when loading netcdf-fortran/4.6.1, bzip2, hdf5, and netcdf-c automatically load 2 This Commit is needed:dtcenter/stochastic_physics@d45e9fb 3 A Gemini-written change to the main MPAS Makefile that uses nf-config to find netcdf.inc.I think for now, we should roll back this PR. As we discussed, someone should make changes so that stochastic_physics can be turned off completely at compile time, and we can build with our original 3 modules. |
allow the latest MPAS-Model v8.4.1-1.3 build successfully
This PR would like to update the
stochastic_physicssubmodule hash if possible,which depends on this PR: dtcenter/stochastic_physics#9
Resolve issue #276
Mandatory Questions
Reviews