ParRes / Kernels

This is a set of simple programs that can be used to explore the features of a parallel platform.
https://groups.google.com/forum/#!forum/parallel-research-kernels
Other
404 stars 106 forks source link

Kokkos kernels don't work under Kokkos version 4.3.0 #640

Open caschb opened 5 months ago

caschb commented 5 months ago

What type of issue is this?

If this is a bug report, please use the following template. Otherwise, please delete the rest of the template.

Where does this bug appear?

Check all that apply:

Operating system

What is the output of uname -a? Linux acer 6.8.2-arch2-1 #1 SMP PREEMPT_DYNAMIC Thu, 28 Mar 2024 17:06:35 +0000 x86_64 GNU/Linux

Compiler

What is the output of ${COMPILER} -v or ${COMPILER} --version? gcc-12 (GCC) 12.3.0

PRK build information

VERSION=-12
CC=gcc${VERSION} -std=c11 -pthread
FC=gfortran${VERSION} -std=f2018 -cpp -fexternal-blas -fblas-matmul-limit=0
CXX=g++${VERSION} -std=gnu++20 -pthread -fmax-errors=1
DEFAULT_OPT_FLAGS=-O3 -mtune=native -ffast-math
DEFAULT_OPT_FLAGS+=-g3
DEFAULT_OPT_FLAGS+=-Wall #-Werror
#
# OpenMP flags
#
OPENMPFLAG=-fopenmp
OPENMPSIMDFLAG=-fopenmp-simd
OFFLOADFLAG=-foffload="-O3 -v"
OFFLOADFLAG+=-DGPU_SCHEDULE=""
OPENACCFLAG=-fopenacc
# Linux
KOKKOSDIR=${HOME}/.install/kokkos
KOKKOSFLAG=-I${KOKKOSDIR}/include -L${KOKKOSDIR}/lib -lkokkoscore ${OPENMPFLAG}

Output showing problem

In file included from prk_kokkos.h:36,
                 from stencil-kokkos.cc:64:
/home/casch/.install/kokkos/include/Kokkos_Concepts.hpp:19:15: error: static assertion failed: Including non-public Kokkos header files is not allowed.
   19 | static_assert(false,
      |               ^~~~~
compilation terminated due to -fmax-errors=1.
make: *** [Makefile:255: stencil-kokkos] Error 1

Additionally, once you fix that you'll have the following error:

stencil-kokkos.cc: In lambda function:
stencil-kokkos.cc:212:37: error: ‘fabs’ has not been declared in ‘Kokkos::Experimental’
  212 |         using Kokkos::Experimental::fabs;
      |                                     ^~~~
make: *** [Makefile:255: stencil-kokkos] Error 1

And that's because of the following:

Math functions were removed from the Kokkos::Experimental:: namespace in version 4.3