nvcc not in path

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

nvcc not in path

ggeo
Hello ,

I have done a format and passed Sabayon linux.
When i try to install pycuda  (su -c "make install") it shows me the errors:

ctags -R src || true
/usr/bin/python2.7 setup.py install
*** WARNING: nvcc not in path.
.............................
In file included from src/cpp/cuda.cpp:1:0:
src/cpp/cuda.hpp:12:18: fatal error: cuda.h:No such file or directory.

error: command 'x86_64-pc-linux-gnu-g++' failed with exit status 1
make: *** [install] Error 1


My .bashrc file has :

# Put your fun stuff here.
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib:$LD_LIBRARY_PATH
export PATH=~/bin:$PATH
export CUDA_ROOT=/usr/local/cuda/bin
 
I also added in /etc/ld.so.conf :

/usr/local/cuda/lib64
/usr/local/cuda/lib

The installation of cuda-toolkit4.2.9 was successful.The same with the sdk.

Can someone tell please what can i do now??

Thank you!

Reply | Threaded
Open this post in threaded view
|

Re: nvcc not in path

Andreas Kloeckner
ggeo <[hidden email]> writes:

> Hello ,
>
> I have done a format and passed Sabayon linux.
> When i try to install pycuda  (su -c "make install") it shows me the errors:
>
> ctags -R src || true
> /usr/bin/python2.7 setup.py install
> *** WARNING: nvcc not in path.
> .............................
> In file included from src/cpp/cuda.cpp:1:0:
> src/cpp/cuda.hpp:12:18: fatal error: cuda.h:No such file or directory.
>
> error: command 'x86_64-pc-linux-gnu-g++' failed with exit status 1
> make: *** [install] Error 1
>
>
> My .bashrc file has :
>
> # Put your fun stuff here.
> export PATH=/usr/local/cuda/bin:$PATH
> export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
> export LD_LIBRARY_PATH=/usr/local/cuda/lib:$LD_LIBRARY_PATH
> export PATH=~/bin:$PATH
> export CUDA_ROOT=/usr/local/cuda/bin
>  
> I also added in /etc/ld.so.conf :
>
> /usr/local/cuda/lib64
> /usr/local/cuda/lib
>
> The installation of cuda-toolkit4.2.9 was successful.The same with the sdk.
>
> Can someone tell please what can i do now??

What happens when you type 'nvcc' into a shell?

Andreas

_______________________________________________
PyCUDA mailing list
[hidden email]
http://lists.tiker.net/listinfo/pycuda
Reply | Threaded
Open this post in threaded view
|

Re: nvcc not in path

ggeo
Hello,

when i type nvcc  it gives me :

nvcc fatal   : No input files specified; use option --help for more information

but i can compile a  .cu file and works fine.

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: nvcc not in path

ggeo
Hello,

1) i did again the installation but still the same.

Now , when i do  "python configure.py --cuda-root=/usr/local/cuda/bin" it gives me "
WARNING: nvcc not in path."

If i do "echo $CUDA_ROOT" it gives me "/usr/local/cuda/bin" but if i do "echo $LD_LIBRARY" it doesn't give me any path.

Also ,with "echo $PATH" it gives "/sbin:/bin:/usr/sbin:/usr/bin" .
It should give "/usr/local/cuda/bin" also.


2) I i tried to edit setup.py and removed the lines :
    nvcc_path = search_on_path(["nvcc", "nvcc.exe"])
    if nvcc_path is None:
        print("*** WARNING: nvcc not in path.")
        cuda_root_default = None
     
    else:
         cuda_root_default = normpath(join(dirname(nvcc_path), ".."))

and just leaving the "cuda_root_default="/usr/local/cuda/bin".

Now , when i do su -c "make install" it gives me at the end :

In file included from src/cpp/cuda.cpp:1:0:
src/cpp/cuda.hpp:12:18: fatal error: cuda.h: No such file or directory
compilation terminated.
error: command 'x86_64-pc-linux-gnu-g++' failed with exit status 1



Any ideas?

Thank you.




Reply | Threaded
Open this post in threaded view
|

