amrino
amrino

Reputation: 33

Installing Rmpi on centos with intel mpi

I am trying to install Rmpi in package in R, with intel mpi installed. First I downloaded Rmpi, and the processed by following comand:

Command line

R CMD INSTALL --configure-args="--with-mpi=/opt/intel_2015/impi/5.0.1.035/intel64/" Rmpi_0.6-5.tar.gz

But it didn't install, instead it shows the following result:

Log

* installing to library ‘/home/user/R/x86_64-pc-linux-gnu-library/3.2’
* installing *source* package ‘Rmpi’ ...
** package ‘Rmpi’ successfully unpacked and MD5 sums checked
checking for gcc... icc -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 icc -std=gnu99 accepts -g... yes
checking for icc -std=gnu99 option to accept ISO C89... none needed
Trying to find mpi.h ...
Found in /opt/intel_2015/impi/5.0.1.035/intel64//include
Trying to find libmpi.so or libmpich.a ...
Found libmpi in /opt/intel_2015/impi/5.0.1.035/intel64//lib
checking for openpty in -lutil... yes
checking for main in -lpthread... yes
configure: error: Unknown type of mpi: use --with-Rmpi-type or RMPI_TYPE to specify it
ERROR: configuration failed for package ‘Rmpi’
* removing ‘/home/user/R/x86_64-pc-linux-gnu-library/3.2/Rmpi’
* restoring previous ‘/home/user/R/x86_64-pc-linux-gnu-library/3.2/Rmpi’

Then I used --with-Rmpi-type='MPI2CH' and --with-Rmpi-type='OPENMPI' Nothing worked, I know It must be the mpi type problem. But I tried everything I can find, still can't figure it out. Architecture

Following is my .bashrc file of intel

source /opt/intel_2015/bin/compilervars.sh intel64
source /opt/intel_2015/impi/5.0.1.035/bin64/mpivars.sh
source /opt/intel_2015/composer_xe_2015.0.090/mkl/bin/mklvars.sh intel64
source /opt/intel_2015/bin/iccvars.sh intel64

After I tried the following command:

R CMD INSTALL --configure-args="\
--with-Rmpi-include='/opt/intel_2015/impi/5.0.1.035/intel64/include' \
--with-Rmpi-libpath='/opt/intel_2015/impi/5.0.1.035/intel64/lib' \
--with-mpi='/opt/intel_2015/impi/5.0.1.035/intel64' \
--with-Rmpi-type='OPENMPI' " Rmpi_0.6-5.tar.gz

It shows the following result, still something wrong, but promising:

* installing *source* package ‘Rmpi’ ...
** package ‘Rmpi’ successfully unpacked and MD5 sums checked
checking for openpty in -lutil... no
checking for main in -lpthread... no
configure: creating ./config.status
config.status: creating src/Makevars
** libs
icc -std=gnu99 -I/opt/R-3.2.3MKL/lib64/R/include -DNDEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I/opt/intel_2015/impi/5.0.1.035/intel64/include  -DMPI2 -DOPENMPI -I/usr/local/include    -fpic  -ip -O3 -opt-mem-layout-trans=3 -xHost -march=core-avx2 -wd188 -fp-model precise  -c Rmpi.c -o Rmpi.o
icc -std=gnu99 -I/opt/R-3.2.3MKL/lib64/R/include -DNDEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I/opt/intel_2015/impi/5.0.1.035/intel64/include  -DMPI2 -DOPENMPI -I/usr/local/include    -fpic  -ip -O3 -opt-mem-layout-trans=3 -xHost -march=core-avx2 -wd188 -fp-model precise  -c conversion.c -o conversion.o
icc -std=gnu99 -I/opt/R-3.2.3MKL/lib64/R/include -DNDEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I/opt/intel_2015/impi/5.0.1.035/intel64/include  -DMPI2 -DOPENMPI -I/usr/local/include    -fpic  -ip -O3 -opt-mem-layout-trans=3 -xHost -march=core-avx2 -wd188 -fp-model precise  -c internal.c -o internal.o
icc -std=gnu99 -shared -L/usr/local/lib64 -o Rmpi.so Rmpi.o conversion.o internal.o -L/opt/intel_2015/impi/5.0.1.035/intel64/lib -lmpi
installing to /home/user/R/x86_64-pc-linux-gnu-library/3.2/Rmpi/libs
** R
** demo
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (Rmpi)

Upvotes: 1

Views: 2617

Answers (1)

Kaleem Ullah
Kaleem Ullah

Reputation: 7059

Please try this one:

what I figure out is dependency error. I mean Rmpi does not work if OpenMPI was compiled to dynamically load extensions, which is nowadays the default installation. If your OpenMPI is >= 1.x (and for some installs of 1.x.x) you will need to install it from the sources disabling dlopen.

So:

Try uninstalling all of the MPI interfaces, reinstalled OpenMPI using the "--enabled-shared --disable-dlopen" command, and Rmpi should able to install sucessfully inside R.

R CMD INSTALL Rmpi_0.6-5.tar.gz --configure-args="--with-mpi=/usr/local/ --with-Rmpi-type=OPENMPI --enabled-shared --disable-dlopen"

I hope it work for you. but don't give up :)

Upvotes: 1

Related Questions