HPCE / hpce-2014-cw4

3 stars 5 forks source link

'Exception : clGetPlatformIDs' on DoC machines #12

Closed threewholefish closed 9 years ago

threewholefish commented 9 years ago

This is the error I get when I try to run test_opencl and v3 of step_world. Both compile fine, and the same code works on the AWS image.

threewholefish commented 9 years ago

A quick Google suggests many problems with many fixes, all of them needing sudo access...

m8pple commented 9 years ago

I tried logging into one of the rays, and got the results below. What machine are you using?

[dt10@ee-benjamin ~]$ ssh ray04.doc.ic.ac.uk
=======================================================
Please see http://www.doc.ic.ac.uk/csg/ for news on any
known problems before mailing help@doc for assistance.
=======================================================

Linux ray04.doc.ic.ac.uk 3.13.0-45-generic #74-Ubuntu SMP Tue Jan 13 19:36:28 UTC 2015 x86_64
ray04:~$ git clone https://github.com/HPCE/hpce-2014-cw4.git
Cloning into 'hpce-2014-cw4'...
remote: Counting objects: 94, done.
remote: Compressing objects: 100% (44/44), done.
remote: Total 94 (delta 21), reused 0 (delta 0)
Unpacking objects: 100% (94/94), done.
Checking connectivity... done.

ray04:~$ cd hpce-2014-cw4/

ray04:~/hpce-2014-cw4$ g++ src/test_opencl.cpp
/usr/lib/gcc/x86_64-linux-gnu/4.8/cc1plus: error while loading shared libraries: libgmp.so.3: cannot open shared object file: No such file or directory

ray04:~/hpce-2014-cw4$ echo $LD_LIBRARY_PATH
/vol/cc/dt10/local64/lib:/homes/dt10/local64/lib:/usr/local/cuda/lib

ray04:~/hpce-2014-cw4$ export LD_LIBRARY_PATH=

ray04:~/hpce-2014-cw4$ g++ src/test_opencl.cpp
In file included from /usr/include/c++/4.8/cstdint:35:0,
                 from src/test_opencl.cpp:3:
/usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support for the \
  ^
src/test_opencl.cpp:21:21: fatal error: CL/cl.hpp: No such file or directory
 #include "CL/cl.hpp"
                     ^
compilation terminated.

ray04:~/hpce-2014-cw4$ g++ -std=c++11 src/test_opencl.cpp -I include/ -I opencl_sdk/include/ -lOpenCL

ray04:~/hpce-2014-cw4$ ./a.out
Found 1 platforms
  Platform 0 : NVIDIA Corporation
Choosing platform 0
Found 1 devices
  Device 0 : GeForce GT 630
Choosing device 0
Success, program executed kernel successfully.

ray04:~/hpce-2014-cw4$
threewholefish commented 9 years ago

ray06, here's my output:

erh111@ray06:$ g++ -std=c++11 src/test_opencl.cpp -I include/ -I opencl_sdk/include/ -lOpenCL

erh111@ray06:$ ./a.out Exception : clGetPlatformIDs

I'd compiled it with opencl_sdk/lib/cygwin/x86_64/libOpenCL.a before, but exactly the same thing happens.

I read a thing about needing to be in the video group: http://stackoverflow.com/a/10667411 . Maybe you have some permissions like this that we don't?

On 16 February 2015 at 19:35, m8pple notifications@github.com wrote:

I tried logging into one of the rays, and got the results below. What machine are you using? [dt10@ee-benjamin ~]$ ssh ray04.doc.ic.ac.uk

Please see http://www.doc.ic.ac.uk/csg/ for news on any known problems before mailing help@doc for assistance.

Linux ray04.doc.ic.ac.uk 3.13.0-45-generic #74-Ubuntu SMP Tue Jan 13 19:36:28 UTC 2015 x86_64 ray04:~$ git clone https://github.com/HPCE/hpce-2014-cw4.git Cloning into 'hpce-2014-cw4'... remote: Counting objects: 94, done. remote: Compressing objects: 100% (44/44), done. remote: Total 94 (delta 21), reused 0 (delta 0) Unpacking objects: 100% (94/94), done. Checking connectivity... done.

ray04:~$ cd hpce-2014-cw4/

ray04:~/hpce-2014-cw4$ g++ src/test_opencl.cpp /usr/lib/gcc/x86_64-linux-gnu/4.8/cc1plus: error while loading shared libraries: libgmp.so.3: cannot open shared object file: No such file or directory

ray04:~/hpce-2014-cw4$ echo $LD_LIBRARY_PATH /vol/cc/dt10/local64/lib:/homes/dt10/local64/lib:/usr/local/cuda/lib

ray04:~/hpce-2014-cw4$ export LD_LIBRARY_PATH=

ray04:~/hpce-2014-cw4$ g++ src/test_opencl.cpp In file included from /usr/include/c++/4.8/cstdint:35:0, from src/test_opencl.cpp:3: /usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

error This file requires compiler and library support for the \

^ src/test_opencl.cpp:21:21: fatal error: CL/cl.hpp: No such file or directory

include "CL/cl.hpp"

^ compilation terminated.

ray04:~/hpce-2014-cw4$ g++ -std=c++11 src/test_opencl.cpp -I include/ -I opencl_sdk/include/ -lOpenCL

ray04:~/hpce-2014-cw4$ ./a.out Found 1 platforms Platform 0 : NVIDIA Corporation Choosing platform 0 Found 1 devices Device 0 : GeForce GT 630 Choosing device 0 Success, program executed kernel successfully. ray04:~/hpce-2014-cw4$

— Reply to this email directly or view it on GitHub https://github.com/HPCE/hpce-2014-cw4/issues/12#issuecomment-74561144.

m8pple commented 9 years ago

I'm not aware of any special permissions I have. I'm in the doc-staff group, but I wasn't aware that would affect anything.

It's possible I've set something up in my profile to allow it to find the... wait.

ray04:~/hpce-2014-cw4$ ssh ray06

=======================================================
Please see http://www.doc.ic.ac.uk/csg/ for news on any
known problems before mailing help@doc for assistance.
=======================================================

Linux ray06.doc.ic.ac.uk 3.13.0-45-generic #74-Ubuntu SMP Tue Jan 13 19:36:28 UTC 2015 x86_64
ray06:~$ cd hpce-2014-cw4/
ray06:~/hpce-2014-cw4$ ./a.out
Exception : clGetPlatformIDs

It might be the machine that is broken. It worked for me on ray05 as well.

threewholefish commented 9 years ago

...damn. Should have checked that. Works fine now, thanks!