Login  Register

Problems with HelloJOCL in ubuntu 11.10

Posted by jj93 on Jan 11, 2012; 7:35pm
URL: https://forum.jogamp.org/Problems-with-HelloJOCL-in-ubuntu-11-10-tp3651598.html

I could get this and other variations working on an Intel i7/ NVIDIA  Win machine but when I try it on a AMD/NVIDIA Ubuntu machine running 11.10 I cant get it to work. I am using netbeans and an openCL pack plugin same as in my windows machine.

but I get an error in
 [CODE]
         InputStream vec = HelloJOCL.class.getResourceAsStream("VectorAdd.cl");
           
            CLProgram program;
            // load sources, create and build program
            program = context.createProgram(vec);
[/CODE]

or alternatively

 [CODE]
                        // load sources, create and build program
            CLProgram program
                    = context
                    .createProgram(HelloJOCL.class.getResourceAsStream("VectorAdd.cl")).build();

[/CODE]

and I get the following error

Exception in thread "main" java.lang.NullPointerException at java.io.Reader.<init>(Reader.java:78) at java.io.InputStreamReader.<init>(InputStreamReader.java:72) at com.jogamp.opencl.CLContext.createProgram(CLContext.java:286) at HelloJOCL.main(HelloJOCL.java:72)

but when I run openCL properties I get both of my platforms and
if I list all the devices it runs fine.