Installing OpenMPI with MacPorts
Update: I don’t recommend this anymore, as I ran into trouble afterwards. See here instead for more info on setting up openmpi with MacPorts.
I was trying to get up and running with OpenAI’s baselines repository today, and held my breath when I saw that
Installation of system packages on Mac requires Homebrew.
in the README of the repostiory.
I’ve had some nightmares trying to untangle the incompatibility of MacPorts and Homebrew on my Mac, and for this and that development reason am stuck with MacPorts on my Mac.
It looked like the only things needed by Homebrew were cmake
and openmpi
, of which openmpi
was the only one that gave me some difficulty.
Everytime I would try to activate openmpi
, I would get this error:
$ sudo port configure openmpi-default
---> Computing dependencies for libgcc
The following dependencies will be installed: libgcc9
Continue? [Y/n]: y
---> Activating libgcc9 @9.2.0_1
Error: Failed to activate libgcc9: Image error: /opt/local/include/gcc/c++/algorithm is being used by the active libgcc port. Please deactivate this port first, or use 'port -f activate libgcc9' to force the activation.
The trick ended up being to deactivate libgcc
, allowing libgcc9
, a dependency of openmpi
to be activated and installed.
sudo port deactivate libgcc
sudo port configure openmpi
After this, everything seemed to work:
$ sudo port configure openmpi
---> Computing dependencies for openmpi
The following dependencies will be installed:
libgcc
libgcc9
openmpi-default
Continue? [Y/n]: y
---> Activating libgcc9 @9.2.0_1
---> Cleaning libgcc9
---> Fetching archive for libgcc
---> Attempting to fetch libgcc-2.0_2.darwin_18.x86_64.tbz2 from http://jog.id.packages.macports.org/macports/packages/libgcc
---> Attempting to fetch libgcc-2.0_2.darwin_18.x86_64.tbz2.rmd160 from http://jog.id.packages.macports.org/macports/packages/libgcc
---> Installing libgcc @2.0_2
---> Activating libgcc @2.0_2
---> Cleaning libgcc
---> Fetching distfiles for openmpi-default
---> Verifying checksums for openmpi-default
---> Extracting openmpi-default
---> Applying patches to openmpi-default
---> Configuring openmpi-default
---> Building openmpi-default
---> Staging openmpi-default into destroot
---> Installing openmpi-default @4.0.1_0+gcc9
---> Activating openmpi-default @4.0.1_0+gcc9
---> Cleaning openmpi-default
---> Fetching distfiles for openmpi
---> Verifying checksums for openmpi
---> Extracting openmpi
---> Configuring openmpi
---> Some of the ports you installed have notes:
openmpi-default has the following notes:
The mpicc wrapper (and friends) are installed as:
/opt/local/bin/mpicc-openmpi-mp (likewise mpicxx, ...)
To make openmpi-default's wrappers the default (what you get when
you execute 'mpicc' etc.) please run:
sudo port select --set mpi openmpi-mp-fortran
$
Archive
chinese
tang-dynasty-poetry
李白
python
王维
rl
pytorch
numpy
emacs
杜牧
spinningup
networking
deep-learning
贺知章
白居易
王昌龄
杜甫
李商隐
tips
reinforcement-learning
macports
jekyll
骆宾王
贾岛
孟浩然
xcode
time-series
terminal
regression
rails
productivity
pandas
math
macosx
lesson-plan
helicopters
flying
fastai
conceptual-learning
command-line
bro
黄巢
韦应物
陈子昂
王翰
王之涣
柳宗元
杜秋娘
李绅
张继
孟郊
刘禹锡
元稹
youtube
visdom
system
sungho
stylelint
stripe
softmax
siri
sgd
scipy
scikit-learn
scikit
safari
research
qtran
qoe
qmix
pyhton
poetry
pedagogy
papers
paper-review
optimization
openssl
openmpi
nyc
node
neural-net
multiprocessing
mpi
morl
ml
mdp
marl
mandarin
macos
machine-learning
latex
language-learning
khan-academy
jupyter-notebooks
ios-programming
intuition
homebrew
hacking
google-cloud
github
flashcards
faker
docker
dme
deepmind
dec-pomdp
data-wrangling
craftsman
congestion-control
coding
books
book-review
atari
anki
analogy
3brown1blue
2fa