在R中为MAC安装doMPI包

时间:2017-01-31 14:59:01

标签: r

我需要帮助安装一个名为" doMPI"的并行后端。在RStudio。我只是想在pomp包中使用一个例子,它要求我安装这个特定的包。我按照惯例install.packages("doMPI")进行操作,但是我得到一个提示,询问我是否要从源代码安装,如下所示。我说是的但是库没有加载。我正在使用MAC。

> install.packages("doMPI")
also installing the dependency ‘Rmpi’

Package which is only available in source form, and may need
  compilation of C/C++/Fortran: ‘Rmpi’
Do you want to attempt to install these from sources?
y/n: y
installing the source packages ‘Rmpi’, ‘doMPI’

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

trying URL 'https://cran.rstudio.com/src/contrib/doMPI_0.2.1.tar.gz'
Content type 'application/x-gzip' length 223374 bytes (218 KB)
==================================================
downloaded 218 KB

* installing *source* package ‘Rmpi’ ...
** package ‘Rmpi’ successfully unpacked and MD5 sums checked
checking for gcc... clang
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 clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking how to run the C preprocessor... clang -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... 
rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking mpi.h usability... no
checking mpi.h presence... no
checking for mpi.h... no
configure: error: "Cannot find mpi.h header file"
ERROR: configuration failed for package ‘Rmpi’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rmpi’
Warning in install.packages :
  installation of package ‘Rmpi’ had non-zero exit status
ERROR: dependency ‘Rmpi’ is not available for package ‘doMPI’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/doMPI’
Warning in install.packages :
  installation of package ‘doMPI’ had non-zero exit status

The downloaded source packages are in


 ‘/private/var/folders/xb/n20n792n5zn0xpyhpdcn4chm0000gn/T/RtmpADdtwf/downloaded_packages’
> library(doMPI)
Error in library(doMPI) : there is no package called ‘doMPI’

0 个答案:

没有答案