Installing and using Cuda 9.1 for Windows 10 Pro N - Visual Studio 2015 - C++/OpenCV

Dear CUDA experts,

As a total beginner, I would like to introduce my set up and purpose for clarity.

I am using :

* Windows 10 Pro N
* Visual Studio 2015
* Laptop with Processor : Intel Core i5-2450M CPU @ 2.5Ghz 2 cores
              GPU       : NVIDIA GeForce GT 635M ( That supports CUDA)
And I am working on C++;

My purpose is to boost the performance of a C++/OpenCV code that I have written by using CUDA.

As it should be, I have followed this http://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/ tutorial that describes how to install CUDA.

Step 2.1. Verify You Have a CUDA-Capable GPU: YES GeForce GT 635M is supported. So NO problems at this step.

2.2. Download the NVIDIA CUDA Toolkit : I picked Windows -> x86_x64 -> Version 10 and Network Installer. Then Downloaded the BASE INSTALLER (15.8 Mb).

2.3. Install the CUDA Software : Then NVIDIA CUDA Version 9.1 started for installation. I picked “Express” install option which is recommended. As explained it installs all CUDA components and overwrites current Display Driver. So the driver is installed. (I guess). At the end of installation a window which states the following popped out:

Installed:
-Nsight for Visual Studio 2015
-Nsight Monitor and HUD Launcher

2.4. Use a Suitable Driver Model : Using the dxdiag command at run, I see that I am using WDDM 1.2 (I believe graphics card driver for my set up is up to date. but NOT sure)

2.5. Verify the Installation
2.5.1. Running the Compiled Examples : When I execute “nvcc -V” command at command prompt I see the following

C:\Users\burak>nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:08:12_Central_Daylight_Time_2017
Cuda compilation tools, release 9.1, V9.1.85

so thıs seems OK.

But when I navigate to
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.1\bin\win64\Release
I DO NOT SEE deviceQuery program!!!

When I search for deviceQuery, I find it at
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.1\1_Utilities\deviceQuery
I executed deviceQuery_vs2015.sln, build it and started without debugging: Here is the result:

C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.1_Utilities\deviceQuery\../../bin/win64/Debug/deviceQuery.exe Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "GeForce GT 635M"
  CUDA Driver Version / Runtime Version          9.1 / 9.1
  CUDA Capability Major/Minor version number:    2.1
  Total amount of global memory:                 2048 MBytes (2147483648 bytes)
