2012-11-26 4 views
5

RmpiパッケージをLAM MPIクラスタマシンにインストールしようとしています。以前は、私はコンパイルしていくつかのもの(mpi4pyと小さなC++プログラム)をテストしていたので、MPI自体が動作すると確信しています。ただし、ライブラリをリンクするときにRmpiパッケージをインストールすると失敗します。LAM/MPIクラスタにRmpiをインストールする

私の主な容疑者は、makefileにmpiccの代わりにgccの呼び出しをしています(私はこれを変更するために設定を変更しようとしていますが、これまで見つけられませんでした)。

誰かがLAMにRmpiをインストールした経験がありますが、それをどのように管理しましたか?

アーキテクチャ

  • LAM MPI(または多分PBS MPIなどが存在する場合、どのように私がチェックしますか?)。確かに一つのこと、私は私は思いませんmpicppファイルウィッヒは、すべてのMPI実装に共通して持って
  • R-2.15.2
  • Rmpi​​_0.6-1が
  • のCentOS 5.5(決勝)リリース、x86_64版
  • Rから呼び出さ

コマンド

install.packages("Rmpi") 

ログイン

trying URL 'http://cran.at.r-project.org/src/contrib/Rmpi_0.6-1.tar.gz' 
Content type 'application/x-gzip' length 92977 bytes (90 Kb) 
opened URL 
================================================== 
downloaded 90 Kb 

* installing *source* package âRmpiâ ... 
** package âRmpiâ successfully unpacked and MD5 sums checked 
checking for gcc... gcc -std=gnu99 
checking whether the C compiler works... yes 
checking for C compiler default output file name... a.out 
checking for suffix of executables... 
checking whether we are cross compiling... no 
checking for suffix of object files... o 
checking whether we are using the GNU C compiler... yes 
checking whether gcc -std=gnu99 accepts -g... yes 
checking for gcc -std=gnu99 option to accept ISO C89... none needed 
I am here /usr and it is OpenMPI 
Trying to find mpi.h ... 
Found in /usr/include 
Trying to find libmpi.so or libmpich.a ... 
Found libmpi in /usr/lib 
checking for openpty in -lutil... yes 
checking for main in -lpthread... yes 
configure: creating ./config.status 
config.status: creating src/Makevars 
** libs 
gcc -std=gnu99 -I/g/software/linux/pack/r-2.15.2/centos-5/lib64/R/include -DNDEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I/usr/include -DMPI2 -DOPENMPI -I/usr/local/include -fpic -g -O2 -c RegQuery.c -o RegQuery.o 
gcc -std=gnu99 -I/g/software/linux/pack/r-2.15.2/centos-5/lib64/R/include -DNDEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I/usr/include -DMPI2 -DOPENMPI -I/usr/local/include -fpic -g -O2 -c Rmpi.c -o Rmpi.o 
gcc -std=gnu99 -I/g/software/linux/pack/r-2.15.2/centos-5/lib64/R/include -DNDEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I/usr/include -DMPI2 -DOPENMPI -I/usr/local/include -fpic -g -O2 -c conversion.c -o conversion.o 
gcc -std=gnu99 -I/g/software/linux/pack/r-2.15.2/centos-5/lib64/R/include -DNDEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I/usr/include -DMPI2 -DOPENMPI -I/usr/local/include -fpic -g -O2 -c internal.c -o internal.o 
gcc -std=gnu99 -shared -L/usr/local/lib64 -o Rmpi.so RegQuery.o Rmpi.o conversion.o internal.o -L/usr/lib -lmpi -lutil -lpthread -L/g/software/linux/pack/r-2.15.2/centos-5/lib64/R/lib -lR 
/usr/bin/ld: skipping incompatible /usr/lib/libutil.so when searching for -lutil 
/usr/bin/ld: skipping incompatible /usr/lib/libutil.a when searching for -lutil 
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread 
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread 
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc 
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc 
installing to /home/andrejev/R/x86_64-unknown-linux-gnu-library/2.15/Rmpi/libs 
** R 
** demo 
** inst 
** preparing package for lazy loading 
** help 
*** installing help indices 
** building package indices 
** testing if installed package can be loaded 
Error : .onLoad failed in loadNamespace() for 'Rmpi', details: 
    call: dyn.load(file, DLLpath = DLLpath, ...) 
    error: unable to load shared object '/home/andrejev/R/x86_64-unknown-linux-gnu-library/2.15/Rmpi/libs/Rmpi.so': 
    /usr/lib/libmpi.so.0: undefined symbol: _kio 
Error: loading failed 
Execution halted 
ERROR: loading failed 
* removing â/home/andrejev/R/x86_64-unknown-linux-gnu-library/2.15/Rmpiâ 

