0

This question is for Python2.7 with Keras as a front end. I have Microsoft Visual Studio 2017 and I believe I have all the tools it needs. I followed the instructions on install CUDA. I believe it is version 10, and I think it is installed correctly. I followed the tutorial video and got a similar result at the end for the sample test. I have now moved on to installing libgpuarray. I have completed the following steps and got this error:

C:\Windows\system32>cd C:\Users\Never\Downloads\libgpuarray

C:\Users\Never\Downloads\libgpuarray>cd Build

C:\Users\Never\Downloads\libgpuarray\Build>cmake .. -DCMAKE_BUILD_TYPE=Release
-- Building for: Visual Studio 15 2017
-- The C compiler identification is MSVC 19.16.27034.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Deprecation Warning at CMakeLists.txt:26 (cmake_policy):
  The OLD behavior for policy CMP0063 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- Looking for strlcat
-- Looking for strlcat - not found
-- Looking for mkstemp
-- Looking for mkstemp - not found
-- Found PkgConfig: C:/MinGW_w64/bin/pkg-config.exe (found version "0.25")
-- Checking for one of the modules 'check'
Tests disabled because Check was not found
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_BUILD_TYPE


-- Build files have been written to: C:/Users/Never/Downloads/libgpuarray/Build

I tried running C:\Users\Never\Downloads\libgpuarray\Build>make next but it returned:

'make' is not recognized as an internal or external command,operable program or batch file.

There is a make script in the folder above so I tried using it, with this result:

C:\Users\Never\Downloads\libgpuarray\Build>C:\Users\Never\Downloads\libgpuarray\make.bat

C:\Users\Never\Downloads\libgpuarray\Build>REM This helps repetitive builds on windows

C:\Users\Never\Downloads\libgpuarray\Build>REM It needs the compiler you want to use to be available in the shell

C:\Users\Never\Downloads\libgpuarray\Build>REM and it will build a release version

C:\Users\Never\Downloads\libgpuarray\Build>del bld
Could Not Find C:\Users\Never\Downloads\libgpuarray\Build\bld

C:\Users\Never\Downloads\libgpuarray\Build>mkdir bld

C:\Users\Never\Downloads\libgpuarray\Build>cd bld

C:\Users\Never\Downloads\libgpuarray\Build\bld>cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release
CMake Error: Error: generator : NMake Makefiles
Does not match the generator used previously: Visual Studio 15 2017
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.

C:\Users\Never\Downloads\libgpuarray\Build\bld>cmake --build . --config Release
Error: could not load cache

C:\Users\Never\Downloads\libgpuarray\Build\bld>cd ..

I am not 100% sure what to do next. I don't want to tinker and break things further, any assistance would be appreciated, thank you.

Kevin
  • 16,549
  • 8
  • 60
  • 74
Never Nor
  • 377
  • 2
  • 16
  • The first line in the log - "Building for: Visual Studio 15 2017" - clearly says, that CMake prepares your project for Visual Studio, not for Make. For build such project you need to use the Visual Studio (open `.sln` file). – Tsyvarev Nov 23 '19 at 13:05

1 Answers1

1

It looks like you are following the Linux instructions in the tutorial you linked. You should probably take a look at the Windows-specific instructions, considering you are building on Windows with Visual Studio.

It sounds like you may have corrupted your CMake cache a bit by running the make.bat file, so it's probably best to delete your Build folder and start over:

C:\Users\Never\Downloads\libgpuarray>mkdir Build && cd Build
C:\Users\Never\Downloads\libgpuarray\Build>cmake ..

From there, just follow the Windows-specific guidelines from the tutorial:

It will generate a Visual Studio solution file for the version installed. To build the project open this file (.sln) and run the “Build All” command after selecting the appropriate build type.

Kevin
  • 16,549
  • 8
  • 60
  • 74
  • Did that got a `libgpuarray.sln` file, I clicked it, got Visual Studio to open where I had 6 projects: ALL_BUILD, gpuarray, gpuarray_static, INSTALL, RUN_TEST, ZERO_ CHECK, I built ALL_BUILD. No errors, soI assume that means everything went OK. In `C:\Users\Never\Downloads\libgpuarray\lib\Debug` I now have the following files: gpuarray.dll, gpuarray.exp, gpuarray.ilk, gpuarray.lib, gpuarray.pdb, gpuarray-static.lib, and gpuarray-static.pdb Is this what I am suppose to have? – Never Nor Nov 24 '19 at 03:20
  • @NeverNor Yes, it sounds like everything built OK, glad it's working! Those same instructions explain install steps as well, so these libraries can be more easily accessible on your system when you use them with other software. – Kevin Nov 24 '19 at 04:36
  • @squareskittles I tried building all, but it resulted in 2 errors. I used VS 19 to build. please look at the output of build https://pastebin.com/VjbTVS9v. – lucifer Jun 08 '20 at 08:37
  • @lucifer This is a different error message than posted in the question here, so it would be best if you created a **new** question [post](https://stackoverflow.com/questions/ask) about this. The error message states you didn't install Python, so you should do that before proceeding. – Kevin Jun 08 '20 at 12:17