Fixes for running coupled on macOS #526
Merged
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 is an attempt to fix running the coupled model on macOS. Note that this is most likely a kludge than a real fix (which might be internal to the ocean layers and how they call MAPL, cc @tclune).
To wit, runs by @sanAkel on macOS found that when you tried to run MOM6 + CICE4, it instead called CICE6. Testing found three fixes would let things run:
DYLD_INSERT_LIBRARIES
instead ofLD_PRELOAD
as the former is The Right Way™ on macOSmpirun
directly rather than throughesma_mpirun
.1DYLD_LIBRARY_PATH
instead ofLD_LIBRARY_PATH
My hope is all this doesn't change anything on Linux, just on macOS. And my guess is all of this has to do with SIP which is the bane of my life with dynamic loading on macOS. For more reference see:
I did try using
codesign
to add the entitlements, but even with the entitlements in, it made no difference. But, well, I'm not an XCode developer so it was just me and ChatGPT trying things out.2Footnotes
This assumes macOS GEOS will use Open MPI (or other stack that uses
mpirun
as the launcher...which is most). Fixing this in future is not hard, just more tedious ↩Maybe someday @scivision will make a blog post and all this can be fixed more elegantly inside CMake with a post-install step. 😄 ↩