Cuda on Slackware and Konsole problem
Hi guys, i recently installed the cuda sw on Slackware 13.37 using the ubuntu 10.04 toolkit like it's written on an old topic of this forum. Everything works well but if I use nvcc or other cuda tools or I try to run a cuda program, if i'm trying on Konsole in bash mode it tells me that he can't find nvcc nor cuda libraries... everything work well only if i run program and tools on the same Konsole where i installed sdk and toolkit. with Terminal, instead, everything works well even if i'm in bash mode... Someone try cuda on Slackware and have similar problem?? Of course now i work only with Terminal, but i'm curious to know how and why this happen...
Hi guys, i recently installed the cuda sw on Slackware 13.37 using the ubuntu 10.04 toolkit like it's written on an old topic of this forum. Everything works well but if I use nvcc or other cuda tools or I try to run a cuda program, if i'm trying on Konsole in bash mode it tells me that he can't find nvcc nor cuda libraries... everything work well only if i run program and tools on the same Konsole where i installed sdk and toolkit. with Terminal, instead, everything works well even if i'm in bash mode... Someone try cuda on Slackware and have similar problem?? Of course now i work only with Terminal, but i'm curious to know how and why this happen...

#1
Posted 05/09/2012 07:06 AM   
Are all the path variables properly defined? Open Konsole and try with echo PATH
Are all the path variables properly defined? Open Konsole and try with echo PATH

#2
Posted 05/09/2012 02:49 PM   
I'm using CUDA under Slackware for years, without any issues; at the moment, I'm installing from Redhat 6.0 package. As mentioned above, you need to add CUDA toolkit bin and lib/lib64 directory to your PATH and LD_LIBRARY_PATH environment variables manually. Also beware that -current recently upgraded to GCC 4.7, and this one is not supported by CUDA; so if you upgrade, you'll need to install GCC 4.6 alongside in order to be able to use CUDA.
I'm using CUDA under Slackware for years, without any issues; at the moment, I'm installing from Redhat 6.0 package. As mentioned above, you need to add CUDA toolkit bin and lib/lib64 directory to your PATH and LD_LIBRARY_PATH environment variables manually. Also beware that -current recently upgraded to GCC 4.7, and this one is not supported by CUDA; so if you upgrade, you'll need to install GCC 4.6 alongside in order to be able to use CUDA.

#3
Posted 05/09/2012 02:58 PM   
if i export manually PATH and LD_LIBRARY_PATH, as it is written on the manual, it works again, but why only in bash i must re export PATH and LD_LIBRARY_PATH every times i open a new Konsole, and if i use Terminal this not necessary? in my main folder i have created a .bashrc file where i export PATH and LD_LIBRARY_PATH as i found written on post to make work cuda on slckware... so, how i can export PATH and LD_LIBRARY_PATH in Konsole automatically?
thanks for answers
if i export manually PATH and LD_LIBRARY_PATH, as it is written on the manual, it works again, but why only in bash i must re export PATH and LD_LIBRARY_PATH every times i open a new Konsole, and if i use Terminal this not necessary? in my main folder i have created a .bashrc file where i export PATH and LD_LIBRARY_PATH as i found written on post to make work cuda on slckware... so, how i can export PATH and LD_LIBRARY_PATH in Konsole automatically?

thanks for answers

#4
Posted 05/10/2012 07:01 AM   
Hi,
this is because your shell inside Konsole is not a login shell, thus your aliases and extra environment variables are not sourced at starting. You can find [url="http://docs.kde.org/development/en/kde-baseapps/konsole/commonissues.html"]here[/url] an explanation of this and a possible workaround (with "bash -l" as login shell rather than "bash").
But this has nothing (at all) to do with cuda.
Hi,

this is because your shell inside Konsole is not a login shell, thus your aliases and extra environment variables are not sourced at starting. You can find here an explanation of this and a possible workaround (with "bash -l" as login shell rather than "bash").

But this has nothing (at all) to do with cuda.

#5
Posted 05/10/2012 07:23 AM   
It depends on you computer configuration and which shell are you using. Bash has a file call .bashrc (this gets executed every time you start bash). There are as well some other files which define profiles. Here is mine on ubuntu. I also use Konsole.

PATH=/usr/local/cuda/bin:$PATH
LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

export CUDA_BIN="/usr/local/cuda/bin"
export PATH=$PATH:$CUDA_BIN
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64

export PATH=/usr/local/cuda/bin:$PATH
export LPATH=/usr/lib/nvidia-current:$LPATH
export LIBRARY_PATH=/usr/lib/nvidia-current:$LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/lib/nvidia-current:/usr/local/cuda/lib64:/usr/local/cuda/lib:$LD_LIBRARY_PATH


I used this through 2 laptops and 3 new ubuntu different releases installation
It depends on you computer configuration and which shell are you using. Bash has a file call .bashrc (this gets executed every time you start bash). There are as well some other files which define profiles. Here is mine on ubuntu. I also use Konsole.



