ADIOS2
ADIOS2 copied to clipboard
`pip install adios2` fails on macOS
Describe the bug
Installing ADIOS2 with pipx install adios2 on macOS 14.4 fails.
To Reproduce A minimal reproducible example is preferred. Or Steps to reproduce the behavior:
- Run
pipx install adios2in a terminal. - Examine the logfile output:
[80/292] Linking C shared module thirdparty/EVPath/EVPath/adios2/adios2-evpath-modules-2_10/libadios2_cmfabric.so
FAILED: thirdparty/EVPath/EVPath/adios2/adios2-evpath-modules-2_10/libadios2_cmfabric.so
: && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -w -O3 -DNDEBUG -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk -bundle -Wl,-headerpad_max_install_names -L/opt/homebrew/opt/qt@5/lib -o thirdparty/EVPath/EVPath/adios2/adios2-evpath-modules-2_10/libadios2_cmfabric.so thirdparty/EVPath/EVPath/CMakeFiles/cmfabric.dir/cmfabric.c.o thirdparty/EVPath/EVPath/CMakeFiles/cmfabric.dir/ip_config.c.o -Wl,-rpath,"\$ORIGIN" -Wl,-rpath,@loader_path/../adios2 -Wl,-rpath,"\$ORIGIN/../../adios2" adios2/libadios2_atl.2.10.0.dylib /opt/homebrew/Cellar/libfabric/1.20.1/lib/libfabric.dylib && :
ld: Undefined symbols:
_INT_CMmalloc, referenced from:
_CMFABRIC_data_available in cmfabric.c.o
_CMFABRIC_data_available in cmfabric.c.o
_CMFABRIC_data_available in cmfabric.c.o
_libcmfabric_LTX_initiate_conn in cmfabric.c.o
_libcmfabric_LTX_initiate_conn in cmfabric.c.o
_libcmfabric_LTX_initiate_conn in cmfabric.c.o
_libcmfabric_LTX_non_blocking_listen in cmfabric.c.o
...
_INT_CMrealloc, referenced from:
_libcmfabric_LTX_writev_complete_notify_func in cmfabric.c.o
_pull_thread in cmfabric.c.o
_pull_thread in cmfabric.c.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[81/292] Linking C shared library adios2/libadios2_dill.2.10.0.dylib
[82/292] Building C object thirdparty/ffs/ffs/CMakeFiles/ffs.dir/cod.tab.c.o
[83/292] Building CXX object thirdparty/KWSys/adios2sys/CMakeFiles/adios2sys_objects.dir/SystemTools.cxx.o
[84/292] Building C object thirdparty/EVPath/EVPath/CMakeFiles/cmzplenet.dir/cmzplenet.c.o
ninja: build stopped: subcommand failed.
Expected behavior It should successfully build and install ADIOS2.
Desktop (please complete the following information):
- OS/Platform: macOS 14.4 (Apple M1 Pro)
- Build:
ADIOS2 build configuration:
ADIOS Version: 2.10.0.0
C++ Compiler : AppleClang 15.0.0.15000100
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
Installation prefix: /usr/local
bin: bin
lib: adios2
include: adios2/include
cmake: adios2/cmake/adios2
python: lib/python3.12/site-packages
Features:
Library Type: shared
Build Type: Release
Testing: OFF
Examples: OFF
Build Options:
DataMan : OFF
DataSpaces : OFF
HDF5 : OFF
HDF5_VOL : OFF
MHS : ON
SST : ON
Fortran : OFF
MPI : OFF
Python : ON
PIP : ON
Blosc2 : OFF
BZip2 : OFF
LIBPRESSIO : OFF
MGARD : OFF
MGARD_MDR : OFF
PNG : ON
SZ : OFF
ZFP : OFF
DAOS : OFF
IME : OFF
O_DIRECT : OFF
Sodium : ON
Catalyst : OFF
SysVShMem : ON
UCX : OFF
ZeroMQ : OFF
Profiling : ON
Endian_Reverse : OFF
Derived_Variable : OFF
AWSSDK : OFF
GPU_Support : OFF
CUDA : OFF
Kokkos : OFF
Kokkos_CUDA : OFF
Kokkos_HIP : OFF
Kokkos_SYCL : OFF
Campaign : OFF
RDMA Transport for Staging: Available
Additional context Logfile: cmd_2024-03-21_23.07.57_pip_errors.log
Following up Was the issue fixed? Please report back.
Odd. This is trying to build the EVPath RDMA module using libfabric, but the ADIOS2/thirdparty/EVPath/CMakeLists.txt explicitly sets EVPATH_NO_RDMA to ON, which should disable any of the EVPath RDMA transports (which aren't used in ADIOS). Clearly it shouldn't be looking for libfabric, but that once looking it has found libfabric is another issue. Presumably you aren't using RDMA on a mac, so in the short term uninstalling libfabric and trying this again should work. Before the final 2.10 release, we'll make disabling RDMA in EVPath more robust.
Ok, uninstalling libfabric fixed the issue for now.
Libfabric got installed as a dependency for ADIOS2 in its Homebrew package (because I had previously done brew install adios2 on this machine). I'm guessing libfabric should probably not be treated as a dependency for ADIOS2 in Homebrew?
https://github.com/Homebrew/homebrew-core/blob/c6d4f816f81b66263a5b30be57a3edb76c172cbc/Formula/a/adios2.rb#L29
Huh, news to me that there was a Homebrew recipe for ADIOS. Obviously it's been around for a while. Let me followup with some of the folks involved. Some functionality that was off by default was turned on for release 2.9, so this recipe maybe a bit rotted. Gotta see if someone can fix it.
Yes, we added this a few years ago so we can ship an openPMD-api package in homebrew. The homebrew community is kind enough to maintain it. https://github.com/search?q=org%3AHomebrew+adios2&type=pullrequests
Note that homebrew these days ships for both macOS and Linux.
Is there a dedicated flag in ADIOS2 to explicitly turn off libfabric support? That would then be needed to be added to the package in homebrew, to avoid that the build logic pics up a system libfabric randomly.
I am no ruby developer myself, but luckily the package syntax is pretty self-explanatory: https://github.com/Homebrew/homebrew-core/blob/master/Formula/a/adios2.rb