Question about compiling with CUDA

75 views
Skip to first unread message

Justin O'Connor

unread,
Jul 27, 2023, 10:39:27 AM7/27/23
to deal.II User Group
Howdy!

I'm working on making a Dockerfile that will let me use deal.ii with CUDA. However, when I run make install, I get the following error:

Error: Internal Compiler Error (codegen): "casting aggregate to non-void type is not supported!"

make[2]: *** [source/fe/CMakeFiles/object_fe_debug.dir/build.make:713: source/fe/CMakeFiles/object_fe_debug.dir/fe_values.cc.o] Error 2
make[2]: *** Waiting for unfinished jobs....

I'm hoping this is a known issue and I'm just doing something silly. Any pointers would be greatly appreciated.

My Dockerfile is attached if that is of any use to anyone.

Thank you,
Justin

Dockerfile

Daniel Arndt

unread,
Jul 27, 2023, 12:58:58 PM7/27/23
to dea...@googlegroups.com
Justin,

a docker file that we are using in a different project can be found at https://github.com/arborx/ArborX/blob/master/docker/Dockerfile in case that helps.
In general, I would advise against using nvhpc/nvc++ which proves to be pretty buggy as compared to nvcc/nvcc_wrapper or even (clang++ which is another option for a compiler supporting CUDA).
Anyway, it seems the current configuration is using nvcc_wrapper. What does the failing compile-line look like? What is the host compiler (I guess g++ but which version)?

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/34846fa5-7a9e-4417-80c9-af54792844a9n%40googlegroups.com.

Justin O'Connor

unread,
Jul 28, 2023, 6:33:46 PM7/28/23
to deal.II User Group
I'm now just using your dockerfile (thanks for the tips on it), and I am trying to install deal.ii at the end.

Adding this to the end of it:
RUN apt update && apt install -y libblas-dev liblapack-dev

WORKDIR /opt
ENV DEALII_VERSION 9.5.1
RUN wget --no-verbose https://www.dealii.org/downloads/dealii-$DEALII_VERSION.tar.gz
RUN gunzip -c dealii-$DEALII_VERSION.tar.gz | tar -xof -
ENV DEALII_DIR /opt/dealii-$DEALII_VERSION
WORKDIR $DEALII_DIR
RUN pwd
RUN mkdir build
RUN mkdir dealii_installed
WORKDIR $DEALII_DIR/build
RUN cmake $DEALII_DIR -DCMAKE_INSTALL_PREFIX=opt/dealii_installed \
   -DCMAKE_CXX_COMPILER=clang++ \
   -DDEAL_II_WITH_TBB=ON \
   -DDEAL_II_WITH_MPI=ON \
   -DDEAL_II_MPI_WITH_DEVICE_SUPPORT=ON \
   -DDEAL_II_WITH_LAPACK=ON \
   -DDEAL_II_WITH_BLAS=ON \
   -DDEAL_II_WITH_64BIT_INDICES=ON \
   -DKOKKOS_DIR=$KOKKOS_DIR \
   -DDEAL_II_WITH_CUDA=ON

gives the attached error, still saying the compiler and linker flags are the issue?

short version:

CMake Error at cmake/setup_finalize.cmake:126 (message):
 

    Configuration error: Cannot compile a test program with the final set of
    compiler and linker flags:
      CXX flags (DEBUG): -openmp-simd -pthread -ffp-exception-behavior=strict -Og -ggdb -Wa,--compress-debug-sections
      LD flags  (DEBUG): -rdynamic  -pthread -fopenmp=libomp -ggdb -Wl,--compress-debug-sections=zlib
      LIBRARIES (DEBUG): dl;
   

 

Call Stack (most recent call first):
  cmake/macros/macro_verbose_include.cmake:19 (include)
  CMakeLists.txt:123 (verbose_include)


Thank you so much for all your help already,

Justin
dealii_install_error.txt

Justin O'Connor

unread,
Aug 7, 2023, 9:52:01 AM8/7/23
to deal.II User Group
For posterity, ere's a dockerfile I got working that installs deal.ii with cuda capability. :)

Thanks,
Justin
Dockerfile

Daniel Arndt

unread,
Aug 7, 2023, 10:47:56 AM8/7/23
to dea...@googlegroups.com
I'm glad you found something that is working for you!

Best,
Daniel

Reply all
Reply to author
Forward
0 new messages