MapSMtoCores for SM 2.1 is undefined.  Default to use 64 Cores/SM
MapSMtoCores for SM 2.1 is undefined.  Default to use 64 Cores/SM
  ( 3) Multiprocessors, ( 64) CUDA Cores/MP:     192 CUDA Cores
  GPU Max Clock rate:                            1300 MHz (1.30 GHz)
  Memory Clock rate:                             900 Mhz
  Memory Bus Width:                              128-bit
  L2 Cache Size:                                 262144 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536, 65535), 3D=(2048, 2048, 2048)
  Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 32768
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  1536
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (65535, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 1 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  CUDA Device Driver Mode (TCC or WDDM):         WDDM (Windows Display Driver Model)
  Device supports Unified Addressing (UVA):      Yes
  Supports Cooperative Kernel Launch:            No
  Supports MultiDevice Co-op Kernel Launch:      No
  Device PCI Domain ID / Bus ID / location ID:   0 / 1 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 9.1, CUDA Runtime Version = 9.1, NumDevs = 1
Result = PASS
Press any key to continue . . .

I think this one is also OK. Because I see that “NumDevs = 1” and “Result = PASS”.

Then I execute “bandwidthTest” in the same way. Here is the result:

[CUDA Bandwidth Test] - Starting...
Running on...

 Device 0: GeForce GT 635M
 Quick Mode

 Host to Device Bandwidth, 1 Device(s)
 PINNED Memory Transfers
   Transfer Size (Bytes)        Bandwidth(MB/s)
   33554432                     6459.6

 Device to Host Bandwidth, 1 Device(s)
 PINNED Memory Transfers
   Transfer Size (Bytes)        Bandwidth(MB/s)
   33554432                     6320.1

 Device to Device Bandwidth, 1 Device(s)
 PINNED Memory Transfers
   Transfer Size (Bytes)        Bandwidth(MB/s)
   33554432                     25838.1

Result = PASS

NOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.
Press any key to continue . . .

This step also seems fine.

3. Compiling CUDA Programs : I apply the same procedure as explained in here in the video
https://developer.nvidia.com/how-to-cuda-c-cpp
In the video the guy also uses Visual Studio 2015.

I navigate to C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.1\0_Simple
and select matrixMul_vs2015.sln build it then start without debugging. Just as explained in the video.
AND HERE IS WHAT HAPPENS:

Error! Matrix[30330]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30331]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30332]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30333]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30334]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30335]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30336]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30337]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30338]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30339]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30340]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30341]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30342]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30343]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30344]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30345]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30346]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30347]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30348]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30349]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30350]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30351]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30352]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30353]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30354]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30355]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30356]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30357]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30358]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30359]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30360]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30361]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30362]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30363]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30364]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30365]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30366]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30367]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30368]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30369]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30370]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30371]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30372]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30373]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30374]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30375]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30376]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30377]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30378]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30379]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30380]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30381]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30382]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30383]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30384]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30385]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30386]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30387]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30388]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30389]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30390]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30391]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30392]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30393]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30394]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30395]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30396]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30397]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30398]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30399]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30400]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30401]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30402]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30403]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30404]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30405]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30406]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30407]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30408]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30409]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30410]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30411]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30412]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30413]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30414]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30415]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30416]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30417]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30418]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30419]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30420]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30421]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30422]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30423]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30424]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30425]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30426]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30427]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30428]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30429]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30430]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30431]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30432]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30433]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30434]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30435]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30436]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30437]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30438]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30439]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30440]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30441]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30442]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30443]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30444]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30445]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30446]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30447]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30448]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30449]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30450]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30451]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30452]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30453]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30454]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30455]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30456]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30457]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30458]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30459]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30460]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30461]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30462]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30463]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30464]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30465]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30466]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30467]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30468]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30469]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30470]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30471]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30472]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30473]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30474]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30475]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30476]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30477]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30478]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30479]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30480]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30481]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30482]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30483]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30484]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30485]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30486]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30487]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30488]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30489]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30490]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30491]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30492]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30493]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30494]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30495]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30496]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30497]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30498]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30499]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30500]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30501]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30502]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30503]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30504]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30505]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30506]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30507]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30508]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30509]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30510]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30511]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30512]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30513]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30514]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30515]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30516]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30517]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30518]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30519]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30520]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30521]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30522]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30523]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30524]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30525]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30526]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30527]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30528]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30529]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30530]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30531]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30532]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30533]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30534]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30535]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30536]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30537]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30538]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30539]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30540]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30541]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30542]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30543]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30544]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30545]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30546]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30547]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30548]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30549]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30550]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30551]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30552]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30553]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30554]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30555]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30556]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30557]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30558]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30559]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30560]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30561]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30562]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30563]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30564]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30565]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30566]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30567]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30568]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30569]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30570]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30571]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30572]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30573]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30574]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30575]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30576]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30577]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30578]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30579]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30580]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30581]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30582]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30583]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30584]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30585]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30586]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30587]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30588]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30589]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30590]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30591]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30592]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30593]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30594]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30595]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30596]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30597]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30598]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30599]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30600]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30601]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30602]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30603]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30604]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30605]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30606]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30607]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30608]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30609]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30610]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30611]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30612]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30613]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30614]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30615]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30616]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30617]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30618]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30619]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30620]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30621]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30622]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30623]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30624]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30625]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30626]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30627]=0.00000000, ref=3.19999981 error term is > 1.000000E-06
Error! Matrix[30628]=0.00000000, ref=3.19999981 error term is > 1.000000E-06

And in the code I see that there is something wrong. But program still builds but cannot start. To be more specific there is an error at the 3rd and 7th lines. Last “<” character is underlined with red. When I hoover cursor over it, I see “expect and expression” warning.

if (block_size == 16)
    {
        matrixMulCUDA<16><<< grid, threads >>>(d_C, d_A, d_B, dimsA.x, dimsB.x);
    }
    else
    {
        matrixMulCUDA<32><<< grid, threads >>>(d_C, d_A, d_B, dimsA.x, dimsB.x);
    }

Same applies for 5th and 9th rows in the code below.

for (int j = 0; j < nIter; j++)
    {
        if (block_size == 16)
        {
            matrixMulCUDA<16><<< grid, threads >>>(d_C, d_A, d_B, dimsA.x, dimsB.x);
        }
        else
        {
            matrixMulCUDA<32><<< grid, threads >>>(d_C, d_A, d_B, dimsA.x, dimsB.x);
        }
    }

To sum up, my question is How can I get rid of those errors?
DID I correctly installed the CUDA for C++/OpenCV?
If I could not installed CUDA for C++/OpenCV where is my mistake and how can I correct it?

Looking forward for your replies…

Yours Sincerely…

refer to the comments on your cross-posting on SO

https://stackoverflow.com/questions/48722371/cuda-installation-for-windows-pro-n-visual-studio-2015-c-opencv

In regards to the behavior on the matrix multiply app, the errors might be because of setting custom matrix sizes that are not multiples of 32. See below:

https://devtalk.nvidia.com/default/topic/1029808/cuda-programming-and-performance/matrixmul-sample/

Dear all;

Thanks for the swift replies. I have found the problem:

The graphics card I am using is a pretty old one: GT 635M which has computation capacity of 2.1.
Since Cuda 9.1 do NOT support it, problem I have mentioned occurred. I replace cuda 9.1 with cuda 8.0 and the problem is solved.