miniqmc icon indicating copy to clipboard operation
miniqmc copied to clipboard

[kokkos] Static assertion failure at build time on Summit

Open jhdavis8 opened this issue 1 year ago • 2 comments

Attempting to build the Kokkos branch of miniqmc on OLCF Summit gives the following error:

/gpfs/alpine/csc452/proj-shared/perf_port_builds/kokkos/core/src/Kokkos_View.hpp(848): error: static assertion failed with ""
          detected during:
            instantiation of "void Kokkos::View<DataType, Properties...>::check_operator_parens_valid_args(Is...) [with DataType=qmcplusplus::QMCTraits::RealType, Properties=<Kokkos::Cuda::array_layout, Kokkos::Device<Kokkos::HostSpace\
::execution_space, Kokkos::Cuda::memory_space>, Kokkos::Experimental::DefaultViewHooks>, Is=<int>]" 
(993): here
            instantiation of "std::enable_if_t<<expression>, Kokkos::View<DataType, Properties...>::reference_type> Kokkos::View<DataType, Properties...>::operator()(Is...) const [with DataType=qmcplusplus::QMCTraits::RealType, Propert\
ies=<Kokkos::Cuda::array_layout, Kokkos::Device<Kokkos::HostSpace::execution_space, Kokkos::Cuda::memory_space>, Kokkos::Experimental::DefaultViewHooks>, Is=<int>]" 
/gpfs/alpine/csc452/proj-shared/perf_port_builds/miniqmc-collection/miniqmc-kokkos/src/QMCWaveFunctions/Determinant.h(910): here
            instantiation of "void qmcplusplus::updateRow(ViewType, ArrayViewType, int, value_type, LinAlgHelperType &) [with ViewType=qmcplusplus::DiracDeterminant::MatType, ArrayViewType=Kokkos::View<qmcplusplus::QMCTraits::RealType \
*>, LinAlgHelperType=qmcplusplus::linalgHelper<qmcplusplus::QMCTraits::RealType, Kokkos::LayoutRight, Kokkos::Cuda::memory_space>, value_type=double]" 
/gpfs/alpine/csc452/proj-shared/perf_port_builds/miniqmc-collection/miniqmc-kokkos/src/QMCWaveFunctions/Determinant.h(1026): here

1 error detected in the compilation of "/gpfs/alpine/csc452/proj-shared/perf_port_builds/miniqmc-collection/miniqmc-kokkos/src/Drivers/check_determinant.cpp".

Here are the complete directions to reproduce:

module load gcc/11.2.0 cmake cuda/11.5.2 ninja openblas/0.3.17-omp
git clone [email protected]:kokkos/kokkos.git
export KOKKOS_ROOT=<path to kokkos cloned above>
export CUDA_ROOT=/sw/summit/cuda/11.5.2
git clone [email protected]:QMCPACK/miniqmc.git
cd miniqmc/build; git checkout kokkos
cmake -GNinja -DQMC_MPI=1 -DQMC_USE_KOKKOS=1 -DKOKKOS_PREFIX=${KOKKOS_ROOT} -DKokkos_ENABLE_CUDA=true -DKokkos_ENABLE_OPENMP=false -DKokkos_ARCH_POWER9=ON -DKokkos_ARCH_VOLTA70=ON -DKokkos_ENABLE_CUDA_UVM=true -DKokkos_ENABLE_CUDA_LAMBDA=true -DKokkos_ENABLE_EXPLICIT_INSTANTIATION=false -DCMAKE_CXX_COMPILER=${KOKKOS_ROOT}/bin/nvcc_wrapper -DCMAKE_CXX_FLAGS="-Drestrict=__restrict__ -D__forceinline=inline " ..
cmake --build .

This static assertion error seems to be a problem with the usage of Kokkos in miniqmc, but I can't exactly tell. Let me know if more information needed or if a different venue is preferable for discussing this problem.

jhdavis8 avatar Apr 05 '23 20:04 jhdavis8

The kokkos branch of miniqmc has not been developed for some time. I can verify that it worked as of 4 years ago, but it has not been kept up to date with more recent development of kokkos, or indeed compilers. Not sure what it would take to get it up to date. Can I inquire as to your interest in this branch?

lshulen avatar Apr 05 '23 21:04 lshulen

I'm working on a project to evaluate performance portability of mini-apps and applications that are implemented in multiple programming models across a range of hardware platforms. I was hoping to use miniqmc as one such mini-app, since it seems to have OpenMP, Kokkos, and CUDA implementations.

Good to know that hasn't been kept up to date. If getting it working isn't trivial then perhaps we'll look at other options, but I'll do some work to determine what needs to be done myself first.

jhdavis8 avatar Apr 06 '23 14:04 jhdavis8