wanderine / BROCCOLI

BROCCOLI: Software for Fast fMRI Analysis on Many-Core CPUs and GPUs
GNU General Public License v3.0
113 stars 38 forks source link

How to install clBLAS from the ppa #19

Closed ImmanuelSamuel closed 8 years ago

ImmanuelSamuel commented 8 years ago

I tried to run GetOpenCLInfo but it is not able to find the clblas library. I installed AMD APP SDK 3.0, Boost, ACML

I want to know how to install from this ppa https://launchpad.net/ubuntu/+source/clblas

I tried the .deb file but it said dependency not satisfied in synaptics package manager. I am not very familiar with ubuntu so I would rather not go through the cmake route. Something like apt-get would be great for me. Thank you

wanderine commented 8 years ago

You don't need to install clBLAS, you just need to set the environment variable LD_LIBRARY_PATH

e.g.

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/andek/BROCCOLI/code/BROCCOLI_LIB/clBLASLinux

2015-08-15 3:14 GMT+02:00 ImmanuelSamuel notifications@github.com:

https://launchpad.net/ubuntu/+source/clblas

I tried the .deb file but it said dependency not satisfied in synaptics package manager. I am not very familiar with ubuntu so I would rather no go through the cmake route. Just seems too much. Something like apt-get would be great for me. Thank you

— Reply to this email directly or view it on GitHub https://github.com/wanderine/BROCCOLI/issues/19.

Anders Eklund, PhD

ImmanuelSamuel commented 8 years ago

Thanks that worked. But the GetOpenCLInfo still doesnt recognize my NVIDIA card. I did install libcuda1-355, nvidia-355, nvidia-opencl-icd-355 but still its not showing up.

wanderine commented 8 years ago

Try

Sudo nvidia-xconfig

And then reboot Den 15 aug 2015 20:12 skrev "ImmanuelSamuel" notifications@github.com:

Thanks that worked. But the GetOpenCLInfo still doesnt recognize my NVIDIA card. I did install libcuda1-355, nvidia-355, nvidia-opencl-icd-355 but still its not showing up.

— Reply to this email directly or view it on GitHub https://github.com/wanderine/BROCCOLI/issues/19#issuecomment-131415211.

ImmanuelSamuel commented 8 years ago

Did that it said writing to new conf file in X11 folder or something but still it doesn't show up

wanderine commented 8 years ago

Try

sudo apt-get purge nvidia*

sudo apt-get install nvidia-current Den 15 aug 2015 20:33 skrev "ImmanuelSamuel" notifications@github.com:

Did that it said writing to new conf file in X11 folder or something but still it doesn't show up

— Reply to this email directly or view it on GitHub https://github.com/wanderine/BROCCOLI/issues/19#issuecomment-131422242.

ImmanuelSamuel commented 8 years ago

Did that and ran getopenclinfo nothing. Ran sudo nvidia-xconfig restarted now I am in a login loop

wanderine commented 8 years ago

Yeah I had that too

open a terminal using ctrl-alt-f1

rm .Xauthority

sudo shutdown -r now

2015-08-15 20:44 GMT+02:00 ImmanuelSamuel notifications@github.com:

Did that and ran getopenclinfo nothing. Ran sudo nvidia-xconfig restarted now I am in a login loop

— Reply to this email directly or view it on GitHub https://github.com/wanderine/BROCCOLI/issues/19#issuecomment-131423219.

Anders Eklund, PhD

ImmanuelSamuel commented 8 years ago

Still same problem. I must say that I had installed linux-generic before I got you reply. I was reading some forums

wanderine commented 8 years ago

OK this is my last tip

sudo rm .xsession-errors*

Otherwise

sudo apt-get purge nvidia*

sudo apt-get update

sudo apt-get dist-upgrade

sudo apt-get install nvidia-current

2015-08-15 20:59 GMT+02:00 ImmanuelSamuel notifications@github.com:

