Recent

Author Topic: Free Pascal, OpenCL and NVIDIA WORKS!  (Read 1294 times)

schuler

  • Jr. Member
  • **
  • Posts: 95
Free Pascal, OpenCL and NVIDIA WORKS!
« on: July 23, 2018, 07:48:29 am »
Hi,
I'm able to compile and run OpenCL + NVIDIA + Ubuntu 18.04 under Lazarus.

This is what I did:
apt-get install nvidia-384 nvidia-opencl-icd-384 clinfo

After installing, reboot your machine.

I tried first to download drivers from nvidia website but my VM crashed hard when installing these drivers and I had to trash the VM. Therefore, I think that it's easier to just install plain ubuntu packages above.

Then, I did a hack:
cd /usr/lib/x86_64-linux-gnu
ln -s libOpenCL.so.1.0.0 libOpenCL.so

Question: is there a better alternative than the hack (ln -s) above?

Laksen

  • Hero Member
  • *****
  • Posts: 608
    • J-Software
Re: Free Pascal, OpenCL and NVIDIA WORKS!
« Reply #1 on: July 23, 2018, 12:24:07 pm »
I'm not certain but usually you would need to install a loader component like it sounds like the "ocl-icd-opencl-dev" package is. That will at least create an entry with that name, that I guess will load the appropriate libOpenCL.so*** file

schuler

  • Jr. Member
  • **
  • Posts: 95
Re: Free Pascal, OpenCL and NVIDIA WORKS!
« Reply #2 on: March 18, 2019, 09:29:37 am »
@Laksen
Just tested installing "sudo apt-get install ocl-icd-opencl-dev" and it works without having to do the hack "ln -s libOpenCL.so.1.0.0 libOpenCL.so". Tested on Ubuntu 18.04 with NVIDIA GT 730.

Thank you!