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

Errors Compiling Examples with CUDA Backend (Nvidia Geforce GTX 2080 Ti, Cuda 12.0) #249

Open
AXIHIXA opened this issue Feb 27, 2023 · 6 comments

Comments

@AXIHIXA
Copy link

AXIHIXA commented Feb 27, 2023

Hi Demidov,
Thanks for this awesome repo, I was trying to build the examples with Cuda backend, in the root directory with command

cmake -DCMAKE_BUILD_TYPE=Release -DAMGCL_BUILD_TESTS=ON -DAMGCL_BUILD_EXAMPLES=ON
make

and got the following error:

...
[ 49%] Building NVCC (Device) object examples/CMakeFiles/solver_cuda.dir/solver_cuda_generated_solver.cu.o
nvcc fatal   : Unsupported gpu architecture 'compute_30'
CMake Error at solver_cuda_generated_solver.cu.o.Release.cmake:220 (message):
  Error generating
  .../amgcl-1.4.3/examples/CMakeFiles/solver_cuda.dir//./solver_cuda_generated_solver.cu.o


make[2]: *** [examples/CMakeFiles/solver_cuda.dir/build.make:77: examples/CMakeFiles/solver_cuda.dir/solver_cuda_generated_solver.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1243: examples/CMakeFiles/solver_cuda.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

As a reference, I am compiling the latest amgcl (version 1.4.3) on the ubuntu 20.04 platform with a Geforce 2080 Ti GPU, the installed Nvidia driver version is 525.85.12 (Cuda version 12.0). Do you have any ideas on this error? Thanks:)

@ddemidov
Copy link
Owner

ddemidov commented Feb 28, 2023

If you look up "Geforce 2080 Ti architecture", it yields "Turing". So I would try to configure amgcl with (the option is defined here):

cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DAMGCL_BUILD_TESTS=ON \
    -DAMGCL_BUILD_EXAMPLES=ON \
    -DCUDA_TARGET_ARCH="Turing"

@AXIHIXA AXIHIXA changed the title nvcc fatal : Unsupported gpu architecture 'compute_30' Errors Compiling Examples with CUDA backend (Nvidia Geforce GRX 2080 Ti, Cuda 12.0) Feb 28, 2023
@AXIHIXA AXIHIXA changed the title Errors Compiling Examples with CUDA backend (Nvidia Geforce GRX 2080 Ti, Cuda 12.0) Errors Compiling Examples with CUDA backend (Nvidia Geforce GTX 2080 Ti, Cuda 12.0) Feb 28, 2023
@AXIHIXA AXIHIXA changed the title Errors Compiling Examples with CUDA backend (Nvidia Geforce GTX 2080 Ti, Cuda 12.0) Errors Compiling Examples with CUDA Backend (Nvidia Geforce GTX 2080 Ti, Cuda 12.0) Feb 28, 2023
@AXIHIXA
Copy link
Author

AXIHIXA commented Feb 28, 2023

Hi mate, thanks for your swift response, I am running into another weird error that says that the libcusparse stuff is undefined, though I have checked the CMakeLists.txt and I'm sure it is linked to the targets properly:( Again, any idea on this issue is greatly appreciated:)

[ 49%] Building NVCC (Device) object examples/CMakeFiles/solver_cuda.dir/solver_cuda_generated_solver.cu.o

.../amgcl-1.4.3/amgcl/backend/cuda.hpp(123): error: identifier "csrsv2Info_t" is undefined

.../amgcl-1.4.3/amgcl/backend/cuda.hpp(124): error: identifier "cusparseDestroyCsrsv2Info" is undefined

.../amgcl-1.4.3/amgcl/backend/cuda.hpp(161): error: identifier "CUSPARSE_ALG_MERGE_PATH" is undefined

.../amgcl-1.4.3/amgcl/relaxation/cusparse_ilu0.hpp(278): error: identifier "csrsv2Info_t" is undefined

