PiRSquared17 / aparapi

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

Aparapi won't use Open CL 1.2 on Mac OS X 10.8 #63

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Macbook Pro Mid 2009, 2,66 GHz Intel Core 2 Duo, 8 GB 1067 MHz DDR3, NVIDIA 
GeForce 9400M 256 MB, OS X 10.8 (12A269).
Running Samples from aparapi-2012-05-06. Trying e.g. Mandelbrot example. The 
following output is given:

platform name    0 Apple
platform version 0 OpenCL 1.2 (Jun 20 2012 14:18:19)
platform Apple version OpenCL 1.2 (Jun 20 2012 14:18:19) is neither OpenCL 1.1 
or OpenCL 1.0 skipping!
13.08.2012 15:51:42 com.amd.aparapi.KernelRunner warnFallBackAndExecute
WARNUNG: Reverting to Java Thread Pool (JTP) for class 
com.amd.aparapi.samples.mandel.Main$MandelKernel: initJNI failed to return a 
valid handle
Execution mode=JTP

I expected for OpenCL 1.2 to be supported by this version or am i 
misinterpreting the cause of falling back to JTP?

Original issue reported on code.google.com by markus.f...@gmail.com on 13 Aug 2012 at 1:58

GoogleCodeExporter commented 9 years ago
I think that code in the trunk will work. We do need to create a new binary 
distribution from trunk -maybe in the next few weeks if I can get some help 
from folks with Mac OS X platforms.

If you checkout from SVN from https://code.google.com/p/aparapi/source/checkout

I think that others have coded up the changes to the ant build files to make 
the MacOSX build fairly easy.   You should be able to cd to the root dir and 
use 'ant dist'

Gary
Gary

Original comment by frost.g...@gmail.com on 13 Aug 2012 at 3:10

GoogleCodeExporter commented 9 years ago
Used code from trunk, also built aparapi.jni from trunk, now i seem to have 
another problem: 

Exception in thread "main" java.lang.UnsatisfiedLinkError: 
com.amd.aparapi.OpenCLJNI.getPlatforms()Ljava/util/List;
    at com.amd.aparapi.OpenCLJNI.getPlatforms(Native Method)
    at com.amd.aparapi.OpenCLPlatform.getPlatforms(OpenCLPlatform.java:39)
    at com.amd.aparapi.OpenCLDevice.select(OpenCLDevice.java:401)
    at com.amd.aparapi.Device.best(Device.java:16)
    at com.amd.aparapi.KernelRunner.execute(KernelRunner.java:1379)
    at com.amd.aparapi.Kernel.execute(Kernel.java:1719)
    at com.amd.aparapi.Kernel.execute(Kernel.java:1650)
    at com.amd.aparapi.Kernel.execute(Kernel.java:1620)
    at com.amd.aparapi.samples.mandel.Main.main(Main.java:219)

The libaparapi_x86_64.dylib is loaded in OpenCLJNI, though (no exception there).

Original comment by markus.f...@gmail.com on 14 Aug 2012 at 7:59

GoogleCodeExporter commented 9 years ago
Markus, 

So this implies that the library successfully loaded does not have the 
appropriate native method.  My guess (and I am sorry I don't have a Mac OSX 
machine) is that the library being loaded is not the one that was compiled. 

So if you go to the trunk directory and use

ant dist

This should delegate down to com.amd.aparapi and com.amd.aparapi.jni and build 
all of the aparapi.jar and libaparapi_x86_64.dylib.  The dist target also 
should copy these files to a dist directory.  This dist directory should be the 
location you specify for your classpath (to aparapi.jar) and also in your in 
your -Djava.library.path runtime variable so that the dylib can be located. 

My guess is that either you are picking up the newly built aparapi.jar but 
loading an older libaparapi_x86_64.dylib or picking up an older aparapi.jar but 
loading a newer libaparapi_x86_64.dylib.  

Can you remove all copies of aparapi.jar and libaparapi_x86_64.dylib before 
building (with ant dist) and then retry....  just as a sanity check.

In the meantime I will reach out to Ryan/Witold (who have access to Mac OSX 
systems)and ask them if they would consider building from trunk to see if they 
can recreate this issue. 

I apologize for all of the extra work you are going through. Thanks for being 
patient .

Gary 

Original comment by frost.g...@gmail.com on 14 Aug 2012 at 3:25

GoogleCodeExporter commented 9 years ago
This may be an OS X 10.8 issue (OpenCL 1.2). I've been working with the latest 
Trunk code for a couple of weeks now without any issue on OS X 10.7 (OpenCL 
1.1).

I do not have a Mountain Lion machine to test the latest Trunk code against.

Original comment by ryan.lam...@gmail.com on 14 Aug 2012 at 5:45

GoogleCodeExporter commented 9 years ago
For now I can confirm that there is some problem with OS X 10.8 - Aparapi won't 
work. It is strictly OS 10.8 related - recent versions work well on 10.7.

Can't yet see the reason, but will work on that.

Original comment by Witold.B...@gmail.com on 14 Aug 2012 at 9:46

GoogleCodeExporter commented 9 years ago
Re Comment #3:

I did not have to be really patient, because this is some of the quickest 
support i have ever met. I am happy to report that after another clean start 
(deleting all old libraries from my eclipse projects and compiling everything 
anew, although separate) and only referencing the newly created jars (instead 
of the project) i was able to run most examples. Therefore, i am glad to say, 
that aparapi IS working on Mac OS X 10.8 with OpenCL 1.2.

Original comment by markus.f...@gmail.com on 15 Aug 2012 at 8:12

GoogleCodeExporter commented 9 years ago
Closing issue pending any further issues

Original comment by ryan.lam...@gmail.com on 8 Oct 2012 at 5:32