-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows run-rime error due to name conflict of DLLs #6
Comments
@s-u said in #2 that there is an installation procedure in If you did and that still doesn't help: back when I was on Windows I just renamed the package to get rid of this error, but I haven't used it there for a long time. The problem, if I remember correctly, is that on Windows both the package and the system library have the file name |
Assuming Aaron is right, the issue could be that the package DLL and the library DLL have the same name which may confuse Windows when resolving the dependency for the package DLL. Work-around would be to use static library if available or have someone find a way to work around the problem (other than re-naming the package; it may be easier to rename the OpenCL library) - PRs are welcome. |
One idea: can you, please, try to load the OpenCL library in R before the OpenCL package? So something like: dyn.load("c:/.../OCL_SDK_Light/lib/x64/OpenCL.dll", FALSE, TRUE)
library(OpenCL) if that works, then that may be a way to work around the problem. |
That did the trick.
Compiled with:
Otherwise the test load causes the compile and install to abort and delete the compiled binary. Execution requires
Curiously, the Nvidia CUDA GPU Computing Toolkit installation places the OpenCL.dll in Now to see if one can add an Thank you. Edit: I have run a number of the examples in the documentation to ensure that the GPU is recognized and that it can execute openCL code. |
@GerardTromp Thanks a lot for the test! That's great news! The annoying part is that it means we cannot use the automatic C symbol registration in the namespace, so I'll change the code to factor it out into a separate function and then call it only after the OCL implementation has been loaded. Do you know if there is a way to detect the location of the implementation DLL at run-time? That's what we do with rJava - using the registry to find the path to the JVM, but I suspect there may not be a standard for OpenCL on Windows. At worst we can write |
@s-u I am adding the information below as screengrabs since that is faster than trying to get the text equivalent. Let me know if I can help out further. These are all the registry entries (bar the shell search entries) for the text string "OpenCL.dll" This is the detailed information for OpenCL.dll itself: It is provided by Nvidia as can be seen in the Digital Signatures (there is also a signature from Microsoft): |
Maybe I was assuming that the library needs to have the same name as the package back then. If just renaming the library works, then I think that's the easiest solution.
Sounds reasonable to me. Other users of OpenCL.dll are probably also not searching the system, they're just taking it from There is
|
Hopefully now addressed by #20 |
When building the OpenCL package I run into an error regarding procedure entry point clBuildProgram.
According to the documentation I set paths and the OpenCL.dll from recent AMD Pro drivers is in my Windows/System32 which is on PATH. It is supported for OpenCL 2.0.
Windows, R and RTools are up to date. Can you help my fix the problem? Can't wait to try OpenCL accelerated evolutionary programming in R :-); thanks for your effort in advance!
Please see the screenshot for more details:
The text was updated successfully, but these errors were encountered: