-
Notifications
You must be signed in to change notification settings - Fork 731
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve NetCDF detection and linking (#1923)
TYPE: enhancement KEYWORDS: NetCDF4, Spack-Stack, gfortran SOURCE: David Robertson, Rutgers University DESCRIPTION OF CHANGES: Problem: - NetCDF4 detection and linking is unreliable and impossible if NetCDF-C and NetCDF-Fortran reside in different directories - gfortran is intolerant of non-initialized variables in **`mediation_integrate.F`**. Solution: - Refactor the detection and configuration of NetCDF dependencies and add the capability to use NetCDF-C and NetCDF-Fortran libraries that don't reside in the same directory by introducing a new variable for the NetCDF-C path. - The **fname** and **n2** `intent(out)` variables are not assigned under certain circumstances so we should initialize them to empty strings. ``` ierr = 0 fname = "" n2 = "" ! Note that computation of fname and n2 are outside of the oid IF statement ``` LIST OF MODIFIED FILES: list of changed files (used `git diff --name-status release-v4.5.2` to get formatted list) ``` M Makefile M arch/Config.pl M arch/postamble M arch/preamble M configure M share/mediation_integrate.F ``` TESTS CONDUCTED: 1. Compiled and ran with several different configurations of NetCDF, including both shared and static versions of both split (NetCDF-C and NetCDF-Fortran in separate directories) and unified library locations. The shared library versions were from Spack-Stack; the static libraries were custom-built for my systems. 2. Ran the coupled WRF-ROMS standard test case for Hurricane Irene. 3. The Jenkins tests are all passing. RELEASE NOTE: This PR improve the detection and linking with shared and static configurations of the NetCDF-4 libraries (split or unified) inside and outside Spack-Stack.
- Loading branch information
Showing
6 changed files
with
106 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.