The downloaded source packages are in 
     â/tmp/Rtmp5qzeqp/downloaded_packagesâ 
Warning message: 
In install.packages("Rmpi") : 
    installation of package âRmpiâ had non-zero exit status 
+0

本当にまだLAM/MPIを実行していますか?これは宇宙そのものと同じくらい古いものです。私はむしろあなたがOpen MPIを使用していると言います(LAM/MPIはOpen MPIに数年前にマージされました)。 PBSはクラスタのバッチシステムであり、MPIとは何の関係もありません。 –

答えて

6

非常に似た設定です。私は最近あなたの特定の状況に話すことができるように十分にそれに触れていないが、私たちを稼働させるコマンドのいくつかを渡すことができます...

私たちのための最初のステップとして、ダーク氏は、OpenMPIを稼働させることに言及しました。それがセットアップだたら、LD_LIBRARY_PATHが正しく設定されていることを確認する必要があります:

export LD_LIBRARY_PATH=/opt/openmpiv2/lib/:$LD_LIBRARY_PATH 

最後にRMPIが(上記のコマンドを実行し、Rを起動した後に)私たちのためにインストールされてしまったコマンドでした:

install.packages("Rmpi", configure.args = c("--with-Rmpi-include=/opt/openmpiv2/include/", "--with-Rmpi-libpath=/opt/openmpiv2/lib/", "--with-Rmpi-type=OPENMPI", "--with-mpi=/opt/openmpiv2/")) 

私たちのためにパッケージを正常にインストールしました。これらのコマンドは、彼らが有用ではないかもしれないことを私たちのセットアップに非常に特異的であってもよいが、うまくいけば、ここで何かがあなたにいくつかの時間を節約することができ

qsub -I -l nodes=2:ppn=12 
/opt/openmpiv2/bin/mpirun --hostfile $PBS_NODEFILE -n 1 R --slave -f rmpitest.R 

:その後、我々は、次のようなコマンドを使用してジョブを実行することができます!

@Sergej以下に提案するように、より一般的な解決策であってもよい。

install.packages(
    "Rmpi", 
    configure.args = c(
    "--with-Rmpi-include=/usr/include/", # This is where LAM's mpi.h is located 
    "--with-Rmpi-libpath=/usr/lib/",  # This is where liblam.so is located (actually as I type it mine was located in /usr/lib64/liblam.so.0, so maybe this is not needed at all) 
    "--with-Rmpi-type=LAM"    # This says that the type is LAM (there is also OPENMPI and MPICH) 
)) 

我々のセットアップ:RHEL 5、RMPI 0.5から9、OpenMPIの1.4.3、R 2.15。0

+0

ありがとうございます。私は今これを試してみます –

+0

私はそれの魔法は何だったのか分かりませんが、うまくいきました。どうもありがとう。あなたの質問に印をつけ、セットアップが少し違うので私の解決策を掲載します。あなたの答えでそれを参照することはできますか? –

+0

確かに!それが助けてくれてうれしい。私の場合、 –

2

長年前、私はLAMを使用していましたが、OpenMPIに切り替えました。 Rmpiの作者、Hao Yuは同じことを示唆している。

r-sig-hpcのリストは、このような質問のためのまともな場所です。

+0

それは私の手の届かないところです:) –

+0

LAMがOpen MPIに統合されました。 LAMには積極的な開発は行われておらず、メンテナンスのバグ修正のみです。 –

+0

それは物語の一部に過ぎません。最終的なLAMのリリースは、Rmpiを構築/使用することさえできませんでした。そう、はい、OpenMPIとLAMサイトもそうです。念押し有難う。ああ、私がR、Rmpi、... Debianのメンテナ:他のLinuxのフレーバーでは、これは(apt-get)ボックスからすべて動作します。 –

1

ジェフ・アレンによって示唆されるように、私はRに行って、私も、私は私が実行したときにそれをコンパイルするために管理していても

# Because it was non-standard R location so it din't find shared libraries 
export LD_LIBRARY_PATH=/g/software/linux/pack/r-2.15.0/lib64/R/lib 

# Rmpi also could not find libutil so I had to add path to it as well 
export LD_PRELOAD=/usr/lib64/libutil.so 

EDIT

を実行

install.packages(
    "Rmpi", 
    configure.args = c(
    "--with-Rmpi-include=/usr/include/", # This is where LAM's mpi.h is located 
    "--with-Rmpi-libpath=/usr/lib64/",  # This is where liblam.so is located 
    "--with-Rmpi-type=LAM"    # This says that the type is LAM (there is also OPENMPI and MPICH) 
)) 

を実行します1つ以上のノードでRmpiが失敗する。ですから、私はOpenMPIへの移行を推し進めなければならないと思います。/

関連する問題