在Windows上安装gputools

时间:2015-06-17 08:37:58

标签: r windows cuda gpu-programming

我正在尝试在Windows机器上安装R包gputools。根据{{​​3}},不支持Windows。然而linux指令都是关于指示r包在哪里找到cuda文件夹,所以我认为这应该可以在windows上实现。

config.mk文件是

# set R_HOME, R_INC, and R_LIB to the the R install dir,
# the R header dir, and the R shared library dir on your system
R_HOME := $(shell R RHOME)
R_INC := $(R_HOME)/include
R_LIB := $(R_HOME)/lib

# replace these three lines with
# CUDA_HOME := <path to your cuda install>
ifndef CUDA_HOME
    CUDA_HOME := /usr/local/cuda
endif

# set CUDA_INC to CUDA header dir on your system
CUDA_INC := $(CUDA_HOME)/include

ARCH := $(shell uname -m)

# replace these five lines with
# CUDA_LIB := <path to your cuda shared libraries>
ifeq ($(ARCH), i386)
    CUDA_LIB := $(CUDA_HOME)/lib
else
    CUDA_LIB := $(CUDA_HOME)/lib64
endif

OS := $(shell uname -s)
ifeq ($(OS), Darwin)
    ifeq ($(ARCH), x86_64)
        DEVICEOPTS := -m64
    endif
    CUDA_LIB := $(CUDA_HOME)/lib
    R_FRAMEWORK := -F$(R_HOME)/.. -framework R
    RPATH := -rpath $(CUDA_LIB)
endif

CPICFLAGS := $(shell R CMD config CPICFLAGS)

我修改了config.mk文件,将$(CUDA_HOME)的每个实例替换为C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v6.5/lib,将$(R_HOME)替换为C:/R/R-3.1.2

在此之后,我重新压缩了包文件夹,并尝试使用install.packages("C:/Users/prg/Desktop/gputools_0.28.tar/gputools_0.28/gputools.zip", repos = NULL)进行安装,但这会导致错误file ‘src/config.mk’ has the wrong MD5 checksum

有没有办法通过MD5检查?我是否需要在config.mk文件夹中指定其他内容?

在遵循cdeterman和RHertel的建议后,我在删除MD5文件后用R CMD build gputools_0.28重建了tar文件。现在尝试安装程序包不再产生校验和错误,但编译错误:

* installing *source* package 'gputools' ...
** libs

*** arch - i386
no DLL was created
ERROR: compilation failed for package 'gputools'
* removing 'C:/Users/prg/Desktop/gputools/gputools_0.28/gputools.Rcheck/gputools'

我已经安装了Rtools和MinGw,我可以做些什么来让gputools编译?

1 个答案:

答案 0 :(得分:3)

这可能是问题:&#34;在此之后我重新打包了包#34;。你是怎么做的?我从未尝试过,但我认为只是压缩目录可能无法正常工作。 我建议您使用R CMD build gputools_0.28创建修改后的包。