CUDAFYSOURCETEMP access denied

Aug 14, 2014 at 8:00 AM
I'm new to cudafy.NET and I'm trying to get an existing application using cudyfy.NET v1.27 to work on my local machine.
My webapplication is build using VS2013 Express C#, I also have VC++ 2010 Pro installed for the compiling. I have a GeForce 840M card with CUDA and OpenCL.
The Cudafy Viewer is working fine for the CUDA and OpenCL setup.
My webapplication is working fine if I use OpenCL but not when I use CUDA.
I had a lot of issues with it, most are solved but now I've got this error:
Access denied for C:\Program Files (x86)\IIS Express\CUDAFYSOURCETEMP.cu
At least this means that it is working since it is creating a .cu file, but in the wrong location.

I've been using Google to find an option to change the location but can't find it. I would have expected this file in the bin folder of my application or in my tmp folder.

Any help is much appreciated.

Thanks,
Paul
Coordinator
Aug 18, 2014 at 4:16 PM
Have you tried putting the CUDAfy.NET dll into the GAC? If you use the Cudafy Module Viewer tool there is a link to a site informing you how to do this.
You could also use the WorkingDirectory property.
Aug 19, 2014 at 6:53 AM
Thanks Nick,

I had already put the CUDAfy.NET dll into the GAC. Setting the WorkingDirectory property worked.
I use the CUDAfy.NET dll in a webservice using a solution with multiple projects/dlls.
When I run my service in Visual Studio and start a second Visual Studio instance to run my unit test it works, after I place the dll (GPUService.Common.dll) that does the GPU stuff in C:\Program Files (x86)\IIS Express\

But when I start my service using this script:
start /B "GPUServices" "C:\Program Files (x86)\IIS Express/iisexpress" /site:GPUServices
and open my solution in Visual Studio and run my unit test I get an error saying it cannot found GPUService.Common.dll
Using ProcMon I can see it is looking for this dll in several places, also in C:\Windows\Microsoft.NET\Framework\v4.0.30319\
When I copy my GPUService.Common.dll into this folder as well, all works again.

So I'm happy everything is working now, but I don't know why I need to copy the dll to those system folders. I don't need to this for my other webservices or webapplications that don't use the CUDAfy.NET dll.

Thanks,

Paul