Still same problem. I must say that I had installed linux-generic before I got you reply. I was reading some forums

— Reply to this email directly or view it on GitHub https://github.com/wanderine/BROCCOLI/issues/19#issuecomment-131425267.

Anders Eklund, PhD

ImmanuelSamuel commented 8 years ago

Thanks for the help. Reinstalling nvidia-346 got my desktop back again ... nvidia-current installs 304 version hence the problem. Running GetOpenCLInfo still doesn't recognize my card which is a gtx 980 ti. I guess I will try googling it. Thanks again.

wanderine commented 8 years ago

Tomorrow I will try to fix the CPU problem(s), so you can use that at least.

2015-08-15 21:41 GMT+02:00 ImmanuelSamuel notifications@github.com:

Thanks for the help. Reinstalling nvidia-346 got my desktop back again ... nvidia-current installs 304 version hence the problem. Running GetOpenCLInfo still doesn't recognize my card which is a gtx 980 ti. I guess I will try googling it. Thanks again.

— Reply to this email directly or view it on GitHub https://github.com/wanderine/BROCCOLI/issues/19#issuecomment-131436163.

Anders Eklund, PhD

ImmanuelSamuel commented 8 years ago

The CPU is running fine for me ... or atleast I think. I tried first level analysis it ran for some time before I quit seeing it was not using my GPU.

wanderine commented 8 years ago

Confused you with another user, sorry.

Can you check if this file exists?

/etc/OpenCL/vendors/nvidia.icd

2015-08-15 21:47 GMT+02:00 ImmanuelSamuel notifications@github.com:

The CPU is running fine for me.

— Reply to this email directly or view it on GitHub https://github.com/wanderine/BROCCOLI/issues/19#issuecomment-131438029.

Anders Eklund, PhD

ImmanuelSamuel commented 8 years ago

Yes it does along with amdocl32.ocd and amdocl64.icd

wanderine commented 8 years ago

Found this

Here is a list of all of the packages you will need to get OpenCL working on Ubuntu 14.10 with NVIDIA drivers:

sudo apt-get install nvidia-331 nvidia-331-uvm nvidia-opencl-dev nvidia-modprobe

EDIT: In case anyone encounters a similar problem on Ubuntu 15.04 and the NVIDIA 346.59 drivers, the command to fix the issue is nearly identical:

sudo apt-get install nvidia-346 nvidia-346-uvm nvidia-opencl-dev nvidia-modprobe

http://askubuntu.com/questions/541114/how-to-make-opencl-work-on-14-10-nvidia-331-89-drivers

2015-08-15 21:51 GMT+02:00 Anders Eklund andek034@gmail.com:

Confused you with another user, sorry.

Can you check if this file exists?

/etc/OpenCL/vendors/nvidia.icd

2015-08-15 21:47 GMT+02:00 ImmanuelSamuel notifications@github.com:

The CPU is running fine for me.

— Reply to this email directly or view it on GitHub https://github.com/wanderine/BROCCOLI/issues/19#issuecomment-131438029.

Anders Eklund, PhD

Anders Eklund, PhD

ImmanuelSamuel commented 8 years ago

Both didnt work for me. sudo clinfo didnt show the nvidia card.

The following will work if you use gtx 980 ti sudo apt-get install nvidia-352 nvidia-352-uvm nvidia-opencl-dev nvidia-modprobe

Now clInfo recognised my nvidia card but GetOpenCLInfo didnt yet work.

wanderine commented 8 years ago

OK can you just make a reboot to make sure everything is loaded from start.

2015-08-15 22:05 GMT+02:00 ImmanuelSamuel notifications@github.com:

Both didnt work for me. sudo clinfo didnt show the nvidia card.

The following will work if you use gtx 980 ti sudo apt-get install nvidia-352 nvidia-352-uvm nvidia-opencl-dev nvidia-modprobe

