如何在 Mac OS 上为 clang 安装 boost-mpi 及其依赖项?
How do I install boost-mpi and it's dependecies for clang on Mac OS?
我一直在尝试在 MAC OS 上为 clang 安装 boost-mpi,但我失败了。谁能帮我?
我试过了:
brew install open-mpi
brew install boost
brew install boost-mpi
但是我得到了这个 CMake 错误:
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'
我尝试 运行 MPI Hello world 程序广告得到了这个错误输出:
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 ***
有谁知道如何解决这个问题并使 Hello world 程序运行?
UPD 1:我设法在 CMakeLists.txt 中使用 set(Boost_USE_MULTITHREADED TRUE)
修复了 CMake 警告,但程序仍然崩溃。我认为这是 Mac OS Catalina 的一个问题:它要求允许在每个 运行 上接收已编译程序的网络连接。有谁知道如何处理这个问题?
UPD 2:我试图关闭防火墙,它没有要求接受传入连接,但仍然失败并出现同样的错误。
我设法解决了所有问题。实际上,我的错误包括很多事情。首先,正如我在 , 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.
中发现的那样
我一直在尝试在 MAC OS 上为 clang 安装 boost-mpi,但我失败了。谁能帮我?
我试过了:
brew install open-mpi
brew install boost
brew install boost-mpi
但是我得到了这个 CMake 错误:
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'
我尝试 运行 MPI Hello world 程序广告得到了这个错误输出:
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 ***
有谁知道如何解决这个问题并使 Hello world 程序运行?
UPD 1:我设法在 CMakeLists.txt 中使用 set(Boost_USE_MULTITHREADED TRUE)
修复了 CMake 警告,但程序仍然崩溃。我认为这是 Mac OS Catalina 的一个问题:它要求允许在每个 运行 上接收已编译程序的网络连接。有谁知道如何处理这个问题?
UPD 2:我试图关闭防火墙,它没有要求接受传入连接,但仍然失败并出现同样的错误。
我设法解决了所有问题。实际上,我的错误包括很多事情。首先,正如我在 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.