-
Notifications
You must be signed in to change notification settings - Fork 232
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
Autoconf netCDF flag update #1272
Conversation
This patch trims some of the netCDF flag management and adds more explicit tests for the FMS and MOM6 flags. - We only test for -I flags when compiling the FMS library, since links are not required at compile-time. (NOTE: This may need verification for static builds on Gaea). - Further separation of C and Fortran flags. - libnetcdf support is explicitly added to MOM6. Previously it was not tested and linked. This is in preparation for FMS 2020.04 support.
The --cflags/--fflags arguments of nc-config/nf-config can be volatile, since they generally represent library install-time flags, so we instead replace them with --includedir/--libdir flags, which explicitly denote the installation paths. The only real issue here is that nf-config does not have a --libdir flag, so we use $(nf-config --prefix)/lib and hope that this is where it's installed.
@marshallward please look at the netcdf m4 macro in FRE-NCtools. I made some extensive modifications that may be useful. |
Thanks Seth, I'm looking through them now. It looks like you also encountered a lot of similar problems with many of the flags ( I was doing something a bit similar (though nowhere near as thorough) but eventually abandoned that approach due to problems on some platforms. (Mostly working around the user's implicit settings at install time, as far as I could tell). Unlike the other flags, the After running this on a few different platforms, the safest option seemed to be to just avoid those other flags and use If I can get some time, I'll give your macros a try and see how they fare. BTW the impetus here is that we were not linking to the netCDF C library ( |
The verification tests in .testing are updated to run on FMS 2020.04. Also, several documentation outputs in .gitignore were moved to docs/.gitignore, as well as some older files and directories that were interfering with content in ac/deps.
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #1272 +/- ##
=========================================
Coverage 45.78% 45.78%
=========================================
Files 225 225
Lines 71458 71458
=========================================
Hits 32714 32714
Misses 38744 38744 Continue to review full report at Codecov.
|
This cleans up some issues related to netCDF flag support which were needed to get FMS 2020.04 built correctly.
Specifically, this PR is more careful with the handling of C and Fortran flags, and tries to isolate the flags a little more correctly. It also only conditionally checks
nc-config
andnf-config
, and tries its best to rely on existing environment variables (e.g.CPATH
) or user-configured flags when possible.This does not update the default FMS version to 2020.04, but we could do that if desired. All the tests appear to be passing on various platforms with 2020.04. This is separate from the MOM6-examples update.