Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix CMake find package output #28

Merged

Conversation

psychocrypt
Copy link
Collaborator

@psychocrypt psychocrypt commented Oct 8, 2017

fix #3

  • remove QUIET from find package for OpenCL and CUDA

  • remove pascal architecture from default CUDA_ARCH for CUDA < 8.0

  • remove sm_20 for CUDA >= 9.0

  • rebase against fix travis OSX build #29

Copy link
Owner

@fireice-uk fireice-uk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't fix the error. Output now:

~/github/xmr-stak/build$ rm -rf *
~/github/xmr-stak/build$ cmake ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found CUDA: /usr (found suitable version "7.5", minimum required is "7.5") 
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - found
-- Found OpenCL: /usr/lib/x86_64-linux-gnu/libOpenCL.so (found version "2.0") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.0.2g") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/fireice/github/xmr-stak/build
~/github/xmr-stak/build$ make
[  3%] Building NVCC (Device) object CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/nvcc_code/xmrstak_cuda_backend_generated_cuda_core.cu.o
nvcc fatal   : Unsupported gpu architecture 'compute_60'
CMake Error at xmrstak_cuda_backend_generated_cuda_core.cu.o.cmake:207 (message):
  Error generating
  /home/fireice/github/xmr-stak/build/CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/nvcc_code/./xmrstak_cuda_backend_generated_cuda_core.cu.o


CMakeFiles/xmrstak_cuda_backend.dir/build.make:70: recipe for target 'CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/nvcc_code/xmrstak_cuda_backend_generated_cuda_core.cu.o' failed
make[2]: *** [CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/nvcc_code/xmrstak_cuda_backend_generated_cuda_core.cu.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/xmrstak_cuda_backend.dir/all' failed
make[1]: *** [CMakeFiles/xmrstak_cuda_backend.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

@psychocrypt
Copy link
Collaborator Author

psychocrypt commented Oct 10, 2017 via email

fix fireice-uk#3

- remove QUIET from find package for OpenCL and CUDA
- remove pascal architecture from default CUDA_ARCH for CUDA < 8.0
@psychocrypt psychocrypt force-pushed the fix-missingCUDAOpenCLCmakeOutput branch from 70eaebe to e52d04f Compare October 10, 2017 19:26
@psychocrypt
Copy link
Collaborator Author

Fxed my bug and tested it with CUDA 7.5 and CUDA 8.
I can't test CUDA 9, because I have currently no system with CUDA 9.

@anhphan
Copy link

anhphan commented Oct 11, 2017

Tested with cuda 9 on windows, before this, I always need compile with option: -DCUDA_ARCH=50;61

The CMake detect correctly cuda 9 and remove sm20

-- The C compiler identification is MSVC 19.0.24218.2
-- The CXX compiler identification is MSVC 19.0.24218.2
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.0 (found suitable version "9.0", minimum required is "7.5")
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - not found
-- Looking for CL_VERSION_1_2
-- Looking for CL_VERSION_1_2 - found
-- Found OpenCL: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.0/lib/x64/OpenCL.lib (found version "1.2")
-- Found OpenSSL: C:/xmr-stak-dep/openssl/lib/libeay32.lib (found version "1.0.2l")
-- Configuring done
-- Generating done
-- Build files have been written to: E:/test/xmr-stak/build

@fireice-uk fireice-uk self-requested a review October 11, 2017 15:24
Copy link
Owner

@fireice-uk fireice-uk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The compile still fails, but we are making progress. I googled for a fix and adding add_definitions(-D_MWAITXINTRIN_H_INCLUDED) seems to fix the problem.

/usr/lib/gcc/x86_64-linux-gnu/5/include/mwaitxintrin.h(36): error: identifier "__builtin_ia32_monitorx" is undefined

/usr/lib/gcc/x86_64-linux-gnu/5/include/mwaitxintrin.h(42): error: identifier "__builtin_ia32_mwaitx" is undefined

2 errors detected in the compilation of "/tmp/tmpxft_00007a1d_00000000-22_cuda_extra.compute_20.cpp1.ii".
CMake Error at xmrstak_cuda_backend_generated_cuda_extra.cu.o.cmake:266 (message):
  Error generating file
  /home/fireice/github/xmr-stak/build/CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/nvcc_code/./xmrstak_cuda_backend_generated_cuda_extra.cu.o

Can you make sure if that flag needs to be targeted at GCC or not.

@psychocrypt
Copy link
Collaborator Author

psychocrypt commented Oct 11, 2017 via email

@psychocrypt
Copy link
Collaborator Author

psychocrypt commented Oct 11, 2017

@fireice-uk could you please merge this PR, the issue you described is independent from the CMake changes within this PR.
I will open a new PR to fix the compiling issue with CUDA 7.5.

@psychocrypt
Copy link
Collaborator Author

psychocrypt commented Oct 11, 2017

@fireice-uk I opened an issue #34 for the cuda 7.5 bug and fixed it in #35

@fireice-uk fireice-uk merged commit fa55183 into fireice-uk:dev Oct 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants