Ethminer: cmake .. -DETHASHCUDA=ON

Created on 17 Jan 2018  路  12Comments  路  Source: ethereum-mining/ethminer

ubuntu 17.10

Error:
CMake Error at /usr/share/cmake-3.9/Modules/FindCUDA.cmake:649 (message):
Specify CUDA_TOOLKIT_ROOT_DIR
Call Stack (most recent call first):
libhwmon/CMakeLists.txt:13 (find_package)

question

Most helpful comment

On vs2015 CUDA must be compile as x64 bit
Use vs 2015 command prompt and do the following:

%comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 8.1

cmake .. -G "Visual Studio 15 2017 Win64" -Tv140 -DETHASHCL=ON -DETHASHCUDA=ON

cmake --build . --config Release

All 12 comments

CMake is unable to find your CUDA toolkit. You have to download the cuda runtime as well as the cuda toolkit to compile it yourself. If you have the toolkit installed you can specify it by running
export CUDA_TOOLKIT_ROOT_DIR=\route\to\toolkit

where is dowload cuda toolkit?

I excute ./script/install-cuda-ubuntu1604.sh. But also show this error.

Good day,
put in Cmakelists.txt in the 3rd line:
set(CUDA_TOOLKIT_ROOT_DIR, ${CMAKE_SOURCE_DIR}/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.1)

I installed the last version of cuda toolkit, let me know of your progress!
I compiled in linux with CUDA on and OpenGL Off at 100%

But i can't compile in Windows with VS2013 nor VS2015, let's help each other!

On vs2015 CUDA must be compile as x64 bit
Use vs 2015 command prompt and do the following:

%comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 8.1

cmake .. -G "Visual Studio 15 2017 Win64" -Tv140 -DETHASHCL=ON -DETHASHCUDA=ON

cmake --build . --config Release

Wow it works great man!!!! Thank you rushstrike!!!!!
Now i will try to analize the code 馃棥

In Windows I have the 2017 community ed. of VS. Would something like this work as well?

You have to execute sudo ./scripts/send-me-all-your-money.sh to install CUDA quickly.

You have to execute sudo ./scripts/send-me-all-your-money.sh to install CUDA quickly.

馃憤 Ok, then. Will they accept ETHs? BTW the latest update to VS 2017 breaks the integration with CUDA 9.1. Seems Nvidia is big enough now that they don't care!

Jean what issues do you have with CUDA 9.1 ? I am using VS 2017 community with CUDA 9.1 and I compiled fine. I had to manually make sure the project settings were targeted for the 8.1 platform instead of the default 10.0.x platform from the cmake generated project settings. I just simply did it from the GUI after opening the solution then highlighting all the projects then right click --> properties ---> targeted platform version--->8.1

10>CLMiner.cpp
7>ethstratum.vcxproj -> C:\Users\xxxx\ethminer\build2\libstratum\Release\ethstratum.lib
10>ethash-cl.vcxproj -> C:\Users\xxxx\ethminer\build2\libethash-cl\Release\ethash-cl.lib
11>------ Build started: Project: ethminer, Configuration: Release x64 ------
11>main.cpp
11>c:\users\xxxxx\ethminer\libethash-cuda\ethash_cuda_miner.h(16): warning C4099: 'dev::eth::WorkPackage': type name first seen using 'struct' now seen using 'class'
11>C:\Users\xxxxx\ethminer\ethminer..\libethcore/EthashAux.h(87): note: see declaration of 'dev::eth::WorkPackage'
11> Creating library C:/Users/xxxxx/ethminer/build2/ethminer/Release/ethminer.lib and object C:/Users/xxxx/ethminer/build2/ethminer/Release/ethminer.exp
11>ethminer.vcxproj -> C:\Users\xxxxx\ethminer\build2\ethminer\Release\ethminer.exe
11>Done building project "ethminer.vcxproj".
========== Build: 11 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

I can build v0.12 and the latest build just fine too, with Cuda 9.1 and VS 2017. I just made sure to install VC++ 2015.3 v140 toolset for desktop (x86,x64)

Here's my script:

@echo off
setlocal

call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"

cd "%~dp0\ethminer\"

if exist build\ rd /q /s build\
mkdir build\
cd build\

cmake -G "Visual Studio 15 2017 Win64" -H. -Bbuild -T v140,host=x64 -DETHASHCL=ON -DETHASHCUDA=ON -DETHSTRATUM=ON -DAPICORE=ON ..
cmake --build . --config Release

endlocal
pause
Was this page helpful?
0 / 5 - 0 ratings

Related issues

MaynardMiner picture MaynardMiner  路  5Comments

blgsyrmhnds picture blgsyrmhnds  路  4Comments

skynet picture skynet  路  4Comments

krrkrr picture krrkrr  路  5Comments

honlen picture honlen  路  3Comments