I've been trying to install boost-mpi on MAC OS for clang, but I failed. Can anyone help me?
I tried:
brew install open-mpi
brew install boost
brew install boost-mpi
But I got this CMake error:
CMake Warning at /usr/local/lib/cmake/boost_mpi-1.72.0/libboost_mpi-variant-shared.cmake:64 (message):
Target Boost::mpi already has an imported location
'/usr/local/lib/libboost_mpi-mt.dylib', which will be overwritten with
'/usr/local/lib/libboost_mpi.dylib'
I tried to run MPI Hello world program ad got this error output:
Assertion failed: (_check_result == MPI_SUCCESS), function recv_impl, file /usr/local/include/boost/mpi/communicator.hpp, line 1400.
[Deniss-MacBook-Pro:83252] *** Process received signal ***
[Deniss-MacBook-Pro:83252] Signal: Abort trap: 6 (6)
[Deniss-MacBook-Pro:83252] Signal code: (0)
[Deniss-MacBook-Pro:83252] [ 0] 0 libsystem_platform.dylib 0x00007fff6a5b95fd _sigtramp + 29
[Deniss-MacBook-Pro:83252] [ 1] 0 ??? 0x0000000000000180 0x0 + 384
[Deniss-MacBook-Pro:83252] [ 2] 0 libsystem_c.dylib 0x00007fff6a48f808 abort + 120
[Deniss-MacBook-Pro:83252] [ 3] 0 libsystem_c.dylib 0x00007fff6a48eac6 err + 0
[Deniss-MacBook-Pro:83252] [ 4] 0 MPI 0x0000000100616af6 _ZNK5boost3mpi12communicator9recv_implIiEENS0_6statusEiiRT_N4mpl_5bool_ILb1EEE + 214
[Deniss-MacBook-Pro:83252] [ 5] 0 MPI 0x00000001006167f0 _ZNK5boost3mpi12communicator4recvIiEENS0_6statusEiiRT_ + 48
[Deniss-MacBook-Pro:83252] [ 6] 0 MPI 0x00000001006166f2 main + 114
[Deniss-MacBook-Pro:83252] [ 7] 0 libdyld.dylib 0x00007fff6a3c0cc9 start + 1
[Deniss-MacBook-Pro:83252] [ 8] 0 ??? 0x0000000000000001 0x0 + 1
[Deniss-MacBook-Pro:83252] *** End of error message ***
Does anyone knows how to fix this and make Hello world program work?
UPD 1: I managed to fix CMake warnings with set(Boost_USE_MULTITHREADED TRUE)
in my CMakeLists.txt, but program still crashes. I think this is an issue with Mac OS Catalina: It asks for permission to recieve a network connection for the compiled program on every run. Do anyone knows how to deal with this problem?
UPD 2: I tried to turn the firewall off, and it didn`t ask for accepting incoming connections, but still fails with same error.
I managed to fix it all. Actually, my error consists of a bunch of things. Firstly, as I found in this question, set(Boost_USE_MULTITHREADED TRUE)
helps to remove CMake warnings. But then the issue with program warnings was because CLion doesn`t run mpi program with mpirun
. But then there is other warning with mpirun
program run. This warning can be fixed with export PMIX_MCA_gds=hash
. I found this solution here.