Repository navigation
JavaCL.createBestContext() hangs on GTX680 (Kepler architecture) #15
Description
Activity
Hi Jan,
Thanks for your bug report!
Is this happening on a 64 bit linux + 64 bit JVM? (
java -version)
And by any chance, were you able to attach a Java debugger or gdb to see which call the process is hung into?Also, could you please try to call JavaCL.createBestContext(CLPlatform.DeviceFeature.GPU) instead, and if it works, to check if other features than the default MaxComputeUnits cause the hang?
Cheers
From @karolovbrat on October 8, 2012 20:41
Hi Olivier,
"Is this happening on a 64 bit linux + 64 bit JVM? (java -version)"
-> Yes, the used JVM version is 1.7.0"Also, could you please try to call JavaCL.createBestContext(CLPlatform.DeviceFeature.GPU) instead, and if it works, to check if other features than the default MaxComputeUnits cause the hang?"
-> It hangs with all the features."And by any chance, were you able to attach a Java debugger or gdb to see which call the process is hung into?"
Unfortunately, I am running my code on a cluster so I am not really allowed to do this but I guess if you do not have access to GTX 680 we have no other option :) (I will try to do it and get back to you)Cheers,
JanFrom @karolovbrat on October 8, 2012 21:54
Hi Olivier,
I attached the jdb debugger to my application and retrieved the following stack trace
main:
[1] com.nativelibs4java.opencl.library.OpenCLLibrary.clCreateContext (native method)
[2] com.nativelibs4java.opencl.CLPlatform.createContext (CLPlatform.java:384)
[3] com.nativelibs4java.opencl.JavaCL.createBestContext (JavaCL.java:246)
[4] com.nativelibs4java.opencl.JavaCL.createBestContext (JavaCL.java:237)I am running javacl 1.0.0-RC2.
Hopefully this helps.
Cheers,
JanHi @karolovbrat ,
Thanks for your help!
Could you please try switching to the latest 1.0-SNAPSHOT version?
(here's a direct link in case you're not using Maven: https://oss.sonatype.org/content/groups/public/com/nativelibs4java/javacl/1.0-SNAPSHOT/javacl-1.0-20121008.223530-56-shaded.jar )Cheers
From @karolovbrat on October 9, 2012 7:17
Hi Olivier,
the 1.0-SNAPSHOT version still hangs the stack trace follows:
[1] com.nativelibs4java.opencl.library.OpenCLLibrary.clCreateContext (native method)
[2] com.nativelibs4java.opencl.CLPlatform.createContext (CLPlatform.java:405)
[3] com.nativelibs4java.opencl.JavaCL.createBestContext (JavaCL.java:335)
[4] com.nativelibs4java.opencl.JavaCL.createBestContext (JavaCL.java:326)Cheers,
JanHi Jan,
Thanks a lot for your patience!
It turns out the way JavaCL called clCreateContext used an "implementation-defined" case, according to the specs (cf. case of NULL properties parameter: http://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clCreateContext.html ).
This should be fixed in the latest snapshot, could you please try it and let me know how it goes?Cheers
From @karolovbrat on October 10, 2012 9:35
Hi Olivier,
Thanks a lot for your effort. Unfortunately, it still hangs.
[1] com.nativelibs4java.opencl.library.OpenCLLibrary.clCreateContext (native method)
[2] com.nativelibs4java.opencl.CLPlatform.createContext (CLPlatform.java:408)
[3] com.nativelibs4java.opencl.JavaCL.createBestContext (JavaCL.java:335)
[4] com.nativelibs4java.opencl.JavaCL.createBestContext (JavaCL.java:326)I will also try to call "createContext(Map<CLPlatform.ContextProperties,Object> contextProperties, CLDevice... devices)" so that I can specify the device for which I want to create the context.
Cheers,
JanFrom @karolovbrat on October 10, 2012 9:44
Creating the context for the specific device through:
CLDevice device = JavaCL.getBestDevice();
context = JavaCL.createContext(null, device);did not help either.
From @karolovbrat on October 5, 2012 10:22
Hi Olivier,
when I try to run my JavaCL application it hangs in JavaCL.createBestContext().
Used HW and SW is
CentOS linux
GTX 680 (Kepler architecture) with Cuda Toolkit 4.2
When I try to run it under same settings on GTX 480 (Fermi architecture) it runs just fine.
Thank you very much for investigating the matter.
Regards,
Jan
Copied from original issue: nativelibs4java/nativelibs4java#343