<div dir="ltr"><div><div><div><div><br></div>Upon:<br><br>wiping Dell 7559 (yes the weirdness has gotten this bad), reinstalling from Dell Factory image<br>upgrading system to Latest Win 10 (now not in developer mode anymore)<br>Dell update to get latest drivers and other goobly bits<br>Removing all Virus Scanners to keep this from possibly interfering<br>Installing Visual Studio 2013 Community<br></div>Installing CUDA 7.5 and packaged driver<br></div>Imagining with Clonezilla for posterity sake in case... uhhh... when windows acts up again.<br></div><div><div><div><div><br>These statements:<br><div><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF"><br><div class="gmail-m_-9051288088576772786moz-text-html" lang="x-unicode">
      Regarding 960M and CUDA  7.5/7.5, 8.0/7.5, and 7.7/9.0<br>
      <br>
      Answer is:<br>
      <br>
      960M was likely released post CUDA  7.5 driver and possibly post
      8.0.  Seems that architecture differences do not allow old drivers
      to work on newer arch cards.   Once 9.0 driver was released... 7.5
      run time worked with 9.0 driver, but for some reason not 8.0. 
      Seems CUDA and Nvidia Runtime/Drivers have a dirty little secret
      much like Java and the runtimes.<br>
      <br>
      At this point I cannot get CMake 3.2 or 3.9 to work with CUDA
      7.5/9.0, VS 13, on Win10Pro/Enterprise.  And from the state of doc
      it seems not worth my effort to even try anymore.<br>
      </div></div></blockquote></div><br></div><div class="gmail_extra">Are NOT correct.  The 7559 does work with CUDA 7.5 and runtime (all that is required is to wipe windows and start form scratch... no surprise there):<br><br>C:\ProgramData\NVIDIA Corporation\CUDA Samples\v7.5\1_Utilities\deviceQuery\../../bin/win64/Debug/deviceQuery.exe Starting...<br><br> CUDA Device Query (Runtime API) version (CUDART static linking)<br><br>Detected 1 CUDA Capable device(s)<br><br>Device 0: "GeForce GTX 960M"<br>  CUDA Driver Version / Runtime Version          7.5 / 7.5<br>  CUDA Capability Major/Minor version number:    5.0<br>  Total amount of global memory:                 4096 MBytes (4294967296 bytes)<br>  ( 5) Multiprocessors, (128) CUDA Cores/MP:     640 CUDA Cores<br>  GPU Max Clock rate:                            1176 MHz (1.18 GHz)<br>  Memory Clock rate:                             2505 Mhz<br>  Memory Bus Width:                              128-bit<br>  L2 Cache Size:                                 2097152 bytes<br>  Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)<br>  Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers<br>  Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 2048 layers<br>  Total amount of constant memory:               65536 bytes<br>  Total amount of shared memory per block:       49152 bytes<br>  Total number of registers available per block: 65536<br>  Warp size:                                     32<br>  Maximum number of threads per multiprocessor:  2048<br>  Maximum number of threads per block:           1024<br>  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)<br>  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)<br>  Maximum memory pitch:                          2147483647 bytes<br>  Texture alignment:                             512 bytes<br>  Concurrent copy and kernel execution:          Yes with 1 copy engine(s)<br>  Run time limit on kernels:                     Yes<br>  Integrated GPU sharing Host Memory:            No<br>  Support host page-locked memory mapping:       Yes<br>  Alignment requirement for Surfaces:            Yes<br>  Device has ECC support:                        Disabled<br>  CUDA Device Driver Mode (TCC or WDDM):         WDDM (Windows Display Driver Model)<br>  Device supports Unified Addressing (UVA):      Yes<br>  Device PCI Domain ID / Bus ID / location ID:   0 / 2 / 0<br>  Compute Mode:<br>     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) ><br><br>deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 7.5, CUDA Runtime Version = 7.5, NumDevs = 1, Device0 = GeForce GTX 960M<br>Result = PASS<br><br><br></div><div class="gmail_extra">I cannot however get a simple CUDA app to run that was generated with CMake 3.2 or 3.9.  I can get it to compile, but I can't get it to run.  Also previously CTest and some executables would just hang when run until I reinstalled Visual Studio 2013.  This is what finally pushed me to wipe the machine.  <br></div><div class="gmail_extra"><br></div><div class="gmail_extra">I cannot at this point explain what happened.  I also cannot explain why after a clean wipe I still cannot get a ultra simple CUDA app compiled by CMake 3.2 or 3.9 to work on Windows 10 even though the SDK apps compile AND RUN now in 7.5/7.5 combo. <br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Is there anyone out there that is able to get CMake to create a runnable CUDA executable that creates memory on the device to run on Win10 latest.  Again SDK Apps compile and run but not CMake generated app.. App will compile and run, but is unable to communicate/create memory on the device.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">My app... as simple as I can make it is:<br></div><div class="gmail_extra"><br>#include "openglbasic.h"<br><br>#include <cuda_runtime.h><br>#include <cuda_gl_interop.h><br><br>#include <helper_cuda.h>    // includes cuda.h and cuda_runtime_api.h<br>#include <helper_functions.h><br>#include <helper_cuda_gl.h><br><br>#ifdef USE_CUDA_OPTIMAL_DEVICE<br>#include <dsacudautil/cuda_device_properties.h><br>#include <dsacudautil/optimal_gpu.h><br>#endif<br><br><br>#include <memory><br>#include <algorithm><br><br>int current = 0;<br>int UniqueNumber() { return ++current; }<br><br>int add(const float* A, const float* B, float* C);<br><br>int main(int argc, char* argv[]){<br><br>    int curr_cuda_device_id = 0;<br><br>    int cuda_device_id = 0;<br><br><br>    cuda_device_id = findCudaDevice(argc, (const char **)argv);<br><br><br>    // Need to initiialzie cuda and opengl interop here.<br>    checkCudaErrors(cudaGetDevice(&curr_cuda_device_id));<br>    printf("Current device is [%d]\n", curr_cuda_device_id);<br>    checkCudaErrors(cudaSetDevice(cuda_device_id));<br>    checkCudaErrors(cudaGLSetGLDevice(cuda_device_id));<br>    printf("Current device is [%d]\n", curr_cuda_device_id);<br><br><br>    int x_dim = 256;<br>    int y_dim = 256;<br>    int z_dim = 196;<br>    float * d_volume;<br>    int size = x_dim * y_dim * z_dim * sizeof(float);<br>    //size = 5;<br>    checkCudaErrors(cudaMalloc((void **)&d_volume, size));<br><br>    return 0;<br><br>}<br><br></div><div class="gmail_extra">Exits at:<br><br>  checkCudaErrors(cudaMalloc((void **)&d_volume, size));<br><br><br>In: check():<br><br>c:\ProgramData\NVIDIA Corporation\CUDA Samples\v7.5\common\inc\helper_cuda.h<br><br>template< typename T ><br>void check(T result, char const *const func, const char *const file, int const line)<br>{<br>    if (result)<br>    {<br>        fprintf(stderr, "CUDA error at %s:%d code=%d(%s) \"%s\" \n",<br>                file, line, static_cast<unsigned int>(result), _cudaGetErrorEnum(result), func);<br>        DEVICE_RESET<br>        // Make sure we call CUDA Device Reset before exiting<br>        exit(EXIT_FAILURE);<br>    }<br>}<br></div><div class="gmail_extra"><br><br></div><div class="gmail_extra">With terminal output of:<br><br>GPU Device 0: "GeForce GTX 960M" with compute capability 5.0<br><br>Current device is [0]<br>Current device is [0]<br>CUDA error at C:\projects\cmake\cmake_test\v3.2\cuda_basic\src\cuda_basic_test.cpp:67 code=46(cudaErrorDevicesUnavailable) "cudaMalloc((void **)&d_volume, size)"<br><br><br></div><div class="gmail_extra">Is there something I am missing here.  Above should work right?<br><br></div><div class="gmail_extra">I am also told that CMake tests are successful on Win10.  Do these test actually try and communicate with the device / create memory or are they written to just test compilation?  Cuz that would certainly pass on my machine, but not actually work!<br><br></div><div class="gmail_extra">As Stated by Robert Maynard </div><div class="gmail_extra">"Unfortunately you are going to need to provide more information to help 
