s-u / OpenCL

Interface allowing R to use OpenCL
Other
15 stars 10 forks source link

Cannot install OpenCL R package #2

Closed strategist922 closed 4 years ago

strategist922 commented 7 years ago

Hi,

I try to install OpenCL R package in Windows 10 Enterprise X64 with Microsoft R Open 3.3.3 and RStudio. May I know how to solve this issue?

Following are the error messages:

install.packages("OpenCL") Installing package into ‘C:/Users/James Chang/Documents/R/win-library/3.3’ (as ‘lib’ is unspecified) Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘OpenCL’ Do you want to attempt to install these from sources? y/n: y installing the source package ‘OpenCL’

trying URL 'https://mran.microsoft.com/snapshot/2017-03-15/src/contrib/OpenCL_0.1-3.tar.gz' Content type 'application/octet-stream' length 15524 bytes (15 KB) downloaded 15 KB

The downloaded source packages are in ‘C:\Users\James Chang\AppData\Local\Temp\RtmpItcCbm\downloaded_packages’

I already install Intel® SDK for OpenCL™ Applications for Windows* 2016 Version 6.3.0.1904 Following already setting im my system environment variable INTELGTDEBUGGERROOT C:\Program Files (x86)\Intel\OpenCL SDK\6.3\igfxdbg\ INTELOCLPATH C:\Program Files (x86)\Intel\OpenCL SDK\6.3\bin\x64;C:\Program Files (x86)\Intel\OpenCL SDK\6.3\bin\x86 INTELOCLSDKROOT C:\Program Files (x86)\Intel\OpenCL SDK\6.3\

aaronpuchert commented 7 years ago

You'll need to tell the compiler where to find the header file CL/opencl.h and later where to find the library libOpenCL.a. I can't tell you where they are, but you probably find them in the Intel SDK.

Then change src/Makevars as follows

PKG_CFLAGS=-I<directory containing CL/opencl.h>
PKG_LIBS=`if test -z "$${PKG_LIBS}"; then if uname|grep -i darwin >/dev/null; then echo '-framework OpenCL'; else echo '-lOpenCL'; fi; else echo "$${PKG_LIBS}"; fi` -L<directory containing libOpenCL.a>

in a local copy of the package and build from there.

However, last time I tried this on Windows, it still didn't work. You may need to apply additional changes. Unfortunately, I don't have a Windows machine any longer, but I remember that this worked on Windows 7.

s-u commented 4 years ago

See NEWS on how to set necessary environment variables.

MarkTeves commented 11 months ago

I try it but the result seems. Help me.

s-u commented 11 months ago

Do you have any details? You have to set OCL to point to your SDK and make sure you have the correct Rtools installed to build R packages. If you need any help, you have your exact invocation, settings and any errors you get.

MarkTeves commented 11 months ago

Thank you. Rtool : Rtool43 error : [image: image.png] and [image: image.png] On Sun, Dec 10, 2023 at 5:40 PM Simon Urbanek @.***> wrote:

Do you have any details? You have to set OCL to point to your SDK and make sure you have the correct Rtools installed to build R packages. If you need any help, you have your exact invocation, settings and any errors you get.

— Reply to this email directly, view it on GitHub https://github.com/s-u/OpenCL/issues/2#issuecomment-1849194878, or unsubscribe https://github.com/notifications/unsubscribe-auth/BELPYV5KVTUFMILMLGL5AGLYIZQA5AVCNFSM4DHV5FE2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBUHEYTSNBYG44A . You are receiving this because you commented.Message ID: @.***>