对LAM安装RMPI / MPI集群(Installing Rmpi on LAM/MPI clus

2019-08-03 05:26发布

我试图安装Rmpi一个LAM MPI集群机上包装。 以前我一直在编译和测试一些东西( mpi4py和小C ++程序),所以我敢肯定,MPI工作本身。 但是安装Rmpi包链接库时失败。

我的主要犯罪嫌疑人是一个电话gcc ,而不是mpicc在生成文件(我试图找到在配置行来改变这一点,但至今未能找到它)。

是否有人有经验与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

Answer 1:

我们有一个非常类似的设置。 我没碰过它最近足以能够说话,您的具体情况,但我可以沿着几个是让我们向上和运行命令的传递...

对于我们的第一个步骤,因为德克提到的,是得到的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,1.4.3的openmpi,R 2.15.0。



Answer 2:

很多年以前,我曾经使用LAM但后来改的openmpi。 浩宇,RMPI的作者,建议这样做。

在R-SIG-HPC列表是这样的问题一个体面的地方。



Answer 3:

正如杰夫·艾伦建议我去R和运行

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)
))

我也跑

# 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

编辑

尽管我设法编译它,当我失败的多个节点上运行RMPI。 所以我想,我要开始推动的openmpi过渡毕竟:/



文章来源: Installing Rmpi on LAM/MPI cluster