Re: question from a lazy person : *** CUDA_ROOT not set, and nvcc not in path. Giving up.
Hi Michael,
The problem is that sudo doesn't preserve environment variables. The
easiest way to get around this is to pass -E to sudo:
ihaque <at> obsidian:~
$ export CUDA_ROOT=/usr/local/cuda
ihaque <at> obsidian:~
$ echo $CUDA_ROOT
/usr/local/cuda
ihaque <at> obsidian:~
$ sudo sh -c 'echo $CUDA_ROOT'
ihaque <at> obsidian:~
$ sudo -E sh -c 'echo $CUDA_ROOT'
/usr/local/cuda
Cheers,
Imran
On 6/4/2010 7:24 AM, Michael Rule wrote:
> Thanks, nvcc is actually on the path, which is why I found the message
> confusing. I can type nvcc in bash and it runs and everything. I also
> did "CUDA_ROOT='/usr/local/cuda'" in bash such that "echo $CUDA_ROOT"
> prints "/usr/local/cuda". Also, usr/local/cuda definitely exists. So, it
> would seem that I have taken care of both error conditions, and yet the
> message persists.
>
> --mrule
>
> On Thu, Jun 3, 2010 at 10:53 PM, Bogdan Opanchuk <mantihor@...
> <mailto:mantihor@...>> wrote:
>
> Hi Michael,
>
> The error message is sort of self-explanatory. You need to make 'nvcc'
> (cuda compiler) available to installer. There are two ways to do it:
> either add path to it (usually /usr/local/cuda/bin) to your $PATH
> variable (by modifying bash profile, for example), or pass the path to
> CUDA (usually /usr/local/cuda) as --cuda-path to configure.py of
> PyCuda.
>
> Best regards,
> Bogdan
>
> On Fri, Jun 4, 2010 at 8:42 AM, Michael Rule <mrule7404@...
> <mailto:mrule7404@...>> wrote:
> > hello,
> > I recently upgraded CUDA on an Ubuntu machine, and, well,
> everything broke.
> > I thought I had it working, but now scripts that I remember being
> fine are
> > crashing ( actually, most scripts are crashing with 'launch
> failure'). Its
> > likely my own **** fault, but I went ahead and tried to upgrade
> PyCUDA to
> > see if that would fix anything. Well, I went back and tried the
> usual steps
> > and got
> > *** CUDA_ROOT not set, and nvcc not in path. Giving up.
> > when I tryed to do "sudo make install".
> > So, I apologize for the spam but at the moment I'm just too tired
> to be able
> > to figure out what to do myself. Anyone have any links or solved this
> > problem before ?
> > --mrule.
> > _______________________________________________
> > PyCUDA mailing list
> > PyCUDA@... <mailto:PyCUDA@...>
> > http://lists.tiker.net/listinfo/pycuda
> >
> >
>
>
>
>
> _______________________________________________
> PyCUDA mailing list
> PyCUDA@...
> http://lists.tiker.net/listinfo/pycuda