AvtechScientific / ASL

Advanced Simulation Library - hardware accelerated multiphysics simulation platform.
http://asl.org.il
GNU Affero General Public License v3.0
223 stars 55 forks source link

std::logic_error when running examples #23

Open JamesWrigley opened 8 years ago

JamesWrigley commented 8 years ago

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

AvtechScientific commented 8 years ago

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.

JamesWrigley commented 8 years ago

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?

AvtechScientific commented 8 years ago

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.

JamesWrigley commented 8 years ago

OpenCL seems to work fine with Darktable at least.

E.g. - deinstall/damage the driver.

Hmm, I see.

AvtechScientific commented 8 years ago

Strange...

Does 'asl-hardware' produce any output?

AvtechScientific commented 8 years ago

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

JamesWrigley commented 8 years ago

./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).

AvtechScientific commented 8 years ago

Does Darktable has a Cuda backend?

JamesWrigley commented 8 years ago

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.

AvtechScientific commented 8 years ago

Ok, let us know about your progress...