unbornchikken / NOOOCL

Node.js Object Oriented OpenCL Bindings
MIT License
81 stars 9 forks source link

OpenCL Error Code: -1001 Type: UNKNOWN #11

Closed vird closed 9 years ago

vird commented 9 years ago

I think that's some issue on my side, but may be someone had similar one.

lspci | grep -i VGA

00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Kaveri [Radeon R7 Graphics]

node -v

v4.1.1

uname -a

Linux calculate 4.1.10-calculate #1 SMP PREEMPT Tue Oct 6 09:22:40 UTC 2015 x86_64 AMD A10-7850K Radeon R7, 12 Compute Cores 4C+8G AuthenticAMD GNU/Linux

cat ./node_modules/nooocl/package.json | grep ver

  "version": "0.11.0",

node ./vecAcc.js

fs.js:549
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open 'libOpenCL.so'
    at Error (native)
    at Object.fs.openSync (fs.js:549:18)
    at fs.readFileSync (fs.js:397:15)
    at new DynamicLibrary (/opt/ext/node_modules/nooocl/node_modules/ffi/lib/dynamic_library.js:67:21)
    at new Library (/opt/ext/node_modules/nooocl/node_modules/ffi/lib/library.js:45:12)
    at new CL11 (/opt/ext/node_modules/nooocl/lib/cl11.js:15:20)
    at new CLHost (/opt/ext/node_modules/nooocl/lib/clHost.js:52:19)
    at Function.CLHost.createV11 (/opt/ext/node_modules/nooocl/lib/clHost.js:93:12)
    at Object.<anonymous> (/opt/ext/vecAcc.js:18:19)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:475:10)
    at startup (node.js:117:18)
    at node.js:951:3

Ok. Let's fix it find / | grep libOpen

/var/calculate/tmp/portage/x11-drivers/ati-drivers-15.9/work/arch/x86/usr/lib/libOpenCL.so.1
/var/calculate/tmp/portage/x11-drivers/ati-drivers-15.9/work/arch/x86_64/usr/lib64/libOpenCL.so.1

ln -s /var/calculate/tmp/portage/x11-drivers/ati-drivers-15.9/work/arch/x86_64/usr/lib64/libOpenCL.so.1 /usr/lib64/libOpenCL.so

node ./vecAcc.js

/opt/ext/node_modules/nooocl/lib/cl11.js:712
            throw new CLError(err);
            ^
CLError: OpenCL Error Code: -1001 Type: UNKNOWN
    at CL11.checkError (/opt/ext/node_modules/nooocl/lib/cl11.js:712:19)
    at CLHost.Object.defineProperties._nPlatformsCount.get (/opt/ext/node_modules/nooocl/lib/clHost.js:77:21)
    at CLHost.getPlatforms (/opt/ext/node_modules/nooocl/lib/clHost.js:111:21)
    at Object.<anonymous> (/opt/ext/vecAcc.js:21:22)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:475:10)
    at startup (node.js:117:18)
    at node.js:951:3

WAT?

ocl-icd - same result

vird commented 9 years ago

Resolved, but that was not obvious.

  1. (I'm not sure that it's needed at all) Disable composite option at driver. (I disabled it when I installed calculate xfce desktop in GUI installer)
  2. dmesg shows that initialization is not ok (uvesafb: cannot reserve video memory at 0xc0000000) Solution: disable UEFI (my bios has only two options:UEFI and UEFI+legacy, so you need some explicit options when configuring kernel boot. I played some partitioning params at GUI, ex. EFI partition disabling). So you will have one less error in dmesg.
  3. Ensure that x11-drivers/ati-drivers installed. Don't try wget for fast loading .zip from amd site.