Skip to content

Build Failure in poisson_shell: Missing PICKUP_BENCHMARK macro and Linker errors (Kokkos) #5

Description

@youyoulyz

Hi,

I am trying to compile the benchmark in the poisson_shell directory, but I am encountering build failures due to an incomplete CMakeLists.txt.

There are two main issues:

  1. Missing Macro Definition: The CMakeLists.txt directly calls PICKUP_BENCHMARK without including the defining .cmake file, leading to an "Unknown CMake command" error.
  2. Linker Errors: Even when the macro is manually included or fixed, the target fails to link against Kokkos (and likely deal.II libraries), resulting in undefined references.

Steps to Reproduce:

  1. Navigate to poisson_shell (or poisson_cube).
  2. Run CMake:
cmake -D DEAL_II_DIR=/usr/include/dealii -D CMAKE_BUILD_TYPE=Release .
  1. Run Make:
make

Error Logs:

1. CMake Configuration Error:

CMake Error at CMakeLists.txt:1 (PICKUP_BENCHMARK):
  Unknown CMake command "PICKUP_BENCHMARK".

2. Linker Error (after attempting to build):

[100%] Linking CXX executable bench
/usr/bin/ld: CMakeFiles/poisson_shell.dir/program.cc.o: in function `Kokkos::RangePolicy<Kokkos::Serial, Kokkos::IndexType<unsigned int> >::check_bounds_validity()':
program.cc:(...): undefined reference to `Kokkos::Impl::log_warning(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: CMakeFiles/poisson_shell.dir/program.cc.o: in function `void dealii::internal::set_initial_guess<float, dealii::MemorySpace::Host>(dealii::LinearAlgebra::distributed::Vector<float, dealii::MemorySpace::Host>&)':
program.cc:(...): undefined reference to `Kokkos::Serial::Serial()'
collect2: error: ld returned 1 exit status

Environment:

  • OS: Linux (Ubuntu)
  • Compiler: GNU 13.3.0
  • deal.II Version: 9.7.1 installed at /usr/include/dealii

Sorry for the disturbulance.
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions