QMCPACK / qmcpack

Main repository for QMCPACK, an open-source production level many-body ab initio Quantum Monte Carlo code for computing the electronic structure of atoms, molecules, and solids with full performance portable GPU support
http://www.qmcpack.org
Other
283 stars 135 forks source link

qmcpack-3.17.1/src/AFQMC/Walkers/WalkerSetBase.h(51): error: incomplete type is not allowed #5041

Open vvp-nsk opened 3 weeks ago

vvp-nsk commented 3 weeks ago

Describe the bug Cannot compile QMCPACK v3.17.1 using Intel's compiler suite

To Reproduce

  1. Fetch vanilla version 3.17.1
  2. cmake -DQMC_COMPLEX=1 -DBUILD_AFQMC=ON -DCMAKE_C_COMPILER=mpiicc -DCMAKE_CXX_COMPILER=mpiicpc
  3. make

Error message

qmcpack-3.17.1/src/AFQMC/Walkers/WalkerSetBase.h(51): error: incomplete type is not allowed
    inline static const TimerNameList_t<WalkerSetBaseTimers> WalkerSetBaseTimerNames =
                                                             ^
          detected during:
            instantiation of class "qmcplusplus::afqmc::WalkerSetBase<Alloc, Ptr> [with Alloc=qmcplusplus::afqmc::shared_allocator<qmcplusplus::afqmc::SPComplexType>, Ptr=qmcplusplus::afqmc::ComplexType *]" at line 107
            instantiation of "qmcplusplus::afqmc::WalkerSetBase<Alloc, Ptr>::WalkerSetBase(qmcplusplus::afqmc::TaskGroup_ &, xmlNodePtr, qmcplusplus::afqmc::AFQMCInfo &, qmcplusplus::RandomBase<double> &, qmcplusplus::afqmc::WalkerSetBase<Alloc, Ptr>::Allocator, qmcplusplus::afqmc::WalkerSetBase<Alloc, Ptr>::BPAllocator) [with Alloc=qmcplusplus::afqmc::shared_allocator<qmcplusplus::afqmc::SPComplexType>, Ptr=qmcplusplus::afqmc::ComplexType *]" at line 47 of
                      "qmcpack-3.17.1/src/AFQMC/Walkers/SharedWalkerSet.hpp"

qmcpack-3.17.1/src/AFQMC/Walkers/WalkerSetBase.h(51): error: incomplete type is not allowed
    inline static const TimerNameList_t<WalkerSetBaseTimers> WalkerSetBaseTimerNames =
                                                             ^
          detected during:
            instantiation of class "qmcplusplus::afqmc::WalkerSetBase<Alloc, Ptr> [with Alloc=qmcplusplus::afqmc::device_allocator<qmcplusplus::afqmc::ComplexType>, Ptr=qmcplusplus::afqmc::device_ptr<qmcplusplus::afqmc::ComplexType>]" at line 107
            instantiation of "qmcplusplus::afqmc::WalkerSetBase<Alloc, Ptr>::WalkerSetBase(qmcplusplus::afqmc::TaskGroup_ &, xmlNodePtr, qmcplusplus::afqmc::AFQMCInfo &, qmcplusplus::RandomBase<double> &, qmcplusplus::afqmc::WalkerSetBase<Alloc, Ptr>::Allocator, qmcplusplus::afqmc::WalkerSetBase<Alloc, Ptr>::BPAllocator) [with Alloc=qmcplusplus::afqmc::device_allocator<qmcplusplus::afqmc::ComplexType>, Ptr=qmcplusplus::afqmc::device_ptr<qmcplusplus::afqmc::ComplexType>]" at line 48 of
                      "qmcpack-3.17.1/src/AFQMC/Walkers/SerialWalkerSet.hpp"

System:

vvp-nsk commented 3 weeks ago

Just an update. There is no problem to compile v3.16.0 using the same compiler toolchain and libs.

ye-luo commented 3 weeks ago

Are you sure "mpiicc" and "mpiicpc" are GCC? They seem to be intel classic compiler. gcc 11.4 + MKL seems happy on my laptop. I guess that is an issue of an outdated compiler.

vvp-nsk commented 3 weeks ago
%mpiicc  -show
icc -I"/software/sse2/...
%icc -V
Intel(R) C Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.9.0 Build 20230302_000000
Copyright (C) 1985-2023 Intel Corporation.  All rights reserved
%mpicxx -show
icpc -I"/software/sse2/...
%icpc -V
Intel(R) C++ Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.9.0 Build 20230302_000000
Copyright (C) 1985-2023 Intel Corporation.  All rights reserved.

Is v2023 really outdated? And yes, GCC builds v3.17.1 w/o any problem.

Best, Victor