My PhD project supervisor has recommended that I use CUDA or OpenCL in my project. The programming code I can probably get my head around, but my problem is that I don’t understand how I’m supposed to compile anything.
I have CUDA and the nvcc compiler installed. I try compiling the sample code but nvcc tells me that cl.exe is missing:
“nvcc fatal : Cannot find compiler ‘cl.exe’ in PATH”
After a bit of internet searching, I discover that cl.exe is the C/C++ compiler that comes with Visual Studio, which I do not have and would rather not have to purchase. After more searching, I am also told that cl.exe is also included with the .NET framework. I installed the latest version of this and the microsoft SDK, but nvcc still gives me the same error message and searching for ‘cl.exe’ on my computer gives me nothing.
I looked into OpenCL only to discover that since I am on an NVIDIA machine, it seems to depend on CUDA, which seems to depend on C++, so I’m still stuck.
Can anybody please tell me how I can get cl.exe on my computer, or if and how it is possible to use the CUDA / OpenCL architecture without any dependency on C/C++? Or am I going to have to purchase Visual Studio?
My PhD project supervisor has recommended that I use CUDA or OpenCL in my project. The programming code I can probably get my head around, but my problem is that I don’t understand how I’m supposed to compile anything.
I have CUDA and the nvcc compiler installed. I try compiling the sample code but nvcc tells me that cl.exe is missing:
“nvcc fatal : Cannot find compiler ‘cl.exe’ in PATH”
After a bit of internet searching, I discover that cl.exe is the C/C++ compiler that comes with Visual Studio, which I do not have and would rather not have to purchase. After more searching, I am also told that cl.exe is also included with the .NET framework. I installed the latest version of this and the microsoft SDK, but nvcc still gives me the same error message and searching for ‘cl.exe’ on my computer gives me nothing.
I looked into OpenCL only to discover that since I am on an NVIDIA machine, it seems to depend on CUDA, which seems to depend on C++, so I’m still stuck.
Can anybody please tell me how I can get cl.exe on my computer, or if and how it is possible to use the CUDA / OpenCL architecture without any dependency on C/C++? Or am I going to have to purchase Visual Studio?
You absolutely need a C++ compiler. This is no different from programming without CUDA, which is just an extension and does not replace the compiler you write your main program in.
What is indeed limiting is that on each supported CUDA platform there is exactly one supported compiler. However, given the close interaction between the compiler and the CUDA extension it is understandable (and probably a very wise decision) that Nvidia does not waste resources on supporting multiple compilers.
If you cannot afford buying Visual Studio, you still have the option of installing Linux on you computer, which comes with all necessary tools included for free.
You absolutely need a C++ compiler. This is no different from programming without CUDA, which is just an extension and does not replace the compiler you write your main program in.
What is indeed limiting is that on each supported CUDA platform there is exactly one supported compiler. However, given the close interaction between the compiler and the CUDA extension it is understandable (and probably a very wise decision) that Nvidia does not waste resources on supporting multiple compilers.
If you cannot afford buying Visual Studio, you still have the option of installing Linux on you computer, which comes with all necessary tools included for free.