PATH=/usr/local/cuda/bin:$PATH

LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH



export CUDA_BIN="/usr/local/cuda/bin"

export PATH=$PATH:$CUDA_BIN

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64



export PATH=/usr/local/cuda/bin:$PATH

export LPATH=/usr/lib/nvidia-current:$LPATH

export LIBRARY_PATH=/usr/lib/nvidia-current:$LIBRARY_PATH

export LD_LIBRARY_PATH=/usr/lib/nvidia-current:/usr/local/cuda/lib64:/usr/local/cuda/lib:$LD_LIBRARY_PATH





I used this through 2 laptops and 3 new ubuntu different releases installation

#6
Posted 05/10/2012 07:39 AM   
[quote name='pasoleatis' date='10 May 2012 - 09:39 AM' timestamp='1336635573' post='1406383']
It depends on you computer configuration and which shell are you using. Bash has a file call .bashrc (this gets executed every time you start bash). There are as well some other files which define profiles. Here is mine on ubuntu. I also use Konsole.

PATH=/usr/local/cuda/bin:$PATH
LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

export CUDA_BIN="/usr/local/cuda/bin"
export PATH=$PATH:$CUDA_BIN
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64

export PATH=/usr/local/cuda/bin:$PATH
export LPATH=/usr/lib/nvidia-current:$LPATH
export LIBRARY_PATH=/usr/lib/nvidia-current:$LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/lib/nvidia-current:/usr/local/cuda/lib64:/usr/local/cuda/lib:$LD_LIBRARY_PATH


I used this through 2 laptops and 3 new ubuntu different releases installation
[/quote]
well, i have the same .bashrc file, but i think is like Gilles says... this i a "problem" due to the shell inside Konsole is not a login shell, so it does not load any .bashrc file...
[quote name='pasoleatis' date='10 May 2012 - 09:39 AM' timestamp='1336635573' post='1406383']

It depends on you computer configuration and which shell are you using. Bash has a file call .bashrc (this gets executed every time you start bash). There are as well some other files which define profiles. Here is mine on ubuntu. I also use Konsole.



PATH=/usr/local/cuda/bin:$PATH

LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH



export CUDA_BIN="/usr/local/cuda/bin"

export PATH=$PATH:$CUDA_BIN

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64



export PATH=/usr/local/cuda/bin:$PATH

export LPATH=/usr/lib/nvidia-current:$LPATH

export LIBRARY_PATH=/usr/lib/nvidia-current:$LIBRARY_PATH

export LD_LIBRARY_PATH=/usr/lib/nvidia-current:/usr/local/cuda/lib64:/usr/local/cuda/lib:$LD_LIBRARY_PATH





I used this through 2 laptops and 3 new ubuntu different releases installation



well, i have the same .bashrc file, but i think is like Gilles says... this i a "problem" due to the shell inside Konsole is not a login shell, so it does not load any .bashrc file...

#7
Posted 05/10/2012 08:24 AM   
[quote name='Stray89' date='10 May 2012 - 09:24 AM' timestamp='1336638288' post='1406394']
well, i have the same .bashrc file, but i think is like Gilles says... this i a "problem" due to the shell inside Konsole is not a login shell, so it does not load any .bashrc file...
[/quote]
It is strange. I use Konsole with the .bashrc file I posted and it works. I guess I am missing something.
[quote name='Stray89' date='10 May 2012 - 09:24 AM' timestamp='1336638288' post='1406394']

well, i have the same .bashrc file, but i think is like Gilles says... this i a "problem" due to the shell inside Konsole is not a login shell, so it does not load any .bashrc file...



It is strange. I use Konsole with the .bashrc file I posted and it works. I guess I am missing something.

#8
Posted 05/10/2012 12:43 PM   
[quote name='pasoleatis' date='10 May 2012 - 02:43 PM' timestamp='1336653811' post='1406451']
It is strange. I use Konsole with the .bashrc file I posted and it works. I guess I am missing something.
[/quote]
i have added a .profile file where i only set the command "bash -I", like it was said in the link Gilles post, and now it works... maybe ubuntu load the .bashrc file when you start Konsole and slackware no... i don'y really know... but, as a matter of fact, now konsole work fine, and i can still read its aphorism XD
[quote name='pasoleatis' date='10 May 2012 - 02:43 PM' timestamp='1336653811' post='1406451']

It is strange. I use Konsole with the .bashrc file I posted and it works. I guess I am missing something.



i have added a .profile file where i only set the command "bash -I", like it was said in the link Gilles post, and now it works... maybe ubuntu load the .bashrc file when you start Konsole and slackware no... i don'y really know... but, as a matter of fact, now konsole work fine, and i can still read its aphorism XD

#9
Posted 05/11/2012 07:10 AM   
Scroll To Top