The following code snippet:
float* d_priceGauss;
unsigned int mem_size = totGaussSequencePlus1 * totGaussSamples * sizeof(float);
cudaError err = cudaMalloc( (void**) &d_priceGauss, mem_size);
char errBuf[500];
if( cudaSuccess != err)
{
sprintf(errBuf, "Cuda error in file '%s' in line %i : %s.",
__FILE__, __LINE__, cudaGetErrorString( err) );
return 100;
}
works OK when run under a .NET 2.0 console application (the CUDA code is compiled into an unmanaged Win32 DLL, called via interop). However…
When I call exactly the same DLL from an ASP.NET application (all else being equal), the call above returns cudaInitializationError. In other words, the only variable here is the host: in the successful case, a .NET 2.0 console application; in the failed case, an ASP.NET 2.0 web application. Needless to say, the one shown is the first CUDA call in the application.
Permission-wise, I made the web app run as the same user account under which I am logged on (admin user) and under which I run the successful console app.
Any other ideas of what the difference could be?
Thanks.