Install_github does not find mpi.h (MSMPI)

166 views
Skip to first unread message

Sebastian Konietzny

unread,
Dec 2, 2015, 2:35:29 AM12/2/15
to rbigdatap...@googlegroups.com
Unfortunately, I cannot install it under RStudio on Windows 8 64bit.
I already installed MS-MPI. But when I execute “library(devtools)” and install_github, I get the following error message:

<code>
 
> install_github(repo="pbdMPI", username="RBigData", dependencies=T)
Downloading github repo RBigData/pbdMPI@master
Installing pbdMPI
"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore CMD INSTALL "C:/Users/skonietzny/AppData/Local/Temp/RtmpIzIGvX/devtools18686d2249fe/RBigData-pbdMPI-fb26b36"  \
  --library="C:/Program Files/R/R-3.2.1/library" --install-tests
 
* installing *source* package 'pbdMPI' ...
** libs
 
*** arch - i386
echo 'MPI_ROOT = C:/Program Files (x86)/Microsoft SDKs/MPI/' > Makeconf
echo 'MPI_INCLUDE = C:/Program Files (x86)/Microsoft SDKs/MPI/Inc/' >> Makeconf
echo 'MPI_LIB = C:/Program Files (x86)/Microsoft SDKs/MPI/Lib/i386/msmpi.lib' >> Makeconf
echo 'WIN_FLAGS = -DWIN -DMSMPI_NO_DEPRECATE_20' >> Makeconf
gcc -m32 -I"C:/PROGRA~1/R/R-32~1.1/include" -DNDEBUG -I"C:/Program Files (x86)/Microsoft SDKs/MPI/Inc/" -DMPI2 -DWIN -DMSMPI_NO_DEPRECATE_20    -I"d:/RCompile/r-compiling/local/local320/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c comm_errors.c -o comm_errors.o
gcc -m32 -I"C:/PROGRA~1/R/R-32~1.1/include" -DNDEBUG -I"C:/Program Files (x86)/Microsoft SDKs/MPI/Inc/" -DMPI2 -DWIN -DMSMPI_NO_DEPRECATE_20    -I"d:/RCompile/r-compiling/local/local320/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c comm_sort_double.c -o comm_sort_double.o
In file included from spmd.h:7:0,
                 from comm_api.h:7,
                 from comm_sort_double.c:1:
pkg_global.h:16:17: fatal error: mpi.h: No such file or directory
compilation terminated.
make: *** [comm_sort_double.o] Error 1
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-32~1.1/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.1/share/make/winshlib.mk" SHLIB="pbdMPI.dll" OBJECTS="comm_errors.o comm_sort_double.o comm_sort_integer.o pkg_dl.o pkg_tools.o spmd.o spmd_allgather.o spmd_allgatherv.o spmd_allreduce.o spmd_alltoall.o spmd_alltoallv.o spmd_bcast.o spmd_communicator.o spmd_communicator_spawn.o spmd_gather.o spmd_gatherv.o spmd_info.o spmd_recv.o spmd_reduce.o spmd_scatter.o spmd_scatterv.o spmd_send.o spmd_sendrecv.o spmd_sendrecv_replace.o spmd_tool.o spmd_utility.o spmd_wait.o zzz.o"' had status 2
ERROR: compilation failed for package 'pbdMPI'
* removing 'C:/Program Files/R/R-3.2.1/library/pbdMPI'
Error: Command failed (1)
In addition: Warning message:
Username parameter is deprecated. Please use RBigData/pbdMPI

</code>  

Do you have an idea what causes this problem?

I already experimented with the x86 and x64 subfolders, and I can see the mpi.h in the Include directory, but for some reason the install_github command does not find it.

Best, Sebastian


Wei-Chen Chen

unread,
Dec 2, 2015, 7:44:13 PM12/2/15
to RBigDataProgramming
I never install RStudio on my windows either unfortunately.
You will need to set path to mpi before R is lunched, either use windows environment or set it in a cmd.
FAQ section of pbdMPI vignettes is a good start for beginners of pbdR.

Wei-Chen Chen

unread,
Dec 3, 2015, 8:42:46 PM12/3/15
to RBigDataProgramming, Alba Ester Martínez Ruiz
Dear Alba,

I will like to keep the same topic that someone may want to know, so I reply your questions here. I barely use RStudio, but the solution to the problem is probably the following:

1. Make sure there is a mpi.h in the mpi's directory. It is probably at "C:\Program Files\Microsoft MPI\Inc". Not every release from MS packages has those, some may only have binary and dll files. I only test with HPC Pack 2012 R2 MS-MPI Redistributable Package.

2. You need "set path=..." to have the mpiexec.exe binary in your path. The mpiexec.exe is probably at "C:\Program Files\Microsoft MPI\Bin".

3. The 2 is probably done in cmd line, where you can start R.exe or Rgui.exe from cmd. The R.exe is probably at "C:\Program Files\R\R-3.2.2\bin". Ideally, you will have both mpiexec.exe and R.exe in your path. Hopefully, the RStudio.exe or so can be in the path as well. The other way is to use system environment to set the path.

4. Make sure pbdMPI is working first before installing all other pbdR packages.

I have R 3.2.2, windows8 and 7, and HPC Pack 2012 R2 working. I have no idea about CRAN's pbdBASE errors built in windows. That version has been two years old...

The interesting question is how to have the R.exe works without the path is set before calling it...

Sincerely,
Wei-Chen Chen

Alba Martinez-Ruiz

unread,
Dec 4, 2015, 4:16:45 PM12/4/15
to RBigDataProgramming
Dear Wei-Chen,

Thanks for your answer. I installed without problems HPC Pack 2002 R2 MS-MPI Redistributable Package (MSPMPISetup.exe). Before I had installed MS-MPI version 7.0.12437.6, and this doesn't put mpi.h in C:\Program Files\Inc.

It also works to do in cmd line, mpixec -np 2 hostname.exe

So, I already installed pbdMPI, pbdSLAP and pbdBASE, with

library(devtools)
devtools::install_github("wrathematics/pbdMPI")
devtools::install_github("wrathematics/pbdSLAP")
devtools::install_github("wrathematics/pbdBASE")

You have to allow firewall access to,

C:\Program Files\r\r-3.2.2\bin\x64\rterm.exe
C:\Program Files\r\r-3.2.2\bin\x64\rgui.exe

This should works in R and in RStudio, and all of this in Windows 7. I have the following error when installing pbdDMAT,

Error in eval(expr, envir, enclos) : object '.pbdEnv' not found (it is in spanish in my console)
Error: unable to load R code in package 'pbdDMAT'
Error: lazy loading failed for package 'pbdDMAT'

I think, maybe there is a bug here?. Many thanks in advance.

Best regards,
Alba

Wei-Chen Chen

unread,
Dec 9, 2015, 8:29:04 PM12/9/15
to RBigDataProgramming
Dear Alba,

Thanks for testing and catching bugs. Ya...we still have some hurdles to fix ...

Sincerely,
Wei-Chen Chen

Deb Midya

unread,
Jan 5, 2016, 7:10:58 PM1/5/16
to RBigDataProgramming, amar...@ucsc.cl

Hi,

I am on Windows 10 64 bit.

The following are current downloads for MS-MPI:

Shuld I use first or second one?

Once again, thank you very much for the time you have given.

Regards,

Deb
Reply all
Reply to author
Forward
0 new messages