LoginSignup
1
0

More than 1 year has passed since last update.

OpenMPI 4.1.1 をalmalinuxにいれる

Last updated at Posted at 2021-09-12

環境

  • Almalinux

実行手順

OpenMPIのREADMEを参照した。そのときのREADMEも貼っておく。ちなみに該当commitはこちら。

tar.bz2はここから、openmpi-4.1.1.tar.bz2をwget した。

wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.1.tar.bz2

READMEのQuick startを見る限りでは、あとは手順通り進めればいいことになるがこれでは失敗する。perlやC, C++などのコンパイラや実行環境が不足しているから。
なので、apt install build-essentialのノリで、いい感じにいろいろ入れてくれるやつをyumで入れる。

参考

sudo yum groupinstall "Development Tools"
sudo yum install kernel-devel kernel-headers

特定の環境のコンパイラや実行環境を求める場合は、これでやらずに一個ずつ丁寧に入れるか、一括して入れたあとにこだわりたいものをいい感じに入れなおせばいいと思う。(やってない)

ここまでこればあとはQuick startの通りにやればいい。最初にわたす--prefix/usr/local/package/openmpi/4.1.1とかでいいんじゃないだろうか。自分はそうした。

というのも、module environmentを使ってスパコンみたいにパッケージとかバージョン管理できたら依存関係とか楽そうでいいよね。なので今度はこれを参考にmodule envirnmentを導入してみようと思う。

module environmentを入れれば、/usr/local/package/openmpi/3.1.1とか/usr/local/package/openmpi/4.1.1_gcchogehogeなど、いろいろなのを共存できそう。

参考にしたOpenMPI公式のQuick start

Quick start

In many cases, Open MPI can be built and installed by simply
indicating the installation directory on the command line:

$ tar xf openmpi-<version>.tar.bz2
$ cd openmpi-<version>
$ ./configure --prefix=<path> |& tee config.out
...lots of output...
$ make -j 8 |& tee make.out
...lots of output...
$ make install |& tee install.out
...lots of output...

Note that there are many, many configuration options to the
./configure step. Some of them may be needed for your particular
environmnet; see below for desciptions of the options available.

If your installation prefix path is not writable by a regular user,
you may need to use sudo or su to run the make install step. For
example:

$ sudo make install |& tee install.out
[sudo] password for jsquyres: <enter your password here>
...lots of output...
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0