Quantcast

Cannot build jocl-demos from Eclipse

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Cannot build jocl-demos from Eclipse

Arnold
I am new to JOCL and openCL in general. I downloaded the latest stable build and got the HelloWorld from Michael Bien running. Next I cloned the jocl-demos, changed the build path to the jogamp library jars and ran into a problem when trying to build it in Eclips:
    Errors occurred during the build.
    Errors running builder 'Integrated External Tool Builder' on project 'jocl-demos-master'.
    The file does not exist for the external tool named jocl-demos builder.
   
I disabled the external builder and enabled the Java builder and then I got:
JOGL> Hello JOAL
Exception in thread "main" java.lang.NoClassDefFoundError: com/jogamp/openal/JoalVersion
        at jogamp.opengl.openal.av.ALDummyUsage.main(ALDummyUsage.java:14)
Caused by: java.lang.ClassNotFoundException: com.jogamp.openal.JoalVersion
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 1 more

Could anybody help me setting up the demos?

Thanks very much for your time.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot build jocl-demos from Eclipse

gouessej
Administrator
Hi

Where did you get jocl-demos? Have you strictly followed the instructions mentioned in our wiki?
http://jogamp.org/jocl/doc/HowToBuild.html
http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE#Eclipse_IDE_project

Maybe you'll need to build JOAL too.

If you just want to build jocl-demos, put jogamp-fat.jar or put the JARs of JOAL, JOGL, JOCL and GlueGen into the build path.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot build jocl-demos from Eclipse

Arnold
Thanks for pointing me to the Wiki. As a result of that I created a new Eclipse project, added gluegen, jogl and jocl as external jars and next added the files of a specific demo project. That worked. I tried fractal and julia3d and got them both up and running. I presume this will work for the rest as well. Thank you!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot build jocl-demos from Eclipse

Wade Walker
Administrator
Let me know if you find any errors or omissions in the wiki docs, and I'll make sure they're fixed.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot build jocl-demos from Eclipse

Arnold
Hi Wadewalker,

Thanks for the offer. I bought the openCL Parallel programming Cookbook from Raymond Tay and I am trying to rebuild his examples in jogamp. That takes some time and understanding but it works. One of the reasons is that the JOCL Javadocs are really quite helpful. I finally got some running programs together by borrowing heavily from the HelloWorld program. And there I need some help.

The book and other examples are quite obscure when exactly a program is starting to run. As I have it figured out now it happens when some CLCommandQueue.put<something> is being called. The only explanation I get in the docs is "calls .". The HelloWorld example adds: " // asynchronous write of data to GPU device, followed by blocking read to get the computed results back." and showing sum put<somethings> chained together. I presume that true means blocking? And what is blocking :-)? I would really appreciate some short explanation here.

CLContext.createProgram (String src)
"Creates a program from the given sources, the returned program is not build yet." How can I specify multiple sources? The equivalent in openCL allows to do so and the explanation suggests this is possible too.

Thanks for all your help in advance.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot build jocl-demos from Eclipse

Wade Walker
Administrator
A "blocking" call is one that doesn't return until the work is done. A non-blocking call returns immediately, then you have to check later to see if the work is done (or call some other blocking function to wait for it). So when exactly the work starts depends on how you've called into OpenCL. A blocking call to clEnqueueNDRangeKernel() or similar should start work immediately.

The OpenCL execution model is pretty complex, don't worry if you don't understand it right away :) It may take some study to master. The best thing is to do what you're doing already, just work through examples and figure them out.
Loading...