cublasCreate() throws exception "cudaError_enum"

When I execute below code:

#include <cublas_v2.h>
int main()
{
   cublasHandle_t handle;
   cublasCreate(&handle);

   return 0;
}

Output says:
First-chance exception at 0x000007fefd96aa7d in CudaTest.exe: Microsoft C++ exception: cudaError_enum at memory location 0x001ef830

What does this mean and how can I fix this?

It could not be reproduce.

Could you provide:

  1. CUDA toolkit/driver version;
  2. OS version;
  3. Command line for compilation;
  4. Try to build and run simpleCUBLAS(in CUDA sample).

Thanks!

  1. ver 5.0
  2. Windows7 Pro SP1
  3. ``` # (Approximate command-line. Settings inherited from host are not visible below.) # (Please see the output window after a build for the full command-line)

    Driver API (NVCC Compilation Type is .cubin, .gpu, or .ptx)

    set CUDAFE_FLAGS=–sdk_dir “C:\Program Files\Microsoft SDKs\Windows\v7.0A”
    “C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\bin\nvcc.exe” --use-local-env --cl-version 2010 -ccbin “c:\Program Files\Microsoft Visual Studio 10.0\VC\bin” -G --keep-dir “Debug” -maxrregcount=0 --machine 32 --compile -o “Debug%(Filename)%(Extension).obj” “%(FullPath)”

    Runtime API (NVCC Compilation Type is hybrid object or .c file)

    set CUDAFE_FLAGS=–sdk_dir “C:\Program Files\Microsoft SDKs\Windows\v7.0A”
    “C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\bin\nvcc.exe” --use-local-env --cl-version 2010 -ccbin “c:\Program Files\Microsoft Visual Studio 10.0\VC\bin” -G --keep-dir “Debug” -maxrregcount=0 --machine 32 --compile -g -Xcompiler "/EHsc /nologo /Zi " -o “Debug%(Filename)%(Extension).obj” “%(FullPath)”

    </li>
    <li>The same exception is thrown @ Line#107 (cublasCreate(&handle);)</li>
    </ol>
    
    
    
    Thank you for replying and continues help.

I still could not reproduce it. What about compiling by cl in VS2010 command prompt? The host compiler is enough for cublas cpps.

Sorry for late replying.

Compiling by only cl throws the same exception.

By command prompt is not enough answer because the exception is reported on VisualStudio’s output window.

I have the same problem. The status however still equals CUBLAS_STATUS_SUCCES
The simpleCUBLAS gives the same problem.
cuda 5.0
os windows 7 64 pro

The system does not allow me to post the compile command line

I have the same problem. It seems it doesn’t affect any results, but I think it isn’t right.

Additionally, I have 2 similar exceptions after gpuGetMaxGflopsDeviceId() function execution:

First-chance exception at 0x7790cb43 in conjugateGradientPrecond.exe: 0xC0000005: Access violation reading location 0x000007feff808000.

CUDA 5.0, OS Windows 7 Enterprise x64 SP1.

Same here!

CUDA 5.0, OS Windows 7 x64.

First-chance exception at 0x7517C41F in TestTrackIvus.exe: Microsoft C++ exception: cudaError_enum at memory location 0x0044F6D0.

Can anyone from Nvidia take a minute to help us on this?! It seems to be happening to a lot of users!

Is this an intentional First-chance exception or is it a bug?

I have a Win7x64 with CUDA 5.0 machine and I can’t reproduce this issue with the code in the first post. However, can those of you with trouble please add “cublasInit()” before the “cublasCreate(…)” call and then reply with success or failure? Thanks.