QMCPACK / miniqmc

QMCPACK miniapp: a simplified real space QMC code for algorithm development, performance portability testing, and computer science experiments
Other
26 stars 34 forks source link

[kokkos] Static assertion failure at build time on Summit #272

Open jhdavis8 opened 1 year ago

jhdavis8 commented 1 year ago

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 git@github.com:kokkos/kokkos.git
export KOKKOS_ROOT=<path to kokkos cloned above>
export CUDA_ROOT=/sw/summit/cuda/11.5.2
git clone git@github.com: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.

lshulen commented 1 year ago

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?

jhdavis8 commented 1 year ago

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.