rzel / aparapi

Automatically exported from code.google.com/p/aparapi
Other
0 stars 0 forks source link

Problem when running with NVIDIA GPUs #147

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Run Aparapi program on Windows 7 64bit
2. Set device to GPU.

What is the expected output? What do you see instead?
I expected the program to run correctly, but instead I got the following errors:
Jun 17, 2014 4:02:16 PM com.amd.aparapi.ClassModel$AttributePool <init>
WARNING: Found unexpected Attribute (name = org.netbeans.SourceLevelAnnotations)
Jun 17, 2014 4:02:16 PM com.amd.aparapi.ClassModel$AttributePool <init>
WARNING: Found unexpected Attribute (name = org.netbeans.SourceLevelAnnotations)
Jun 17, 2014 4:02:16 PM com.amd.aparapi.ClassModel$AttributePool <init>
WARNING: Found unexpected Attribute (name = org.netbeans.SourceLevelAnnotations)
Jun 17, 2014 4:02:17 PM com.amd.aparapi.ClassModel$AttributePool <init>
WARNING: Found unexpected Attribute (name = org.netbeans.SourceLevelAnnotations)
Jun 17, 2014 4:02:17 PM com.amd.aparapi.ClassModel$AttributePool <init>
WARNING: Found unexpected Attribute (name = org.netbeans.SourceLevelAnnotations)
Jun 17, 2014 4:02:17 PM com.amd.aparapi.ClassModel$AttributePool <init>
WARNING: Found unexpected Attribute (name = org.netbeans.SourceLevelAnnotations)
Jun 17, 2014 4:02:17 PM com.amd.aparapi.ClassModel$AttributePool <init>
WARNING: Found unexpected Attribute (name = org.netbeans.SourceLevelAnnotations)
Jun 17, 2014 4:02:17 PM com.amd.aparapi.ClassModel$AttributePool <init>
WARNING: Found unexpected Attribute (name = org.netbeans.SourceLevelAnnotations)
Jun 17, 2014 4:02:17 PM com.amd.aparapi.ClassModel$AttributePool <init>
WARNING: Found unexpected Attribute (name = org.netbeans.SourceLevelAnnotations)
Jun 17, 2014 4:02:17 PM com.amd.aparapi.ClassModel$AttributePool <init>
WARNING: Found unexpected Attribute (name = org.netbeans.SourceLevelAnnotations)
Jun 17, 2014 4:02:17 PM com.amd.aparapi.ClassModel$AttributePool <init>
WARNING: Found unexpected Attribute (name = org.netbeans.SourceLevelAnnotations)
Jun 17, 2014 4:02:17 PM com.amd.aparapi.ClassModel$AttributePool <init>
WARNING: Found unexpected Attribute (name = org.netbeans.SourceLevelAnnotations)
Jun 17, 2014 4:02:18 PM com.amd.aparapi.KernelRunner warnFallBackAndExecute
WARNING: Reverting to Java Thread Pool (JTP) for class 
com.github.neuralnetworks.training.rbm.CDWeightUpdatesKernel: initJNI failed to 
return a valid handle
Jun 17, 2014 4:02:18 PM com.amd.aparapi.ClassModel$AttributePool <init>
WARNING: Found unexpected Attribute (name = org.netbeans.SourceLevelAnnotations)
Jun 17, 2014 4:02:18 PM com.amd.aparapi.KernelRunner warnFallBackAndExecute
WARNING: Reverting to Java Thread Pool (JTP) for class 
com.github.neuralnetworks.training.rbm.CDBiasUpdatesKernel: initJNI failed to 
return a valid handle
Jun 17, 2014 4:02:18 PM com.amd.aparapi.ClassModel$AttributePool <init>
WARNING: Found unexpected Attribute (name = org.netbeans.SourceLevelAnnotations)
Jun 17, 2014 4:02:18 PM com.amd.aparapi.KernelRunner warnFallBackAndExecute
WARNING: Reverting to Java Thread Pool (JTP) for class 
com.github.neuralnetworks.training.rbm.CDBiasUpdatesKernel: initJNI failed to 
return a valid handle
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fee9782cd2, pid=6804, 
tid=4868
#
# JRE version: Java(TM) SE Runtime Environment (8.0_05-b13) (build 1.8.0_05-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.5-b02 mixed mode windows-amd64 
compressed oops)
# Problematic frame:
# C  [aparapi_x86_64.dll+0x2cd2]
#
# Failed to write core dump. Minidumps are not enabled by default on client 
versions of Windows
#
# An error report file with more information is saved as:
# C:\All\Project\neuralnetworks-master_4_source\nn-samples\hs_err_pid6804.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
!!!!!!! clCreateContextFromType() failed: device not available
!!!!!!! clCreateContextFromType() failed: device not available
!!!!!!! clCreateContextFromType() failed: device not available
------------------------------------------------------------------------
BUILD FAILURE

