-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix LAMMPS plugin symlink path on macOS platform #3473
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## devel #3473 +/- ##
=======================================
Coverage 77.49% 77.49%
=======================================
Files 432 432
Lines 37161 37161
Branches 1620 1620
=======================================
Hits 28797 28797
Misses 7496 7496
Partials 868 868 ☔ View full report in Codecov by Sentry. |
I'll first add this patch to conda-forge to see if the tests pass. (It's a known issue but I don't have a Mac to debug) |
OK. If you have a Linux machine please also check if it breaks the Linux build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the conda-forge's tests have passed for both linux and macos. Failure is not related.
This pull request fixes the broken symlink for `dpplugin.so` on macOS. It should point to `libdeepmd_lmp.so` but point to `libdeepmd_lmp.dylib` instead. ### Details The `libdeepmd_lmp` is a shared module. https://github.com/deepmodeling/deepmd-kit/blob/b875ea8f6661b6e1567537ead7e2b4a8b14ea113/source/lmp/plugin/CMakeLists.txt#L72 The build target name on macOS is `libdeepmd_lmp.so`. Because on macOS, the `CMAKE_SHARED_MODULE_SUFFIX` (`.so`) is different from `CMAKE_SHARED_LIBRARY_SUFFIX` (`.dynlib`). As a result, in previous versions, on macOS the symbolic link `dpplugin.so` was pointed to `libdeepmd_lmp.dylib`, which does not exist. One can check the conda-forge builds to confirm (e.g., [osx-arm64/deepmd-kit-2.2.9-cpu_py311hf5376d5_mpi_openmpi_0.conda](https://anaconda.org/conda-forge/deepmd-kit/2.2.9/download/osx-arm64/deepmd-kit-2.2.9-cpu_py311hf5376d5_mpi_openmpi_0.conda)). (cherry picked from commit abf3477)
This pull request fixes the broken symlink for `dpplugin.so` on macOS. It should point to `libdeepmd_lmp.so` but point to `libdeepmd_lmp.dylib` instead. ### Details The `libdeepmd_lmp` is a shared module. https://github.com/deepmodeling/deepmd-kit/blob/b875ea8f6661b6e1567537ead7e2b4a8b14ea113/source/lmp/plugin/CMakeLists.txt#L72 The build target name on macOS is `libdeepmd_lmp.so`. Because on macOS, the `CMAKE_SHARED_MODULE_SUFFIX` (`.so`) is different from `CMAKE_SHARED_LIBRARY_SUFFIX` (`.dynlib`). As a result, in previous versions, on macOS the symbolic link `dpplugin.so` was pointed to `libdeepmd_lmp.dylib`, which does not exist. One can check the conda-forge builds to confirm (e.g., [osx-arm64/deepmd-kit-2.2.9-cpu_py311hf5376d5_mpi_openmpi_0.conda](https://anaconda.org/conda-forge/deepmd-kit/2.2.9/download/osx-arm64/deepmd-kit-2.2.9-cpu_py311hf5376d5_mpi_openmpi_0.conda)). (cherry picked from commit abf3477)
This pull request fixes the broken symlink for
dpplugin.so
on macOS. It should point tolibdeepmd_lmp.so
but point tolibdeepmd_lmp.dylib
instead.Details
The
libdeepmd_lmp
is a shared module.deepmd-kit/source/lmp/plugin/CMakeLists.txt
Line 72 in b875ea8
The build target name on macOS is
libdeepmd_lmp.so
.Because on macOS, the
CMAKE_SHARED_MODULE_SUFFIX
(.so
) is different fromCMAKE_SHARED_LIBRARY_SUFFIX
(.dynlib
). As a result, in previous versions, on macOS the symbolic linkdpplugin.so
was pointed tolibdeepmd_lmp.dylib
, which does not exist. One can check the conda-forge builds to confirm (e.g., osx-arm64/deepmd-kit-2.2.9-cpu_py311hf5376d5_mpi_openmpi_0.conda).