.> Is it possible to run a CUDA program through command line without using Makefile ?
If yes , How to run CUDA Program on linux using command line , I do not want to use the makefile , so please any one can help me that run a CUDA program on RHEL 4.3 .
And also tell me about the switch using in command line .
So tell me full step ,how to run CUDA program.
You’re probably asking about compiling, not running, program. Here is an example, for CUDA installed in /opt/cuda, and source file named foo.cu:
you may wish to first compile to object code, through:
/opt/cuda/bin/nvcc -c -I/opt/cuda/include foo.cu
then you’d link to an executable, through:
gcc -L/opt/cuda/lib foo.o -lcudart -o foo
Of course, you could do it in single step, in which case you call nvcc, and it’ll take care of calling gcc itself. When running the executable “foo”, don’t forget to include CUDA library directory (/opt/cuda/lib) in that case, in the LD_LIBRARY_PATH.
Yes, I have compiled using Makefile also , but It’s giving error . I am using Tesla C870 on RHEL 4 update3 .
=> I have installed Tesla driver (NVIDIA-linux) .
=> I have installed NVIDIA_CUDA_Toolkit .
=> I have installed NVIDIA_CUDA_SDK .
and also set LIB path .
But I am getting error .
Is it sufficient way to compile and run the CUDA Program ,Please suggest me…
I update my Operating system from RHEL 4 update 3 to RHEL-5 after that ,I successfully compiled the CUDA code and got the desired output.
But now I am facing two problems =>
1.> First time when I installed OS on my system before installing Tesla Driver , the NIC card ( ethernet ) detects . But after installing driver of tesla c870 the NIC card(ethernet) is not detecting . why it is happening like that please help me out ?.
2.> when I compile and run CUDA program first time it works fine ,but when I again run the CUDA program It hangs the whole system .
Hangs the system after running above command 2nd time .
The above command first time works fine ,next time “make” works,but the above command with whatever the CUDA program ,it hangs the whole system .