ASL icon indicating copy to clipboard operation
ASL copied to clipboard

std::logic_error when running examples

Open JamesWrigley opened this issue 9 years ago • 10 comments

Hi there, I'm getting the following error whenever I try to run an example:

$ locomotive ./asl-locomotive terminate called after throwing an instance of 'std::logic_error' what(): ASL ERROR: acl::Platform::getDevices() (-1). [1] 2565 abort (core dumped) ./asl-locomotive

Any ideas why this is happening? I'm using the proprietary NVIDIA drivers (with bumblebee) on Fedora 24. Both the version from the repos and my own build have the same problem.

Thanks, James

JamesWrigley avatar Aug 18 '16 19:08 JamesWrigley

Hi @JamesWrigley ,

according to the 'cl.h' - OpenCL header file, the error that corresponds to '-1' is defined as follows:

'#define CL_DEVICE_NOT_FOUND -1'

It looks like ASL is not able to find a device that supports OpenCL. The driver might be the issue here. Try to check whether your device supports OpenCL with other tools, like 'clinfo' or try any other OpenCL application to see whether it will run fine.

Regards.

AvtechScientific avatar Aug 18 '16 20:08 AvtechScientific

It does seem that I have OpenCL support. This is the ouput of primusrun clinfo: http://www.pasteall.org/75281/bash But primusrun ./asl-locomotive fails with the same error.

Is there a way to disable OpenCL?

JamesWrigley avatar Aug 19 '16 04:08 JamesWrigley

The error occurs on this line:

https://github.com/AvtechScientific/ASL/blob/master/src/acl/aclHardware.cxx#L69

Interestingly that it passes this line (collecting information about available platforms) without errors:

https://github.com/AvtechScientific/ASL/blob/master/src/acl/aclHardware.cxx#L60

So try to run real computations using other OpenCL-based tools.

Is there a way to disable OpenCL?

E.g. - deinstall/damage the driver.

AvtechScientific avatar Aug 19 '16 07:08 AvtechScientific

OpenCL seems to work fine with Darktable at least.

E.g. - deinstall/damage the driver.

Hmm, I see.

JamesWrigley avatar Aug 19 '16 11:08 JamesWrigley

Strange...

Does 'asl-hardware' produce any output?

AvtechScientific avatar Aug 19 '16 12:08 AvtechScientific

PS: are you sure that Darktable uses OpenCL in your case and not some fallback API?

AvtechScientific avatar Aug 19 '16 13:08 AvtechScientific

./asl-hardware produces the same error message. I'm pretty sure Darktable is using OpenCL, when I'm using it heavily the GPU temperature goes up, and nvidia-smi reports Darktable as one of the processes using the GPU (the other being Xorg).

JamesWrigley avatar Aug 21 '16 03:08 JamesWrigley

Does Darktable has a Cuda backend?

AvtechScientific avatar Aug 21 '16 06:08 AvtechScientific

Nope, not that I know of. No matter though, it's probably some bumblebee/nvidia weirdness. I might give it another go on Windows 10.

JamesWrigley avatar Aug 22 '16 09:08 JamesWrigley

Ok, let us know about your progress...

AvtechScientific avatar Aug 22 '16 10:08 AvtechScientific