This project is read-only.

System.ComponentModel.Win32Exception (0x80004005)

Jan 25, 2016 at 7:46 PM
-- I executed CudafyViewer.exe, result = "pass"

-- I am executing CudafyV1.29 with Cuda Toolkit 7.0 on a windows 7 x64 machine.

-- the example projects build successfully.

-- the issue I have is identical to a previous post in this forum. That user did not receive an answer. Here is the post: https://cudafy.codeplex.com/discussions/561534

...the user described the issue better than I can. Please see his post for more details.

-- How can I get past the exception show below?


Running examples using Tesla C2070

Chapter 3

hello_world
Hello, World!

simple_kernel
System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startIn
fo)
at System.Diagnostics.Process.Start()
at Cudafy.CudafyModule.Compile(CompileProperties[] props)
at Cudafy.Translator.CudafyTranslator.Cudafy(IEnumerable`1 props, Type[] type
s)
at Cudafy.Translator.CudafyTranslator.Cudafy(CompileProperties prop, Type[] t
ypes)
at Cudafy.Translator.CudafyTranslator.Cudafy(ePlatform platform, eArchitectur
e arch, Version cudaVersion, Boolean compile, Type[] types)
at Cudafy.Translator.CudafyTranslator.Cudafy(ePlatform platform, eArchitectur
e arch, Type[] types)
at Cudafy.Translator.CudafyTranslator.Cudafy()
at CudafyByExample.simple_kernel.Execute() in C:\CUDA\CudafyV1.29\CudafyByExa
mple\chapter03\simple_kernel.cs:line 20
at CudafyByExample.Program.Main(String[] args) in C:\CUDA\CudafyV1.29\CudafyB
yExample\Program.cs:line 32
Jan 27, 2016 at 12:29 PM
Hi
It seems your process isn't able to find the cuda compiler (nvcc.exe). Maybe it's not in the PATH, or maybe the process doesn't have permissions on that file.
Jan 28, 2016 at 4:52 PM
Hi

nvcc.exe is in my system path variable, included with "C:\CUDA\CudaToolkit\bin\"

Here is my system PATH variable:

PATH==C:\CUDA\CudaToolkit\bin\;C:\CUDA\CudaToolkit\libnvvp;C:\CUDA\externalReferences;

I can open a command prompt and from any location type "nvcc.exe" and it executes.

There are no permissions issues. All system users have full execute permissions to nvcc.exe.

The exception doesn't refer to nvcc.exe in any way that I can see...could it possibly be a different issue?
Is there any way to determine the path of the file that it is throwing an exception on? In my debugger what I see is "c:\Program" - which is an invalid path but certainly it's getting caught up on the spaces in the directory path, possibly because they are not escaped correctly.

Could there possibly be a configuration file somewhere with an invalid path?

I'm open to any suggestions, I'd really like to get this working.
Jan 28, 2016 at 5:07 PM
More information:

The exception appears to be thrown when CudafyTranslator.Cudafy(); is called.
I don't have any way to see inside that method using my debugger, it won't step in.

The exception is stemming from System.dll. On my system it is located here:
C:\windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll
Version information:
System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Based upon the reflected type, it appears that System.dll is trying to use System.Diagnostics.Process to execute a process, specifically:
{Boolean StartWithCreateProcess(System.Diagnostics.ProcessStartInfo)}

However, no-where in the stack track or exception detail do I see a path to an executable file. I've literally clicked through every expandable node in the exception tree "view detail" dialog. If it is there, it is well hidden. Do you know happen to know how to find the path to the *.exe that it is trying to execute (if that is indeed the issue)?
Jan 28, 2016 at 11:39 PM
Have you checked your event viewer, maybe there's some more info there.

Well, cudafy starts a new process to run nvcc, and it's (afaik) the only time it launches a new process; the error is most likely in the code that constructs the string with the file name it's trying to launch.
I suggest you download the cudafy source and integrate it in your project, or at least compile it in debug mode and link to it from your project. This way you'll be able to debug up to the faulty instruction and see what process file it's trying to access.
It's relatively simple to set up cudafy's source code to compile, I know there are some instructions in this forum, but using common sense should be enough in this case.
I usually set all projects to x64 and to the latest .net version, and exclude from the compilation the unit tests. Then in my original project I include references to all the dll's that resulted from the compilation process of cudafy.