What version of the product are you using? On what operating system?

Aparapi latest version
Windows 7 64bit
NVIDA Quadro FX 1800M 

Original issue reported on code.google.com by james.st...@gmail.com on 17 Jun 2014 at 8:04

GoogleCodeExporter commented 8 years ago
I have a similar issue on my notebook with a Geforce GT 520MX

- Run Aparapi program on Windows 7 64bit
Aparapi-version: Aparapi_2014_04_29_Win64.zip r1675
from https://code.google.com/p/aparapi/source/browse/#svn%2Ftrunk%2FDownloads
Java Version: 1.8.0_25-b18

I get the following:

!!!!!!! clCreateContextFromType() failed device not available
Okt 27, 2014 9:30:53 PM com.amd.aparapi.internal.kernel.KernelRunner warnFallBac
kAndExecute
WARNUNG: Reverting to Java Thread Pool (JTP) for class instaero.Instaero$1: init
JNI failed to return a valid handle

Original comment by rennne...@gmail.com on 28 Oct 2014 at 5:30

GoogleCodeExporter commented 8 years ago
Do you get the same error with this build?

https://github.com/aparapi/aparapi/releases

We're migrating to Github, but this website has not yet been updated...

Original comment by ryan.lam...@gmail.com on 29 Oct 2014 at 1:07

GoogleCodeExporter commented 8 years ago
Yes, the issue is still there. With the Aparapi-1.0.0 from github

Original comment by rennne...@gmail.com on 31 Oct 2014 at 8:43

GoogleCodeExporter commented 8 years ago
Can you run the cltest test app which is in com.amd.aparapi.jni ?

You can build it with something like 

$ cd com.amd.aparapi.jni
$  ant cltest

It is a poor mans' 'clinfo' but should tell us what your GPU device is reported 
as.  We are looking at the device type (GPU/CPU) and the OpenCL version (OpenCL 
1.1, 1.2 or 2.0)

Also look at the code around #440 here 
https://code.google.com/p/aparapi/source/browse/trunk/com.amd.aparapi.jni/src/cp
p/invoke/OpenCLJNI.cpp

This is where Aparapi is trying to detect compatible OpenCL platforms. 

This is assuming of course that your code is correctly dynamically linking 
against the OpenCL.so via the ICD.

Original comment by frost.g...@gmail.com on 31 Oct 2014 at 9:22

GoogleCodeExporter commented 8 years ago
I tryed that and had to change 
 <condition property="optional.amd64.subdir" value="" else="amd64\">
to
 <condition property="optional.amd64.subdir" value="" else="x86_amd64\">

The "amd64" directory does not exist on my computer .. 
I use: Visual Studio Express 2013
and tryed the 2.9 and 2.9.1 version of the AMD-SDK

but that does not seem to work because i got:

BUILD FAILED
C:\Aparapi\aparapi-master\com.amd.aparapi.jni\build.xml:583: exec returned: -107
3741515

from ant

but for: info the oclDeviceQuery.exe prints:

OpenCL SW Info:

 CL_PLATFORM_NAME:      NVIDIA CUDA
 CL_PLATFORM_VERSION:   OpenCL 1.1 CUDA 6.5.21
 OpenCL SDK Revision:   7027912

Original comment by rennne...@gmail.com on 3 Nov 2014 at 9:34

GoogleCodeExporter commented 8 years ago
Ah,  so that is the problem.  

Aparapi is expecting the string to contain just "OpenCL 1.1" or "OpenCL 1.2"  
it does not expect to find the 'Cuda....' stuff.  It should be a simple change 
to the code to change the strcmp to strncmp to test this.  

Sadly I cannot make this change. 

Gary

Original comment by gfr...@google.com on 3 Nov 2014 at 9:55

GoogleCodeExporter commented 8 years ago
If you are referring to the code around #440 here 
https://code.google.com/p/aparapi/source/browse/trunk/com.amd.aparapi.jni/src/cp
p/invoke/OpenCLJNI.cpp

There is already strncmp in use.

Original comment by rennne...@gmail.com on 4 Nov 2014 at 6:50

GoogleCodeExporter commented 8 years ago
I have got the same error when running the code from Markus Sprunck found here 
https://github.com/MarkusSprunck/aparapi-gpu-band-matrix-solver.

The error message below :
mars 22, 2015 12:31:50 PM 
com.amd.aparapi.internal.model.ClassModel$AttributePool <init>
AVERTISSEMENT: Found unexpected Attribute (name = 
org.netbeans.SourceLevelAnnotations)

I am using Window 8.1, with Nvidia GeForce 820M.
My laptop is the Asus TP300LD-DW039H

Original comment by romain.h...@gmail.com on 22 Mar 2015 at 11:38