ローカルでもMPI したいMrBayes
Linux が分からないWindows ユーザーにもビルドする権利はある
使えば良いじゃない、MrBayes でMPI (マルチスレッド) しないなら、何人にも挑戦するチャンスはある。俺はやるぞ。Windows で。
必要なファイルをダウンロード&ビルド
Cygwin
Cygwin 最新版 (setup-x86_64.exe) をダウンロード&インストール
詳細は割愛 (= すまない、ぐぐってくれ)、すべてデフォルトで進める。
インストール後にgcc, make, openmpi (←最重要) などビルドに必要な基本セットを全てインストーラーから選択してビルドする。core なものは大抵はお互いに依存しているので、この3つで事足りるはず。
MrBayes
MrBayes のソースコードをGithub からダウンロード
https://github.com/NBISweden/MrBayes
エクスプローラーでcygwin のローカルに移動する。デフォルトではC ドライブのcygwin64/home/[ユーザー名] がそれにあたる。
そこにMrBayes のソースコードを解凍する。
$ cd /home/[ユーザー名]/MrBayes; MrBayes のフォルダに移動
$ ./configure --with-mpi --enable-doc=no; Makefile を作る
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-unknown-cygwin
checking host system type... x86_64-unknown-cygwin
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for style of include used by make... GNU
checking whether to compile using MPI... yes
checking for mpicc... mpicc
checking for gcc... (cached) mpicc
checking whether the C compiler works... no
configure: error: in `/home/[ユーザー名]/Mrbayes':
configure: error: C compiler cannot create executables; コレは無視する
See `config.log' for more details
$ make -j2; MrBayes のマニュアルに従った
Making all in src
make[1]: Entering directory '/home/[ユーザー名]/Mrbayes/src'
make all-am
[中略]
make[1]: Entering directory '/home/[ユーザー名]/Mrbayes'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/home/[ユーザー名]/Mrbayes'
$ mpirun --allow-run-as-root -np 1 src/mb; コレでMrBayes をMPI で起動できる
ちなみにMrBayes 内のsrc フォルダ内にmb.exe が出力されるが、これがMPI 版のMrBayes らしい。
cygwin1.dll をコピーしてmb. exe ファイルと一緒にすれば、実行可能ファイルを別のフォルダに移動することもできる。
cygwin 内で起動しているmb のご尊顔
いや。。。嘘だろ。こんな簡単なわけない。
しばらくこれで本当にMPI しているのか調べてみる。
試しにCPU を8 つ充てたら動いた
俺は、信じない・・・コレは夢だ・・・