track down the issue. We currently have machines that verify
<br>2015/8.0 and 2013/7.5 properly work (
<br><a href="https://open.cdash.org/index.php?project=CMake&filtercount=1&showfilters=1&field1=buildname&compare1=63&value1=CUDA">https://open.cdash.org/index.php?project=CMake&filtercount=1&showfilters=1&field1=buildname&compare1=63&value1=CUDA</a>"<br><br></div><div class="gmail_extra">at <a href="http://cmake.3232098.n2.nabble.com/Visual-Studio-with-CUDA-does-not-work-in-3-9-td7595673.html">http://cmake.3232098.n2.nabble.com/Visual-Studio-with-CUDA-does-not-work-in-3-9-td7595673.html</a><br><br></div><div class="gmail_extra">Hmm curious the title there:  "Visual-Studio-with-CUDA-does-not-work-in-3-9"</div><div class="gmail_extra"><br></div><div class="gmail_extra">How do I go about running that test on my machine?<br><br></div><div class="gmail_extra">I started here:<br></div><div class="gmail_extra"><br><a href="https://cmake.org/testing/">https://cmake.org/testing/</a><br><br></div><div class="gmail_extra">then on to:<br><br><a href="https://gitlab.kitware.com/cmake/cmake/blob/master/Help/dev/testing.rst">https://gitlab.kitware.com/cmake/cmake/blob/master/Help/dev/testing.rst</a><br><br></div><div class="gmail_extra">that routed me to:<br><br><a href="https://gitlab.kitware.com/cmake/dashboard-scripts">https://gitlab.kitware.com/cmake/dashboard-scripts</a><br><br></div><div class="gmail_extra">Where I read<br><br><a href="https://gitlab.kitware.com/cmake/dashboard-scripts/blob/master/cmake_common.cmake">https://gitlab.kitware.com/cmake/dashboard-scripts/blob/master/cmake_common.cmake</a><br></div><div class="gmail_extra"><br> .... yeah ugh I know the internet is all about hyper links, but hyper use of hyper links?<br><br></div><div class="gmail_extra">but anyway I do my own version of <a href="https://gitlab.kitware.com/cmake/cmake/blob/master/Help/dev/testing.rst">https://gitlab.kitware.com/cmake/cmake/blob/master/Help/dev/testing.rst</a>  (to relocate C:\projects\cmake_dev\Dashboards\CMakeScripts)<br><br>$ mkdir -p ~/Dashboards<br>$ cd ~/Dashboards<br>$ git clone <a href="https://gitlab.kitware.com/cmake/dashboard-scripts.git">https://gitlab.kitware.com/cmake/dashboard-scripts.git</a> CMakeScripts<br>$ cd CMakeScripts<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">So I create:<br><br></div><div class="gmail_extra"><br>C:\projects\cmake_dev\Dashboards\CMakeScripts\bjd_dashboard.cmake<br><br></div><div class="gmail_extra">which reads (short version without comments)<br><br></div><div class="gmail_extra">   # Client maintainer: <a href="mailto:me@mydomain.net">me@mydomain.net</a><br>   set(CTEST_SITE "bitbucket")<br>   set(CTEST_BUILD_NAME "Win10-Visual Studio 2013")<br>   set(CTEST_BUILD_CONFIGURATION Debug)<br>   set(CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64")<br>   <br>   #set( dashboard_model Experimental)<br>   set( dashboard_model Nightly)<br>   <br>   include(${CTEST_SCRIPT_DIRECTORY}/cmake_common.cmake)<br><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Question how do I configure this to run just 3.9 and CUDA tests? ... and preferably just the CUDA tests.<br><br></div><div class="gmail_extra">Also during this I asked the CMake folk to create a kitware/ctest official docker image so I could just install it on my NAS.. but looks like I have to ansible it into existence.  spectacularrrrg!<br></div><div class="gmail_extra"><br><br></div></div></div></div></div></div></div>