I am trying to run CUDA toolkit on MAC, but when I am compiling CUDA sample programs I get this error:
unable to open output file 'vectorAdd.o': 'Error opening output file 'vectorAdd.o': Permission denied'
I checked the environmental variables and the driver installation and everything seems OK.
Do you have some clue what could be the problem?
Thanks!
Momir
If you copy the whole samples folder and its contents to your home directory, you should be able to compile the samples there without sudo
.
The problem is that the directories which contain the sample files are owned by root and not writable by admin users, so the compiler cannot create the new output files and folders it needs if you are running as an admin user.
If you want to compile the samples in situ (as the installation guide seems to suggest), you can compile them using sudo
. Alternatively you can change the ownership of the samples directory and its subdirectories recursively:
sudo chown -R your-user-name /Developer/NVIDIA/CUDA-7.0/samples
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With