Re: nvcc not in path

Apostolis Glenis
When this happened to me I had to add nvcc in the PATH of the root user as well.
You should also add CUDA_ROOT to the PATH if you haven't done already.

Apostolis

2012/6/28 ggeo <[hidden email]>
Hello,

1) i did again the installation but still the same.

Now , when i do  "python configure.py --cuda-root=/usr/local/cuda/bin" it
gives me "
WARNING: nvcc not in path."

If i do "echo $CUDA_ROOT" it gives me "/usr/local/cuda/bin" but if i do
"echo $LD_LIBRARY" it doesn't give me any path.

Also ,with "echo $PATH" it gives "/sbin:/bin:/usr/sbin:/usr/bin" .
It should give "/usr/local/cuda/bin" also.


2) I i tried to edit setup.py and removed the lines :
    nvcc_path = search_on_path(["nvcc", "nvcc.exe"])
    if nvcc_path is None:
        print("*** WARNING: nvcc not in path.")
        cuda_root_default = None

    else:
         cuda_root_default = normpath(join(dirname(nvcc_path), ".."))

and just leaving the "cuda_root_default="/usr/local/cuda/bin".

Now , when i do su -c "make install" it gives me at the end :

In file included from src/cpp/cuda.cpp:1:0:
src/cpp/cuda.hpp:12:18: fatal error: cuda.h: No such file or directory
compilation terminated.
error: command 'x86_64-pc-linux-gnu-g++' failed with exit status 1



Any ideas?

Thank you.






--
View this message in context: http://pycuda.2962900.n2.nabble.com/nvcc-not-in-path-tp7574709p7574715.html
Sent from the PyCuda mailing list archive at Nabble.com.

_______________________________________________
PyCUDA mailing list
[hidden email]
http://lists.tiker.net/listinfo/pycuda


_______________________________________________
PyCUDA mailing list
[hidden email]
http://lists.tiker.net/listinfo/pycuda
Reply | Threaded
Open this post in threaded view
|

Re: nvcc not in path

ggeo
You mean the .bash_profile in the root/ path?

Because i tried to do (in root/.bash_profile):

# This file is sourced by bash for login shells.  The following line
# runs your .bashrc and is recommended by the bash info pages.
[[ -f ~/.bashrc ]] && . ~/.bashrc

PATH=$PATH:$HOME/bin
export PATH

but still the same.
Reply | Threaded
Open this post in threaded view
|

Re: nvcc not in path

Apostolis Glenis
This is my bashrc.
Copy only the relevant parts

# User specific aliases and functions

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
OTCL_LIB=/home/apostolis/ns2/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/apostolis/ns2/ns-allinone-2.34/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export CUDA_ROOT="/usr/local/cuda" 
export CUDA_SDK_ROOT="/cuda_sdk"
TCL_LIB=/home/apostolis/ns2/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
XGRAPH=/home/apostolis/ns2/ns-allinone-2.34/bin:/home/apostolis/ns2/ns-allinone-2.34/tcl8.4.18/unix:/your/path/ns-allinone-2.31/tk8.4.14/unix
NS=/home/apostolis/ns2/ns-allinone-2.34/ns-2.34
NAM=/home/apostolis/ns2/ns-allinone-2.34/nam-1.14/
PROFILER=/usr/local/cuda/computeprof/bin
export LD_LIBRARY_PATH="${CUDA_ROOT}/lib64:${CUDA_ROOT}/lib:/usr/lib64:/usr/lib:/cuda_sdk/C/lib:" 
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB:/opt/intel/composer_xe_2011_sp1.6.233/mkl/lib/intel64
export PATH=/cuda_sdk/C/common/inc:${CUDA_ROOT}/bin:${CUDA_SDK_ROOT}:${CUDA_SDK_ROOT}/shared:/home/apostolis/simplescalar/bin:/home/apostolis/simplescalar-arm/simplesim-arm:/home/apostolis/arm-cross/bin:/home/apostolis/d4-7:/opt/intel/bin:${PATH}
PATH=$PATH:$XGRAPH:$NS:$NAM:$PROFILER:/home/apostolis/intel/mkl/include/:
#export CILK_ROOT="/cilk"
#export LD_LIBRARY_PATH="/usr/lib64:${CILK_ROOT}/lib64"
#export PATH=${CILK_ROOT}/bin:${PATH}
export MKLROOT="/home/apostolis/intel/mkl"
export MKL_PATH="/home/apostolis/intel/mkl/lib/intel64"
export LD_LIBRARY_PATH=$MKL_PATH:$LD_LIBRARY_PATH
export IFACE_LIB=$MKL_PATH/libmkl_intel_ilp64.so
export CORE_LIB=$MKL_PATH/libmkl_core.so
#export MKL_LIBS=$IFACE_LIB $CORE_LIB
sh /home/apostolis/keyb_switch.sh

