Problem compiling deal.II with CUDA

79 views
Skip to first unread message

Sean Johnson

unread,
Apr 29, 2023, 1:46:44 PM4/29/23
to deal.II User Group
Hey everyone,

Sorry I have been working on this problem for a few day. I believe the problem is with the mating of deal.II and CUDA because after installing CUDA it passed all the post installation tests. The error mentions the atomicAdd() function for doubles which is only for compute capability 6.x+ according to CUDA and my gpu is 5.0 but deal.II says it only needs compute capability of 3.2+ so I figure the problem isn't that simple. Below is the error code and attached are the log files.

Thanks for any help ahead of time! And sorry if there is anything I missed to include as this is my first post on here. I will correct it as soon as I can when notified. Thank you again!

Building CUDA object source/lac/CMakeFiles/obj_lac_release.dir/cuda_kernels.cu.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
/home/sjohnson/Downloads/dealii-9.4.1/include/deal.II/lac/cuda_atomic.h(54): error: no instance of overloaded function "atomicAdd" matches the argument list
            argument types are: (double *, double)

/home/sjohnson/Downloads/dealii-9.4.1/include/deal.II/lac/cuda_kernels.templates.h(96): error: no instance of overloaded function "atomicAdd" matches the argument list
            argument types are: (double *, const double)
          detected during instantiation of "Number dealii::LinearAlgebra::CUDAWrappers::kernel::ElemSum<Number>::atomic_op(Number *, Number) [with Number=double]"
/home/sjohnson/Downloads/dealii-9.4.1/source/lac/cuda_kernels.cu(160): here

/home/sjohnson/Downloads/dealii-9.4.1/include/deal.II/lac/cuda_kernels.templates.h(132): error: no instance of overloaded function "atomicAdd" matches the argument list
            argument types are: (double *, const double)
          detected during instantiation of "Number dealii::LinearAlgebra::CUDAWrappers::kernel::L1Norm<Number>::atomic_op(Number *, Number) [with Number=double]"
/home/sjohnson/Downloads/dealii-9.4.1/source/lac/cuda_kernels.cu(161): here

/home/sjohnson/Downloads/dealii-9.4.1/include/deal.II/lac/cuda_kernels.templates.h(272): error: no instance of overloaded function "atomicAdd" matches the argument list
            argument types are: (double *, const double)
          detected during instantiation of "Number dealii::LinearAlgebra::CUDAWrappers::kernel::DotProduct<Number>::atomic_op(Number *, Number) [with Number=double]"
/home/sjohnson/Downloads/dealii-9.4.1/source/lac/cuda_kernels.cu(175): here

4 errors detected in the compilation of "/home/sjohnson/Downloads/dealii-9.4.1/source/lac/cuda_kernels.cu".
make[2]: *** [source/lac/CMakeFiles/obj_lac_release.dir/build.make:583: source/lac/CMakeFiles/obj_lac_release.dir/cuda_kernels.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3790: source/lac/CMakeFiles/obj_lac_release.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
detailed.log
summary.log

Daniel Arndt

unread,
May 1, 2023, 8:37:00 AM5/1/23
to dea...@googlegroups.com
Sean,

we removed the implementation for atomic add for doubles for nvcc < 8 and compute capability < 6 in https://github.com/dealii/dealii/pull/10298 (maybe in error). I would expect that you could the code in that pull request as a patch.

Best,
Daniel

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/eb4eb66d-b139-4d5e-b33b-859e9838a119n%40googlegroups.com.

Bruno Turcksin

unread,
May 1, 2023, 8:41:17 AM5/1/23
to deal.II User Group
Hello,

It looks like the documentation is not up to date. We do not support GPU your GPU, deal.II requires compute capability of at least 6.0. Sorry about that.

Best,

Bruno

Sean Johnson

unread,
May 3, 2023, 2:37:25 PM5/3/23
to deal.II User Group
Thanks! No problem with the documentation not being changed on the compute capability. With all the changes being made this is really just the smallest thing. Do I need to mark this solved or anything?

Bruno Turcksin

unread,
May 3, 2023, 3:41:10 PM5/3/23
to dea...@googlegroups.com
No, there is nothing to do.

Best,

Bruno

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/TUN-4PISsjQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/c9718683-32ed-48d3-9a85-643011d0f8e3n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages