Closed ndrubins closed 6 years ago
You aren't including either location for the CL
directory in your g++
call. You would need either -I/usr/include/
or -I/usr/local/cuda-9.0/include/
@ndrubins did my response help you? If I don't hear back I will assume so and close this issue.
Thanks a lot @cdeterman. So is the problem that devtools::document
does not export either /usr/include/
or /usr/local/cuda-9.0/include/
to my path
?
If so, would you happen to know how to do that?
@ndrubins it has nothing to do with devtools
. It is part of the build process that you are likely missing because of nice things like LinkingTo
field in your DESCRIPTION
file. In this case, you are dealing with OpenCL, which has many backends that could be in multiple places. That is the reason you want a custom Makevars
file. You can find further documentation here. In my case, with gpuR I am allowing users to define an environmental variable OPENCL_INC
to define where the opencl headers are if they aren't in the default location (note I am also using a configure
script as well to write my Makevars
).
Yes, adding PKG_CPPFLAGS = -I/usr/local/cuda-9.0/include/
to a Makevars
file located in the src
folder and building the package with R CMD build <pacakge_name>
does work. As far as I see the developing an R
package with devtools
guide doesn't cover usage of Makevars
.
Thanks a lot for your help
@ndrubins glad I could help.
Hi there,
Just installed
RViennaCL
and trying to develop a package (namedgpuUtils
) that will importc++
code that makes use ofRViennaCL
forGPU
utilization.I followed Hadley's guidelines for package development and usage of c++ code, created a
c++
file with these lines:Then, when running
devtools::document
I get this error:OpenCL
andCUDA
are installed and I do seeCL/cl.h
in my system:And:
Any idea?
Thanks a lot