Logical error while running example cylinder.py

83 views
Skip to first unread message

Arthur Campos

unread,
Oct 14, 2016, 7:06:36 PM10/14/16
to sailfish-cfd
Hello,

I have just cloned sailfish to my computer and while I was running a example the following error occured

[arthur@arthevil examples]$ python cylinder.py 
[  3063  INFO Master/arthevil] Machine master starting with PID 1700 at 2016-10-14 21:12:49 UTC
[  3063  INFO Master/arthevil] Simulation started with: cylinder.py
[  3182  INFO Master/arthevil] Sailfish version: f111f6e4a0953357f0871374aa825bc2eaafc2a0
[  3182  INFO Master/arthevil] Handling subdomains: [0]
[  3183  INFO Master/arthevil] Subdomain -> GPU map: {0: 0}
[  3187  INFO Master/arthevil] Selected backend: opencl
Process Subdomain/0:
Traceback (most recent call last):
  File "/home/arthur/anaconda2/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/home/arthur/anaconda2/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/home/arthur/Projetos/sailfish/sailfish/master.py", line 49, in _start_subdomain_runner
    backend = backend_class(config, gpu_id)
  File "/home/arthur/Projetos/sailfish/sailfish/backend_opencl.py", line 52, in __init__
    platform = cl.get_platforms()[platform_num]
LogicError: clGetPlatformIDs failed: platform not found khr

any thoughts on how I can solve this?!

Thanks,

Arthur.

bdrc

unread,
Oct 17, 2016, 2:07:28 AM10/17/16
to sailfish-cfd

My guess is that you have not fully installed OpenCL or you do not have one that works with the GPU. You should be able to run the PyOpenCL examples or clinfo if that is installed to verify your setup.

Here was one guide that I found helpful.

https://wiki.tiker.net/OpenCLHowTo


I don't see what your setup is, but I will say what I have been trying for AMD GPUs

What I have been using is Debian Jessie with the following and it sort of just works. The caveat is that Gnome will not work. Apparently there are ways around this, but I just use a different desktop with the Debian packages.

https://wiki.debian.org/ATIProprietary
https://wiki.debian.org/ATIStream

This would not work on GPUs but it would work on CPUs. Since the backend defaults to the GPU, you could use --opencl-interactive-select and then choose the CPU. You might also choose to hardcode the line in backend_opencl.py

 from

     devices = platform.get_devices(device_type=cl.device_type.GPU)

to
     devices = platform.get_devices(device_type=cl.device_type.CPU)

In order to use the GPU with OpenCL with AMD, the packaged driver does not get loaded. It uses Gallium and Mesa by default. I had to use

sudo /usr/lib/fglrx/switchlibGL amd

Then the results of fglrxinfo show that I have GPUs and so does clinfo. I have been able to run some examples on the CPU, but the GPU option always hangs after a few operations. That is something that I have not resolved. I have seen similar problems on this list, but I have yet to see a resolution to that problem. I assume it might not happen with all setups.






Reply all
Reply to author
Forward
0 new messages