Compilling JCudaVectorAdd.cu: No such file or directory

Hi,
I’m trying to compile JCudaVectorAdd.cu how shows tutorial, but I get an error:

gcc-4.6: error: /home/variable/CUDA/JCudaVectorAdd.cu: No such file or directory

there is my command to compile:

variable@variable:~/CUDA$ nvcc -v --ptx /home/variable/CUDA/JCudaVectorAdd.cu -o /home/variable/CUDA/JCudaVectorAdd.ptx
#$ SPACE=
#$ CUDART=cudart
#$ HERE=/usr/lib/nvidia-cuda-toolkit/bin
#$ THERE=/usr/lib/nvidia-cuda-toolkit/bin
#$ TARGET_SIZE=64
#$ PATH=/usr/lib/nvidia-cuda-toolkit/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/variable/Aplications/apache-maven-2.2.1/bin
#$ INCLUDES=-I/usr/lib/nvidia-cuda-toolkit/include
#$ gcc -E -x c++ -D__CUDACC__ -I/usr/lib/nvidia-cuda-toolkit/include -include “cuda_runtime.h” -m64 -o “/tmp/tmpxft_0000185e_00000000-4_JCudaVectorAdd.cpp4.ii” “/home/variable/CUDA/JCudaVectorAdd.cu”
gcc-4.6: error: /home/variable/CUDA/JCudaVectorAdd.cu: No such file or directory
gcc-4.6: warning: ‘-x c++’ after last input file has no effect
gcc-4.6: fatal error: no input files
compilation terminated.

–error 0x4 –

can any body help my with this problem?

From the first glance… it should be
-ptx
and not
–ptx

EDIT: But not sure if this is the problem here. I’m not so much a Linux expert, and not sure whether the path specification is correct (a ~ missing somewhere?) You may try changing into the directory with the CU file and then call
/path/to/nvcc -v -ptx JCudaVectorAdd.cu -o JCudaVectorAdd.ptx