You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JavaCL.createBestContext() hangs on GTX680 (Kepler architecture) #343
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?
"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)
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)
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?
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.
Activity
ochafik commentedon Oct 7, 2012
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
karolovbrat commentedon Oct 8, 2012
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,
Jan
karolovbrat commentedon Oct 8, 2012
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,
Jan
ochafik commentedon Oct 8, 2012
Hi @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
karolovbrat commentedon Oct 9, 2012
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,
Jan
JavaCL: explicitly pass CL_CONTEXT_PLATFORM when calling clCreateCont…
ochafik commentedon Oct 9, 2012
Hi 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?
https://oss.sonatype.org/content/repositories/snapshots/com/nativelibs4java/javacl-shaded/1.0-SNAPSHOT/javacl-shaded-1.0-20121009.225048-39.jar
Cheers
karolovbrat commentedon Oct 10, 2012
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,
Jan
karolovbrat commentedon Oct 10, 2012
Creating the context for the specific device through:
CLDevice device = JavaCL.getBestDevice();
context = JavaCL.createContext(null, device);
did not help either.
ochafik commentedon Mar 18, 2015
This issue was moved to nativelibs4java/JavaCL#15