.../amgcl-1.4.3/amgcl/relaxation/cusparse_ilu0.hpp(278): error: nontype "std::remove_pointer<_Tp>::type [with _Tp=<error-type>]" is not a type name

.../amgcl-1.4.3/amgcl/relaxation/cusparse_ilu0.hpp(363): error: identifier "csrsv2Info_t" is undefined

.../amgcl-1.4.3/amgcl/relaxation/cusparse_ilu0.hpp(381): error: identifier "csrsv2Info_t" is undefined

.../amgcl-1.4.3/amgcl/relaxation/cusparse_ilu0.hpp(435): error: identifier "csrsv2Info_t" is undefined

.../amgcl-1.4.3/amgcl/relaxation/cusparse_ilu0.hpp(454): error: identifier "csrsv2Info_t" is undefined

.../amgcl-1.4.3/amgcl/relaxation/cusparse_ilu0.hpp(508): error: identifier "csrsv2Info_t" is undefined

.../amgcl-1.4.3/amgcl/relaxation/cusparse_ilu0.hpp(531): error: identifier "csrsv2Info_t" is undefined

.../amgcl-1.4.3/amgcl/relaxation/cusparse_ilu0.hpp(120): error: identifier "csrsv2Info_t" is undefined

.../amgcl-1.4.3/amgcl/relaxation/cusparse_ilu0.hpp(121): error: identifier "cusparseCreateCsrsv2Info" is undefined

.../amgcl-1.4.3/amgcl/relaxation/cusparse_ilu0.hpp(125): error: identifier "csrsv2Info_t" is undefined

.../amgcl-1.4.3/amgcl/relaxation/cusparse_ilu0.hpp(126): error: identifier "cusparseCreateCsrsv2Info" is undefined

.../amgcl-1.4.3/amgcl/relaxation/cusparse_ilu0.hpp(367): error: identifier "cusparseDcsrsv2_bufferSize" is undefined

.../amgcl-1.4.3/amgcl/relaxation/cusparse_ilu0.hpp(385): error: identifier "cusparseScsrsv2_bufferSize" is undefined

.../amgcl-1.4.3/amgcl/relaxation/cusparse_ilu0.hpp(440): error: identifier "cusparseDcsrsv2_analysis" is undefined

.../amgcl-1.4.3/amgcl/relaxation/cusparse_ilu0.hpp(459): error: identifier "cusparseScsrsv2_analysis" is undefined

.../amgcl-1.4.3/amgcl/relaxation/cusparse_ilu0.hpp(515): error: identifier "cusparseDcsrsv2_solve" is undefined

.../amgcl-1.4.3/amgcl/relaxation/cusparse_ilu0.hpp(538): error: identifier "cusparseScsrsv2_solve" is undefined

21 errors detected in the compilation of ".../amgcl-1.4.3/build/examples/solver.cu".

CMake Error at solver_cuda_generated_solver.cu.o.Release.cmake:280 (message):
  Error generating file
  .../amgcl-1.4.3/build/examples/CMakeFiles/solver_cuda.dir//./solver_cuda_generated_solver.cu.o

make[2]: *** [examples/CMakeFiles/solver_cuda.dir/build.make:77: examples/CMakeFiles/solver_cuda.dir/solver_cuda_generated_solver.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1243: examples/CMakeFiles/solver_cuda.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

@ddemidov
Copy link
Owner

I see a bunch of deprecation warnings when compiling with cuda-11. It is possible those got finally removed in cuda-12. I'll need to look at these some time soon. In the meanwhile, I guess the only option for you is to use cuda-11.

@ddemidov
Copy link
Owner

You could also try to use vexcl backend with cuda (make solver_vexcl_cuda).

@AXIHIXA
Copy link
Author

AXIHIXA commented Feb 28, 2023

Thanks, man, I'll try vexcl cuda then.

@ddemidov ddemidov mentioned this issue Mar 1, 2023
@ddemidov
Copy link
Owner

ddemidov commented Mar 1, 2023

@AXIHIXA , could you please check if #250 solves the compilation issues with CUDA 12?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants