Fix NAG Fortran build on macOS for GEOSldas#541
Open
weiyuan-jiang wants to merge 2 commits intomainfrom
Open
Conversation
This commit enables successful compilation of GEOSldas with NAG Fortran
compiler on macOS by addressing three critical issues:
1. NAG_Fortran.cmake (line 9):
- Add MPI_Gather, MPI_Scatter, MPI_Alltoallv to MISMATCH flag
- Fixes MPI type mismatch errors where different data types are passed
to the same MPI function in different call sites
2. NAG_Fortran.cmake (lines 20-28):
- Configure CMake to use -I flag for Fortran includes
- Clear CMAKE_Fortran_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES
- Prevents CMake from adding -F framework flags that NAG doesn't support
- Fixes Fortran include path generation issues
3. NAG_Fortran.cmake (lines 32-41):
- Add -w=uep flag to suppress unrecognized option errors on macOS
- Handles any remaining framework-related warnings gracefully
4. FindBaselibs.cmake (lines 99-108):
- Replace find_library() calls with direct framework names
- Changes: find_library(FWSecurity NAMES Security)
to: set(FWSecurity "-framework Security")
- Prevents CMake from adding framework directories to Fortran
include paths, which causes compilation errors with NAG
Without these changes, NAG Fortran fails to compile GEOSldas on macOS due to:
- Unrecognized -F framework flags in Fortran compiler invocations
- Malformed include paths missing -I separators
- MPI function type mismatch errors
Tested on: macOS with NAG Fortran 7.2.43, OpenMPI 5.0.10rc2, Baselibs 9.9.0
Build result: 100% successful, all executables built
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 commit enables successful compilation of GEOSldas with NAG Fortran compiler on macOS by addressing three critical issues:
NAG_Fortran.cmake (line 9):
NAG_Fortran.cmake (lines 20-28):
NAG_Fortran.cmake (lines 32-41):
FindBaselibs.cmake (lines 99-108):
Without these changes, NAG Fortran fails to compile GEOSldas on macOS due to:
Tested on: macOS with NAG Fortran 7.2.43, OpenMPI 5.0.10rc2, Baselibs 9.9.0
Build result: 100% successful, all executables built