macOS + GNU build#1
Closed
climbfuji wants to merge 2 commits into
Closed
Conversation
…lled HDF5, netCDF and Jasper libraries
Contributor
Author
This was referenced Nov 19, 2019
Contributor
Author
|
@mark-a-potts this PR has gone stale. Is it still needed/useful? Or did you make those changes separately? I am going to test the ufs_public_release_v1.0 branch on my macOS now with a few different scenarios (only compiler+mpi library installed, everything installed except esmf and nceplibs, only nceplibs missing). Thanks! |
Contributor
Author
|
I am closing this PR, since it is no longer up to date and will be replaced soon with a new version. |
kgerheiser
added a commit
that referenced
this pull request
Jan 30, 2020
Bugfix in CMakeLists.txt: do not assume everything was built/installeby NCEPLIBS-external
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR and associated PRs for the submodules of NCEPLIBS (listed below) add the necessary modifications to build the entire set of NCEPlibs on macOS using the gcc+gfortran or clang+gfortran compilers.
They also allow the user to specify pre-installed versions of the HDF5, netCDF and JasPER libraries instead of building them as part of the umbrella build.
These changes were tested on macOS 10.14.6 (Mojave) using LLVM clang 9.0.0 and GNU gfortran 9.2.0, installed via homebrew. The following libraries (and any necessary dependencies) were installed manually in
/usr/localwith these compilers:The environment variables for clang/gfortran were set to
The NCEPlibs were built as follows:
These NCEPLIBS were then used instead of the known-to-work NCAR NCEPLIBS umbrella build (https://github.com/NCAR/NCEPLIBS) to compile and run the ufs-weather-model. The results were identical to those using the NCAR version of NCEPLIBS, which means that at least for the NCEPLIBS used by the ufs-weather-model we can be confident that the build is ok:
Note 1. Since macOS Mojave there are problems with OpenMP with both clang and gcc, hence OpenMP was disabled. This may have been already or may be fixed soon.
Note 2. While adding/correcting the compiler flags for clang/gcc+gfortran, I removed empty configuration entries for the PGI compiler to avoid it failing silently. The build system will now throw an error "unknown compiler" if the respective NCEPLIBS component has not been configured for PGI.
Note 3. I am not an expert on cmake. My workaround to create a stub netCDF-Fortran external project to avoid changing several tens of lines of code further down in the top-level
CMakeLists.txtmay not be ideal.Note 4. Someone should test those changes with the full end-to-end system on a machine for which the build system previously worked (e.g. hera + intel).