nvcc can't be found error

0

im trying to setup a tool that requires nvcc but im unable to to do. This is what i got so far:

  • Installed the CUDA toolkit
  • Verified it by using nvcc -V

output:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2013 NVIDIA Corporation
Build on Fri_Mar_14_19:30:01_PDT_2014
Cuda Compilation tools, release 6.0, V6.0.1
  • CUDA's toolkit is installed under /usr/local/cuda-7.0
  • linked to /usr/local/cuda (the tool looks into this directory)

when i run the setup.py i got some error messenges, the most important error messenges are:

/bin/sh: /usr/local/cuda/bin/nvcc: cannot execture binary file: Exec format error
none
failed to execute command '/usr/local/cuda/bin/nvcc -V'

~skipping many lines

SystemError: Nvida's CUDA-compiler 'nvcc' can't be found.

While...

user@workgroup:~$ cd /usr/local/cuda
user@workgroup:~/usr/local/cuda$ ls
bin2c
computeprof
crt
cudafe
cudafe++
cuda-gdb
cuda-gdbserver
cuda-install-samples-7.0.sh
cuda-memcheck
cuobjdump
fatbinary
filehash
nsight
nvcc << yes its there! 
nvcc.profile
nvdisasm
nvlink
nvprof
nvprune
nvvp
ptxas
test
uninstall_cuda_7.0.pl

So whats wrong here? its obviously installed and im (almost) sure that the directory location is correct :\

PS: i have tried adding the $PATH into the .bashrc file but no sucess:

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

Any reply will be appreciated Thanks already!

PPS: im using cygwin...

edit output of type (#1):

user@workgroup~/usr/local/cuda/bin
type nvcc
nvcc is hashed (/cygdrive/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v6.0/bin/nvcc)

output of type (#2 - (few minutes later) i have no idea what i did):

user@workgroup~/usr/local/cuda/bin
type nvcc
nvcc is /usr/local/cuda/bin/nvcc (same to cuda-7.0 directory, but the start of the output is a bit different(nvcc is hashed))

The main error that causing the problem is now that nvcc cant be executed, what might cause this?

bash: /usr/local/cuda/bin/nvcc: cannot execture binary file: Exec format error

Vanya Varvi

Posted 2015-06-20T16:15:47.043

Reputation: 36

The error doesn't say nvcc can't be found, it says it cannot be executed because it has an invalid or unknown executable file format. You state that you are able to execute it using nvcc -V but you haven't showed us proof that you are able to execute the specific version in that directory. What is the output of type nvcc? If it points to anywhere but /usr/local/cuda/bin/nvcc or possibly /usr/local/cuda-7.0/bin/nvcc, there's your problem right there. – a CVn – 2015-06-20T16:35:31.733

@MichaelKjörling i will add the output of type within a minute in my first post, edited. oh and thanks now i see where the problem is comming from. but how im suppose to changethe location? i will check the installer of cuda atm... (6:42PM) – Vanya Varvi – 2015-06-20T16:38:11.327

Great. Well, there's your problem; your shell is finding the bare name nvcc somewhere completely different, which is the cause for the discrepancy. – a CVn – 2015-06-20T16:41:43.043

im very confused, right now the output of type nvcc is /usr/local/cuda/bin/nvcc – Vanya Varvi – 2015-06-20T16:51:28.760

Answers

0

This would appear to have been caused by attempting to use a Linux CUDA toolkit under CYGWIN. The only configuration which will work on a Windows platform is to use the Windows toolkit with a supported version of Visual Studio.

talonmies

Posted 2015-06-20T16:15:47.043

Reputation: 136