CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

EXCEPTION occurred: CURAND failure 201: (see curand.h & look for curandStatus or CURAND_STATUS_xxx) using GPU GeForce GTX 1070

Open mosayyebpour opened this issue 10 years ago • 17 comments

I recently bought a new PC with GPU GeForce GTX 1070. I tried to use CNTK with GPU but I always get an error of "EXCEPTION occurred: CURAND failure 201". Everything works fine using CPU though. Here is the list of what I did.

I installed the the latest driver for my GPU card. I installed the NVIDIA CUB. I installed cuDNN (I tried all versions of it including cuDNN V 5.0). I have installed and tried Cuda 7.0,7.5 and 8. Installed MKL and MS-MPI. I installed ACML 5.3.1 .I tried almost all the binary releases of CNTK (from https://github.com/Microsoft/CNTK/releases). Nothing worked for me. By the way, I did not install older drivers for my GPU card along with the Cuda 7.5 installation since it gives me a warning of incompatibility with my GPU card.

What should I do?

(MY GPU info: Device[0]: cores = 2880; computeCapability = 6.1; type = "GeForce GTX 1070"; memory = 8192 MB)

mosayyebpour avatar Oct 28 '16 23:10 mosayyebpour

From what I understand, the binaries are still compiled for Cuda 7.5, which doesn't fully support the Pascal architecture which the GTX 10 series is built upon. My work computer works fine with an older GPU, but I too am waiting for the binaries to be released for Cuda 8.0. I haven't had much success with trying to compile from source with Cuda 8.0 on my own.

clintjcampbell avatar Oct 29 '16 00:10 clintjcampbell

@mosayyebpour You need to build source with CUDA 8.0. https://github.com/Microsoft/CNTK/wiki/Avoid-the-error-CURAND-failure-201 . @clintjcampbell building from source with CUDA 8.0 should work fine, let us know the problem. If you can wait however, we should have a binary release with 8.0 in a few weeks.

chrisbasoglu avatar Oct 30 '16 00:10 chrisbasoglu

Hi, @chrisbasoglu. I have some problem compiling CNTK master branch with CUDA 8.0 under linux. And after looking into the configure script, I found that it's not written for CUDA 8.0. So which branch do you mean by 'building from source with CUDA 8.0 should work fine'? And in case that I misunderstand the configure script, here's the reason why I think I can't compile CNTK with CUDA 8.0. The enable_cuda failed since the default_cudas in the script doesn't contain cuda-8.0. If I add it, the GPU Deployment kit check would fail but in nvidia's website there's no GDK for CUDA-8.0. Thanks in advance~

UPDATE: How stupid! I searched the branches with CUDA8 and find what I need. Already compiled and using. Thank you for such a great contribution!

kresle avatar Nov 01 '16 04:11 kresle

Hi @kresle. If you have /usr/local/cuda point to /usr/local/cuda-8.0 everything should work. The GDK is basically a check for libnvidia-ml.so and nvml.h which are located in /usr/local/cuda-8.0/lib64/stubs/ and /usr/local/cuda-8.0/include resprectively.

n17s avatar Nov 01 '16 18:11 n17s

The following works for me ./configure --with-mkl=/usr/local/CNTKCustomMKL/ --cuda=yes --with-cuda=/usr/local/cuda --with-gdk-include=/usr/local/cuda/include --with-gdk-nvml-lib=/usr/local/cuda/lib64/stubs/

n17s avatar Nov 04 '16 17:11 n17s

Hi, just wondering how to solve this problem? I downloaded and installed CUDA 8.0 from Nvidia, and changed the two paths mentioned in https://github.com/Microsoft/CNTK/wiki/Avoid-the-error-CURAND-failure-201 but the sample cntk configFile=../Config/Simple.cntk makeMode=false command=Simple_Demo_Train deviceId=0 is still giving the same errors. What else do I need to modify?

I'm using Win 10 and Titan X Pascal by the way.

harewei avatar Nov 07 '16 07:11 harewei

You will need to compile and link CNTK against CUDA-8.

n17s avatar Nov 07 '16 18:11 n17s

sorry I'm quite new to this, but how I compile and link CNTK against CUDA-8?

I installed CNTK with the binary install and ran .\install.ps1 -execute after encountering this CURAND failure problem, I delete the create repo for CNTK, set the CUDA_PATH variable and ran .\install.ps1 -execute again I assumed this would now download and compile CNTK using the newly set CUDA_PATH, but when I ran the simple example it's still giving out the same error.

I also tried to use git bash on the CNTK repo folder, but it's saying it's not currently on any branch

harewei avatar Nov 08 '16 02:11 harewei

The provided binaries are compiled with cuda 7.5. You will have to build from source in order to get things working on your card.

n17s avatar Nov 08 '16 02:11 n17s

got it thanks. one final question, how to I uninstall the binary installation? do I just delete the "local" folder (based on the install tutorial)?

harewei avatar Nov 08 '16 03:11 harewei

If you used the installation script, deleting the "local" folder should remove CNTK. However, I have not used the installation script myself, and I am not sure if it creates any environment variables that point to directories inside the "local" folder. You might want to check your environment variables and remove any that refer to that folder.

n17s avatar Nov 08 '16 04:11 n17s

All changes done by the install are very much localized:

  • The install script makes sure the the Visual Studio Runtimes are installed (VS2012, VS2013), those are system wide, but won't effect you in any way and don't need to be uninstalled
  • MSMPI got installed, if it wasn't present. This also doesn't effect any other software, unless used...
  • Git was installed on your machine if it wasn't present, If you don't need it, you can uninstall it. Git was added to your path statement.
  • Anaconda was installed 'locally' and just 'for you'. No path changes etc. You can uninstall it and delete it in c;\local\Anaconda3... The directory can be removed afterwards
  • The CTNK repository was cloned in c:\repos\cntk and can just be deleted locally
  • The directory you unpacked CNTK into can just be deleted

wolfma61 avatar Nov 08 '16 08:11 wolfma61

Hi Chris, I am also running a GTX 1080 (MSI Sea Hawk) on an Asus Z170-A motherboard under Windows 8.1, with CNTK V2.0 Rev 3 beta installed. I have installed CUDA 8.0 and cudnn-8.0-Windows7-x64-v5.1 and set my environment variable CUDA_PATH_V7_5 to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0

I am getting Curand Error 201 on the ImageHandsOn tutorials.

V3.0 beta appeared to be capable of running CUDA 8.0 on the 0x_OneXxxxxx series of .cntk scripts in "GettingStarted" with success. Is this just luck, or does V3.0 support CUDA-8.0?

How can I get this bug gone? Thanks for any assistance.

amzador2 avatar Nov 22 '16 00:11 amzador2

You need to build and link CNTK from source with CUDA path set to 8.0. If you don't want to go to the that trouble, in Beta5 (look for it on 11/25/2016 or so -- a week from now) we will be building our binaries with CUDA 8.0.

chrisbasoglu avatar Nov 22 '16 00:11 chrisbasoglu

Thanks Chris.

amzador2 avatar Nov 22 '16 04:11 amzador2

Hi Chris,

Is there a comprehensive manual available for BrainScript yet.

I realize that BS is still in development, but a preliminary text would be more useful than a dozen GitHub docs.

Thanks, Andrew


SUBJECT: Re: [Microsoft/CNTK] EXCEPTION occurred: CURAND failure 201: (see curand.h & look for curandStatus or CURAND_STATUS_xxx) using GPU GeForce GTX 1070 (#971) DATE: Mon, 21 Nov 2016 16:16:37 -0800 FROM: Chris Basoglu TO: Microsoft/CNTK CC: amzador2 , Comment REPLY-TO: Microsoft/CNTK

You need to build and link CNTK from source with CUDA path set to 8.0. If you don't want to go to the that trouble, in Beta5 (look for it on 11/25/2016 or so -- a week from now) we will be building our binaries with CUDA 8.0.

You are receiving this because you commented. Reply to this email directly, view it on GitHub [1], or mute the thread [2].

Links:

[1] https://github.com/Microsoft/CNTK/issues/971#issuecomment-262109253 [2] https://github.com/notifications/unsubscribe-auth/AWIZxEB1qPezm2F154UyDgoQMcUitYEcks5rAjRlgaJpZM4Kj9XZ

amzador2 avatar Nov 23 '16 16:11 amzador2

closing this one, most recent entry point to the documentation: https://docs.microsoft.com/en-us/cognitive-toolkit

please open a new issue if you experience this in a more recent CNTK installation

wolfma61 avatar Jun 28 '17 08:06 wolfma61