Now clInfo recognised my nvidia card but GetOpenCLInfo didnt yet work.

— Reply to this email directly or view it on GitHub https://github.com/wanderine/BROCCOLI/issues/19#issuecomment-131439079.

Anders Eklund, PhD

ImmanuelSamuel commented 8 years ago

Lol now after restart even clInfo doesn't recognize the video card.

wanderine commented 8 years ago

Hmm, can you do

sudo clinfo

and then

clinfo

and

sudo GetOpenCLInfo

and then

GetOpenCLInfo

2015-08-15 22:12 GMT+02:00 ImmanuelSamuel notifications@github.com:

Lol now after restart even clInfo doesn't recognize the video card.

— Reply to this email directly or view it on GitHub https://github.com/wanderine/BROCCOLI/issues/19#issuecomment-131441712.

Anders Eklund, PhD

ImmanuelSamuel commented 8 years ago

sudo doesnt recognize the LD_LIBRARY_PATH

wanderine commented 8 years ago

Try

sudo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/andek/BROCCOLI/ code/BROCCOLI_LIB/clBLASLinux

Also see end of this page, suppose you need to change 331 to 352

I finally added the next lines in my /etc/rc.local file:

begin opencl config

modprobe nvidia-331-uvm mknod -m 666 /dev/nvidia-uvm c 249 0 clinfo

end opencl config

http://askubuntu.com/questions/576338/why-opencl-is-not-default-14-04-nvidia-331

2015-08-15 22:16 GMT+02:00 ImmanuelSamuel notifications@github.com:

sudo doesnt recognize the LD_LIBRARY_PATH

— Reply to this email directly or view it on GitHub https://github.com/wanderine/BROCCOLI/issues/19#issuecomment-131442346.

Anders Eklund, PhD

ImmanuelSamuel commented 8 years ago

says sudo export command not found

ImmanuelSamuel commented 8 years ago

$ modprobe nvidia-352-uvm modprobe: ERROR: could not insert 'nvidia_352_uvm': Operation not permitted

wanderine commented 8 years ago

try with sudo

$ sudo modprobe nvidia-352-uvm $ sudo mknod -m 666 /dev/nvidia-uvm c 249 0

sudo clinfo

Then try clinfo and GetOpenCLInfo without sudo

2015-08-15 22:36 GMT+02:00 ImmanuelSamuel notifications@github.com:

$ modprobe nvidia-352-uvm modprobe: ERROR: could not insert 'nvidia_352_uvm': Operation not permitted

— Reply to this email directly or view it on GitHub https://github.com/wanderine/BROCCOLI/issues/19#issuecomment-131445388.

Anders Eklund, PhD

ImmanuelSamuel commented 8 years ago

$ sudo modprobe nvidia-352-uvm $ sudo mknod -m 666 /dev/nvidia-uvm c 249 0 $ sudo clinfo

The above worked but without sudo nope

wanderine commented 8 years ago

Can you now see the device in GetOpenCLInfo?

If you want to make the change permanent, open /etc/rc.local with a text editor,

e.g.

gedit /etc/rc.local

or

sudo gedit /etc/rc.local

add

begin opencl config

modprobe nvidia-331-uvm mknod -m 666 /dev/nvidia-uvm c 249 0 clinfo

end OpenCL config

then save the file

2015-08-15 22:44 GMT+02:00 ImmanuelSamuel notifications@github.com:

$ sudo modprobe nvidia-352-uvm $ sudo mknod -m 666 /dev/nvidia-uvm c 249 0 $ sudo clinfo

The above worked but without sudo nope

— Reply to this email directly or view it on GitHub https://github.com/wanderine/BROCCOLI/issues/19#issuecomment-131446811.

Anders Eklund, PhD

ImmanuelSamuel commented 8 years ago

