Linking chgres_cube failed on macOS Monterey #717
-
I am trying to build ufs-srweather-app using script devbuild.sh on macOS Monterey using GNU compilers and got the following message
hpc-stack has been installed with openmpi 4.1.2 successfully and both ufs_model and upp are built without a problem. Anyone has the same problem before and a solution? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
@ywangwof - thank you for sharing your experience, and the details you provided - all are needed! I'll be looking into it. Few more questions on your setup: are you using Mac with M1 or Intel chip? What branch of ufs-srweather-app are you using (develop, release/public-v2.1.0)? |
Beta Was this translation helpful? Give feedback.
-
I found the problem is that library
Solution 1 is not generalized for all users. About solution 2, I do not know how to modify the CMakeList.txt file for it to work. Any suggestion? Thanks. |
Beta Was this translation helpful? Give feedback.
-
@ywangwof - thanks for letting me know it became more clear! |
Beta Was this translation helpful? Give feedback.
@ywangwof - I do attempt to reproduce your error.
As to the library not in the path: after you load the modulefile,
module load build_macos_gnu
there is a message asking you to export an LDFLAGS variable:
export LDFLAGS+=" -L$MPI_ROOT/lib "
(It is likely that the message in the modulefiles needs to be corrected to display exactly the one shown above)
This is where the library lmpi_cxx is expected to be found. For the MacOS, you are likely to have the following files in your $MPI_ROOT/lib directory: libmpi_cxx.la, libmpi_cxx.dylib