Error loading Rmpi, reference to "system2"

378 views Asked by At

I'm attempting to install Rmpi, as root, on current newest version of R (3.3.2) on an Ubuntu Linux (16.04) system. I've googled and tried everything I can think of but can not get past this error when attempting to test load the package after it has apparently been successfully installed. Any suggestions welcome.

*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in system2(file.path(R.home("bin"), "R"), c(if (nzchar(arch)) paste0("--arch=",  : 
  error in running command
1

There are 1 answers

5
Dirk is no longer here On

What is wrong with sudo apt-get install r-cran-rmpi? Works like a charm here.

As does install.r Rmpi (where install.r is just a helper from my littler package):

$ install.r Rmpi
trying URL 'https://cran.rstudio.com/src/contrib/Rmpi_0.6-6.tar.gz'
Content type 'application/x-gzip' length 105181 bytes (102 KB)
==================================================
downloaded 102 KB

* installing *source* package ‘Rmpi’ ...
** package ‘Rmpi’ successfully unpacked and MD5 sums checked
checking for gcc... ccache gcc
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 ccache gcc accepts -g... yes
checking for ccache gcc option to accept ISO C89... none needed
I am here /usr/lib/openmpi and it is OpenMPI
Trying to find mpi.h ...
Found in /usr/lib/openmpi/include
Trying to find libmpi.so or libmpich.a ...
Found libmpi in /usr/lib/openmpi/lib
checking for orted... yes
checking for openpty in -lutil... yes
checking for main in -lpthread... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
ccache gcc -I/usr/share/R/include -DNDEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I/usr/lib/openmpi/include  -DMPI2 -DOPENMPI     -fpic  -O3 -g0 -Wall -pipe -pedantic -std=gnu99 -I/usr/local/cuda/include -I/usr/share/R/include -c Rmpi.c -o Rmpi.o
ccache gcc -I/usr/share/R/include -DNDEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I/usr/lib/openmpi/include  -DMPI2 -DOPENMPI     -fpic  -O3 -g0 -Wall -pipe -pedantic -std=gnu99 -I/usr/local/cuda/include -I/usr/share/R/include -c conversion.c -o conversion.o
ccache gcc -I/usr/share/R/include -DNDEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I/usr/lib/openmpi/include  -DMPI2 -DOPENMPI     -fpic  -O3 -g0 -Wall -pipe -pedantic -std=gnu99 -I/usr/local/cuda/include -I/usr/share/R/include -c internal.c -o internal.o
ccache gcc -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o Rmpi.so Rmpi.o conversion.o internal.o -L/usr/lib/openmpi/lib -lmpi -lutil -lpthread -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/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)

The downloaded source packages are in
        ‘/tmp/downloaded_packages’
$