1
Vote

Cannot find compiler 'cl.exe' in PATH

description

I am new to Cudafy.net so must be doing something rather stupid to get this fault but have been grappling with this problem for days now. I managed to get the Cuda stuff installed from NVIDIA and hope to be able to access it using your well thought of C# wrapper. My problem probably stems from the problem that I am not specifying the PATH correctly or in the proper place. I downloaded CUDA SDK (windows version) and am running WINDOWS 10 with Visual Studio 10. I have an NVIDIA GeForce 930M

My error arises in ArrayBasicIndexing.cs:-

From this file, I include the snippet here:-
public class ArrayBasicIndexing
{
    public const int N = 1 * 1024;

    public static void Execute()
    {
        GPGPU gpu = CudafyHost.GetDevice(CudafyModes.Target, 0);
        eArchitecture arch = gpu.GetArchitecture();
        CudafyModule km = CudafyTranslator.Cudafy(arch);
The line:-CudafyModule km = CudafyTranslator.Cudafy(arch); is the one where the following error message is reported: -
CudafyArrayBasicIndexing
Cudafy.CudafyCompileException: Compilation error:
nvcc fatal : Cannot find compiler 'cl.exe' in PATH


Please add the Visual Studio VC bin directory to PATH in Environment Variables..
at Cudafy.CudafyModule.Compile(CompileProperties[] props)
at Cudafy.Translator.CudafyTranslator.Cudafy(IEnumerable`1 props, Type[] types)
at Cudafy.Translator.CudafyTranslator.Cudafy(CompileProperties prop, Type[] types)
at Cudafy.Translator.CudafyTranslator.Cudafy(ePlatform platform, eArchitecture arch, Version cudaVersion, Boolean compile, Type[] types)
at Cudafy.Translator.CudafyTranslator.Cudafy(ePlatform platform, eArchitecture arch, Type[] types)
at Cudafy.Translator.CudafyTranslator.Cudafy(eArchitecture arch)
at CudafyExamples.Arrays.ArrayBasicIndexing.Execute() in C:\temp\CudafyV1.29\CudafyV1.29\CudafyExamples\Arrays\ArrayBasicIndexing.cs:line 39
at CudafyExamples.Program.Main(String[] args) in C:\temp\CudafyV1.29\CudafyV1.29\CudafyExamples\Program.cs:line 46.CudafyCompileException: Compilation error:
nvcc fatal : Cannot find compiler 'cl.exe' in PATH


I tried to follow the advice given here about setting up a path to where Visual Studio bin directory was situated. I navigate to the System (advanced system settings/Environment Variables) and set the PATH variable equal to C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC (my local VC subdirectory. This has no affect on the outcome. I still get this error no matter what I try. I would be most grateful if someone could direct me to solve this issue.
Many thanks

gordonpagan

comments

gordonpagan wrote Jan 5, 2016 at 5:43 PM

I tried this with CUDA 7.0 too with the same error being reported. Someone please tell this worked for them - I need a moral booster at this point.
Best wishes
gordonpagan

CTapang wrote Jan 12, 2016 at 8:11 AM

Hi,
Do any of the Cudafy samples compile and work for you? I am using the Community edition of VS 2015, and all samples compile for me. (I downloaded and installed v1.29.)