Ok so both clinfo and GetOpenCLInfo works (without sudo) if I put it in the .bashrc in my home directory i.e. recognises the video card. But it doesnt work in a terminal. I added your previous message in /etc/rc.local but that also didnt do anything (yes I changed the version 331 to 352). Going to do a reset and see if anything changed.

ImmanuelSamuel commented 8 years ago

Nothing changed.

wanderine commented 8 years ago

Hmm, but GetOpenCLInfo now prints the 980 card? Can you try to for example run RegisterTwoVolumes?

You need sudo if you write the commands in a terminal, but not if you put them in a text file.

2015-08-15 23:02 GMT+02:00 ImmanuelSamuel notifications@github.com:

Nothing changed.

— Reply to this email directly or view it on GitHub https://github.com/wanderine/BROCCOLI/issues/19#issuecomment-131447539.

Anders Eklund, PhD

ImmanuelSamuel commented 8 years ago

If I enter the following in a terminal

GetOpenCLInfo or sudo GetOpenCLInfo

It doesnt recognize the card.

But if I put GetOpenCLInfo in the .bashrc file in my home directory then it shows the nvidia card when it runs as soon as I open a terminal.

wanderine commented 8 years ago

First run this in a terminal

$ sudo modprobe nvidia-352-uvm $ sudo mknod -m 666 /dev/nvidia-uvm c 249 0 $ sudo clinfo

then run GetOpenCLInfo in a terminal (without sudo)

2015-08-15 23:08 GMT+02:00 ImmanuelSamuel notifications@github.com:

If I do

GetOpenCLInfo or sudo GetOpenCLInfo

It doesnt recognize the card.

But if I put GetOpenCLInfo in the .bashrc file in my home directory then it shows the nvidia card.

— Reply to this email directly or view it on GitHub https://github.com/wanderine/BROCCOLI/issues/19#issuecomment-131447980.

Anders Eklund, PhD

ImmanuelSamuel commented 8 years ago

Yes I entered that still it doesn't recognize it.

wanderine commented 8 years ago

OK can you also do

sudo apt-get install nvidia-opencl-icd-352

2015-08-15 23:14 GMT+02:00 ImmanuelSamuel notifications@github.com:

Yes I entered that still it doesn't recognize it.

— Reply to this email directly or view it on GitHub https://github.com/wanderine/BROCCOLI/issues/19#issuecomment-131448641.

Anders Eklund, PhD

ImmanuelSamuel commented 8 years ago

It was already installed

wanderine commented 8 years ago

OK do

sudo ldconfig

2015-08-15 23:16 GMT+02:00 ImmanuelSamuel notifications@github.com:

It was already installed

— Reply to this email directly or view it on GitHub https://github.com/wanderine/BROCCOLI/issues/19#issuecomment-131448734.

Anders Eklund, PhD

ImmanuelSamuel commented 8 years ago

did that and then ran clinfo - didnt recognize it

ImmanuelSamuel commented 8 years ago

Found this just now

http://stackoverflow.com/questions/10730044/install-openclamd-sdk-kit-on-linux-without-root-privilege/20962333#20962333

Will update after I try it

ImmanuelSamuel commented 8 years ago

Finally GetOpenCLInfo is working with that

ImmanuelSamuel commented 8 years ago

Thanks wanderine!!!!!

wanderine commented 8 years ago

Nice, I will try to add this to the documentation.

2015-08-15 23:32 GMT+02:00 ImmanuelSamuel notifications@github.com:

Thanks wanderine!!!!!

— Reply to this email directly or view it on GitHub https://github.com/wanderine/BROCCOLI/issues/19#issuecomment-131449781.

Anders Eklund, PhD

ImmanuelSamuel commented 8 years ago

Please do! It worked! So happy lol

ImmanuelSamuel commented 8 years ago

First level analysis is also working

ImmanuelSamuel commented 8 years ago

Well sort of

Performing registration between fMRI and T1 Segmentation fault (core dumped)

but that is for another day and another issue