Could you please enter the following commands and tell me the output?

echo $PATH
sudo echo $PATH
sudo su and then echo $PATH

Note that you should export the PATH variable again as root.

Apostolis

2012/6/29 George <[hidden email]>
Στις 29/06/2012 04:59 μμ, ο/η Apostolis Glenis έγραψε:
> I mean that both when you are root and when you are a normal user you
> should see /usr/local/cuda/bin when you type
> echo $PATH
>
> to do that you should type into the terminal or add into bashrc
> something like:
> PATH=$PATH:CUDA_ROOT
> export PATH
>
> I hope this helps/
>

Could you please give me the contain of .bashrc?
Because i have all of these now:
> export PATH=/usr/local/cuda/bin:$PATH
> export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
> export LD_LIBRARY_PATH=/usr/local/cuda/lib:$LD_LIBRARY_PATH
> export PATH=~/bin:$PATH
> export CUDA_ROOT=/usr/local/cuda/bin
> PATH=$PATH:CUDA_ROOT
> export PATH

(It doesn't show the "echo $PATH" when i am root).

Thanks!



_______________________________________________
PyCUDA mailing list
[hidden email]
http://lists.tiker.net/listinfo/pycuda
Reply | Threaded
Open this post in threaded view
|

Re: nvcc not in path

ggeo
Hello , still the same!

echo $PATH and sudo echo $PATH gives -> /usr/local/cuda/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.2:/usr/games/bin:CUDA_ROOT:CUDA_ROOT


sudo su and then echo $PATH gives -> /sbin:/bin:/usr/sbin:/usr/bin
 
There is no CUDA_ROOT.

Thank you.

Reply | Threaded
Open this post in threaded view
|

Re: nvcc not in path

Apostolis Glenis

CUDA_root should be /usr/local/cuda/bin.
Maybe you are forgetting the &before it.
You should also try:
sudo su
PATH=$PATH:$CUDA_ROOT
export PATH

Apostolis
2012/6/30 ggeo <[hidden email]>
Hello , still the same!

echo $PATH and sudo echo $PATH gives ->
/usr/local/cuda/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.2:/usr/games/bin:CUDA_ROOT:CUDA_ROOT


sudo su and then echo $PATH gives -> /sbin:/bin:/usr/sbin:/usr/bin

There is no CUDA_ROOT.

Thank you.



--
View this message in context: http://pycuda.2962900.n2.nabble.com/nvcc-not-in-path-tp7574709p7574721.html
Sent from the PyCuda mailing list archive at Nabble.com.

_______________________________________________
PyCUDA mailing list
[hidden email]
http://lists.tiker.net/listinfo/pycuda


_______________________________________________
PyCUDA mailing list
[hidden email]
http://lists.tiker.net/listinfo/pycuda
Reply | Threaded
Open this post in threaded view
|

Re: nvcc not in path

ggeo
Unfortunately it still doesn't work!

sudo su and then echo $PATH  returns  only /sbin:/bin:/usr/sbin:/usr/bin

I can't undestand!
Reply | Threaded
Open this post in threaded view
|

Re: nvcc not in path

ggeo
This post was updated on .
Hello ,

the solution is to do

python configure.py --cuda-root=/opt/cuda  

and not python configure.py --cuda-root=/opt/cuda/bin

(i installed again in opt)