Reputation: 43
I have a virgin build of 64-bit Ubuntu 21.04 build on a Z820 Intel Xeon(R) CPU E5-2643 v2 @ 3.50GHz × 24. The OS was installed with default settings.
MPICH install:
For the particular system mpich version 3.4.2 via the following steps.
cd /home/rmpitest/Downloads
tar xfz mpich-3.4.2.tar.gz
cd /home/rmpitest/mpich-install
mkdir /tmp/rmpitest/mpich-3.4.2
cd /tmp/rmpitest/mpich-3.4.2
sudo apt-get install build-essential
/home/rmpitest/Downloads/mpich-3.4.2/configure -prefix=/home/rmpitest/mpich-install --with-device=ch4:ofi FFLAGS=-fallow-argument-mismatch --disable-fortran |& tee c.txt # I'm not sure why I had to disable Fortran but I don't think I need it.
make 2>&1 | tee m.txt
make install |& tee mi.txt
export PATH=/home/v22da/mpich-install/bin:$PATH
rmpitest@rmpitest-HP-Z820-Workstation:/tmp/rmpitest/mpich-3.4.2$ which mpicc
/home/rmpitest/mpich-install/bin/mpicc
rmpitest@rmpitest-HP-Z820-Workstation:/tmp/rmpitest/mpich-3.4.2$ which mpiexec
/home/rmpitest/mpich-install/bin/mpiexec
R install:
sudo apt install r-base
download Rmpi
https://cran.r-project.org/src/contrib/Rmpi_0.6-9.1.tar.gz
sudo R CMD INSTALL Rmpi_0.6-9.1.tar.gz
# fails to find mpi.h
# so
sudo R CMD INSTALL ../Downloads/Rmpi_0.6-9.1.tar.gz --configure-args="--with-mpi=/home/rmpitest/mpich-install --with-Rmpi-type=MPICH"
Results:
Error: package or namespace load failed for ‘Rmpi’:
.onLoad failed in loadNamespace() for 'Rmpi', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/usr/local/lib/R/site-library/00LOCK-Rmpi/00new/Rmpi/libs/Rmpi.so':
libmpi.so.12: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/Rmpi’
This is as simple of a mpi install as I can imagine here is this failing?
Upvotes: 0
Views: 99
Reputation: 904
I think that some of your problems come from mixing and matching package managers. I am sure that you have probably solved this problem by now, but in your shoes I would:
a) use R's install.packages()
function for Rmpi alone; which should pull in the dependencies
b) Export R_LIBS=~/somewhere/local
so you don't clobber the system packages
c) MPI is itself a bit of an overhead on a single computer -- as you probably know, it's really designed for clusters. The doMPI
package provides a backend to R's foreach () %dopar% {}
structure that works transiently, and if you are developing code on a local machine prior to deploying it on a cluster, in many ways it makes sense to use and install library(parallel)
and/or library(foreach)
and use the dopar
function from that. The cluster that you may use probably has its own method for managing "library fun and games" -- e.g. module load -- and in my experience it's quite easy to change which library is called. You'll also probably need local R_LIBS
on a cluster as you can't modify system libraries (to avoid breaking things for other people).
Upvotes: 0