eth-cscs / SpFFT

Sparse 3D FFT library with MPI, OpenMP, CUDA and ROCm support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building SpFFT with Intel 18.0.5 fails

mkrack opened this issue · comments

While newer Intel compiler versions (19.1.x and 2021.x) are building SpFFT without problem, the older version
icpc version 18.0.5 (gcc version 9.3.0 compatibility)
returns the following error:

cd /data/user/krack/software/SpFFT-1.0.3/build-cpu/src && /opt/psi/Programming/intel/18.4/compilers_and_libraries_2018.5.274/linux/mpi/intel64/bin/mpiicpc  -I/data/user/krack/software/SpFFT-1.0.3/ext -I/data/user/krack/software/SpFFT-1.0.3/include -I/data/user/krack/software/SpFFT-1.0.3/src -I/data/user/krack/software/SpFFT-1.0.3/build-cpu -isystem /opt/psi/Programming/intel/18.4/compilers_and_libraries_2018.5.274/linux/mkl/include -isystem /opt/psi/Programming/intel/18.4/compilers_and_libraries_2018.5.274/linux/mkl/include/fftw -O2 -fPIC -fopenmp -fp-model precise -funroll-loops -g -traceback -xHost -fvisibility=hidden -qopenmp -std=gnu++11 -MD -MT src/CMakeFiles/spfft.dir/execution/execution_host.cpp.o -MF CMakeFiles/spfft.dir/execution/execution_host.cpp.o.d -o CMakeFiles/spfft.dir/execution/execution_host.cpp.o -c /data/user/krack/software/SpFFT-1.0.3/src/execution/execution_host.cpp
/afs/psi.ch/sys/psi.merlin/Programming/gcc/9.3.0/bin/../include/c++/9.3.0/ext/new_allocator.h(146): error: function "std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2> &) [with _T1=const std::tuple<bool, int, int>, _T2=spfft::FFTWPlan<double>]" (declared at line 303 of "/afs/psi.ch/sys/psi.merlin/Programming/gcc/9.3.0/bin/../include/c++/9.3.0/bits/stl_pair.h") cannot be referenced -- it is a deleted function
                            _Up(std::forward<_Args>(__args)...)))
                               ^
          detected during:
            instantiation of "void __gnu_cxx::new_allocator<_Tp>::construct(_Up *, _Args &&...) [with _Tp=std::__detail::_Hash_node<std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>>, true>, _Up=std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>>, _Args=<const std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>> &>]" at line 483 of "/afs/psi.ch/sys/psi.merlin/Programming/gcc/9.3.0/bin/../include/c++/9.3.0/bits/alloc_traits.h"
            instantiation of "void std::allocator_traits<std::allocator<_Tp>>::construct(std::allocator_traits<std::allocator<_Tp>>::allocator_type &, _Up *, _Args &&...) [with _Tp=std::__detail::_Hash_node<std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>>, true>, _Up=std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>>, _Args=<const std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>> &>]" at line 2088 of
                      "/afs/psi.ch/sys/psi.merlin/Programming/gcc/9.3.0/bin/../include/c++/9.3.0/bits/hashtable_policy.h"
            instantiation of "std::__detail::_Hashtable_alloc<_NodeAlloc>::__node_type *std::__detail::_Hashtable_alloc<_NodeAlloc>::_M_allocate_node(_Args &&...) [with _NodeAlloc=std::__alloc_rebind<std::allocator<std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>>>, std::__detail::_Hash_node<std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>>, true>>, _Args=<const std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>> &>]" at line 1243 of
                      "/afs/psi.ch/sys/psi.merlin/Programming/gcc/9.3.0/bin/../include/c++/9.3.0/bits/hashtable.h"
            instantiation of "std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::_Hashtable(const std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits> &) [with _Key=std::tuple<bool, int, int>, _Value=std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>>, _Alloc=std::allocator<std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>>>, _ExtractKey=std::__detail::_Select1st,
                      _Equal=std::equal_to<std::tuple<bool, int, int>>, _H1=spfft::FFTWPropHash, _H2=std::__detail::_Mod_range_hashing, _Hash=std::__detail::_Default_ranged_hash, _RehashPolicy=std::__detail::_Prime_rehash_policy, _Traits=std::__umap_traits<true>]" at line 75 of "/afs/psi.ch/sys/psi.merlin/Programming/gcc/9.3.0/bin/../include/c++/9.3.0/bits/stl_construct.h"
            instantiation of class "std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc> [with _Key=std::tuple<bool, int, int>, _Tp=spfft::FFTWPlan<double>, _Hash=spfft::FFTWPropHash, _Pred=std::equal_to<std::tuple<bool, int, int>>, _Alloc=std::allocator<std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>>>]" at line 75 of "/afs/psi.ch/sys/psi.merlin/Programming/gcc/9.3.0/bin/../include/c++/9.3.0/bits/stl_construct.h"
            [ 8 instantiation contexts not shown ]
            instantiation of "_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp> &) [with _InputIterator=const std::tuple<spfft::FlexibleFFTWPlan<double>, spfft::SizeType={unsigned long long}, spfft::SizeType={unsigned long long}> *, _ForwardIterator=std::tuple<spfft::FlexibleFFTWPlan<double>, spfft::SizeType={unsigned long long}, spfft::SizeType={unsigned long long}> *, _Tp=std::tuple<spfft::FlexibleFFTWPlan<double>,
                      spfft::SizeType={unsigned long long}, spfft::SizeType={unsigned long long}>]" at line 1512 of "/afs/psi.ch/sys/psi.merlin/Programming/gcc/9.3.0/bin/../include/c++/9.3.0/bits/stl_vector.h"
            instantiation of "std::vector<_Tp, _Alloc>::pointer std::vector<_Tp, _Alloc>::_M_allocate_and_copy(std::vector<_Tp, _Alloc>::size_type={std::size_t={unsigned long}}, _ForwardIterator, _ForwardIterator) [with _Tp=std::tuple<spfft::FlexibleFFTWPlan<double>, spfft::SizeType={unsigned long long}, spfft::SizeType={unsigned long long}>, _Alloc=std::allocator<std::tuple<spfft::FlexibleFFTWPlan<double>, spfft::SizeType={unsigned long long}, spfft::SizeType={unsigned long long}>>,
                      _ForwardIterator=const std::tuple<spfft::FlexibleFFTWPlan<double>, spfft::SizeType={unsigned long long}, spfft::SizeType={unsigned long long}> *]" at line 87 of "/afs/psi.ch/sys/psi.merlin/Programming/gcc/9.3.0/bin/../include/c++/9.3.0/bits/vector.tcc"
            instantiation of "void std::vector<_Tp, _Alloc>::reserve(std::vector<_Tp, _Alloc>::size_type={std::size_t={unsigned long}}) [with _Tp=std::tuple<spfft::FlexibleFFTWPlan<double>, spfft::SizeType={unsigned long long}, spfft::SizeType={unsigned long long}>, _Alloc=std::allocator<std::tuple<spfft::FlexibleFFTWPlan<double>, spfft::SizeType={unsigned long long}, spfft::SizeType={unsigned long long}>>]" at line 105 of "/data/user/krack/software/SpFFT-1.0.3/src/fft/transform_1d_host.hpp"
            instantiation of "spfft::Transform1DPlanesHost<T>::Transform1DPlanesHost(spfft::HostArrayView3D<spfft::Transform1DPlanesHost<T>::ComplexType>, spfft::HostArrayView3D<spfft::Transform1DPlanesHost<T>::ComplexType>, bool, bool, int, int) [with T=double]" at line 77 of "/data/user/krack/software/SpFFT-1.0.3/src/execution/execution_host.cpp"
            instantiation of "spfft::ExecutionHost<T>::ExecutionHost(int, std::shared_ptr<spfft::Parameters>, spfft::HostArray<std::complex<T>> &, spfft::HostArray<std::complex<T>> &) [with T=double]" at line 360 of "/data/user/krack/software/SpFFT-1.0.3/src/execution/execution_host.cpp"

/afs/psi.ch/sys/psi.merlin/Programming/gcc/9.3.0/bin/../include/c++/9.3.0/ext/new_allocator.h(147): error: function "std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2> &) [with _T1=const std::tuple<bool, int, int>, _T2=spfft::FFTWPlan<double>]" (declared at line 303 of "/afs/psi.ch/sys/psi.merlin/Programming/gcc/9.3.0/bin/../include/c++/9.3.0/bits/stl_pair.h") cannot be referenced -- it is a deleted function
        { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
                                ^
          detected during:
            instantiation of "void __gnu_cxx::new_allocator<_Tp>::construct(_Up *, _Args &&...) [with _Tp=std::__detail::_Hash_node<std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>>, true>, _Up=std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>>, _Args=<const std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>> &>]" at line 484 of "/afs/psi.ch/sys/psi.merlin/Programming/gcc/9.3.0/bin/../include/c++/9.3.0/bits/alloc_traits.h"
            instantiation of "void std::allocator_traits<std::allocator<_Tp>>::construct(std::allocator_traits<std::allocator<_Tp>>::allocator_type &, _Up *, _Args &&...) [with _Tp=std::__detail::_Hash_node<std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>>, true>, _Up=std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>>, _Args=<const std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>> &>]" at line 2088 of
                      "/afs/psi.ch/sys/psi.merlin/Programming/gcc/9.3.0/bin/../include/c++/9.3.0/bits/hashtable_policy.h"
            instantiation of "std::__detail::_Hashtable_alloc<_NodeAlloc>::__node_type *std::__detail::_Hashtable_alloc<_NodeAlloc>::_M_allocate_node(_Args &&...) [with _NodeAlloc=std::__alloc_rebind<std::allocator<std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>>>, std::__detail::_Hash_node<std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>>, true>>, _Args=<const std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>> &>]" at line 1243 of
                      "/afs/psi.ch/sys/psi.merlin/Programming/gcc/9.3.0/bin/../include/c++/9.3.0/bits/hashtable.h"
            instantiation of "std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::_Hashtable(const std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits> &) [with _Key=std::tuple<bool, int, int>, _Value=std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>>, _Alloc=std::allocator<std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>>>, _ExtractKey=std::__detail::_Select1st,
                      _Equal=std::equal_to<std::tuple<bool, int, int>>, _H1=spfft::FFTWPropHash, _H2=std::__detail::_Mod_range_hashing, _Hash=std::__detail::_Default_ranged_hash, _RehashPolicy=std::__detail::_Prime_rehash_policy, _Traits=std::__umap_traits<true>]" at line 75 of "/afs/psi.ch/sys/psi.merlin/Programming/gcc/9.3.0/bin/../include/c++/9.3.0/bits/stl_construct.h"
            instantiation of class "std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc> [with _Key=std::tuple<bool, int, int>, _Tp=spfft::FFTWPlan<double>, _Hash=spfft::FFTWPropHash, _Pred=std::equal_to<std::tuple<bool, int, int>>, _Alloc=std::allocator<std::pair<const std::tuple<bool, int, int>, spfft::FFTWPlan<double>>>]" at line 75 of "/afs/psi.ch/sys/psi.merlin/Programming/gcc/9.3.0/bin/../include/c++/9.3.0/bits/stl_construct.h"
            [ 8 instantiation contexts not shown ]
            instantiation of "_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp> &) [with _InputIterator=const std::tuple<spfft::FlexibleFFTWPlan<double>, spfft::SizeType={unsigned long long}, spfft::SizeType={unsigned long long}> *, _ForwardIterator=std::tuple<spfft::FlexibleFFTWPlan<double>, spfft::SizeType={unsigned long long}, spfft::SizeType={unsigned long long}> *, _Tp=std::tuple<spfft::FlexibleFFTWPlan<double>,
                      spfft::SizeType={unsigned long long}, spfft::SizeType={unsigned long long}>]" at line 1512 of "/afs/psi.ch/sys/psi.merlin/Programming/gcc/9.3.0/bin/../include/c++/9.3.0/bits/stl_vector.h"
            instantiation of "std::vector<_Tp, _Alloc>::pointer std::vector<_Tp, _Alloc>::_M_allocate_and_copy(std::vector<_Tp, _Alloc>::size_type={std::size_t={unsigned long}}, _ForwardIterator, _ForwardIterator) [with _Tp=std::tuple<spfft::FlexibleFFTWPlan<double>, spfft::SizeType={unsigned long long}, spfft::SizeType={unsigned long long}>, _Alloc=std::allocator<std::tuple<spfft::FlexibleFFTWPlan<double>, spfft::SizeType={unsigned long long}, spfft::SizeType={unsigned long long}>>,
                      _ForwardIterator=const std::tuple<spfft::FlexibleFFTWPlan<double>, spfft::SizeType={unsigned long long}, spfft::SizeType={unsigned long long}> *]" at line 87 of "/afs/psi.ch/sys/psi.merlin/Programming/gcc/9.3.0/bin/../include/c++/9.3.0/bits/vector.tcc"
            instantiation of "void std::vector<_Tp, _Alloc>::reserve(std::vector<_Tp, _Alloc>::size_type={std::size_t={unsigned long}}) [with _Tp=std::tuple<spfft::FlexibleFFTWPlan<double>, spfft::SizeType={unsigned long long}, spfft::SizeType={unsigned long long}>, _Alloc=std::allocator<std::tuple<spfft::FlexibleFFTWPlan<double>, spfft::SizeType={unsigned long long}, spfft::SizeType={unsigned long long}>>]" at line 105 of "/data/user/krack/software/SpFFT-1.0.3/src/fft/transform_1d_host.hpp"
            instantiation of "spfft::Transform1DPlanesHost<T>::Transform1DPlanesHost(spfft::HostArrayView3D<spfft::Transform1DPlanesHost<T>::ComplexType>, spfft::HostArrayView3D<spfft::Transform1DPlanesHost<T>::ComplexType>, bool, bool, int, int) [with T=double]" at line 77 of "/data/user/krack/software/SpFFT-1.0.3/src/execution/execution_host.cpp"
            instantiation of "spfft::ExecutionHost<T>::ExecutionHost(int, std::shared_ptr<spfft::Parameters>, spfft::HostArray<std::complex<T>> &, spfft::HostArray<std::complex<T>> &) [with T=double]" at line 360 of "/data/user/krack/software/SpFFT-1.0.3/src/execution/execution_host.cpp"

compilation aborted for /data/user/krack/software/SpFFT-1.0.3/src/execution/execution_host.cpp (code 2)
make[2]: *** [src/CMakeFiles/spfft.dir/execution/execution_host.cpp.o] Error 2
make[2]: Leaving directory `/data/user/krack/software/SpFFT-1.0.3/build-cpu'
make[1]: *** [src/CMakeFiles/spfft.dir/all] Error 2
make[1]: Leaving directory `/data/user/krack/software/SpFFT-1.0.3/build-cpu'
make: *** [all] Error 2

Is that a compiler bug?

Yes, this does look like a compiler bug. For some reason it tries to use to copy constructor instead of the move constructor. Not sure why this is happening, so you may have to use a different compiler version. Alternatively, the code that seems to be the issue was added in version 1.0.0, so you could try version 0.9.13.
The latest SIRIUS release has a higher version requirement, but it should also work with 0.9.13. You have to edit this line however, to make it work: https://github.com/electronic-structure/SIRIUS/blob/v7.2.5/CMakeLists.txt#L138

Downgrading to SpFFT version 0.9.13 is not an option, because the CP2K regression tester using the Intel compilers have to stay up-to-date with the current CP2K trunk version. So, I can drop the testing of SIRIUS including all its dependencies for Intel, or I have to retire the Intel 18.0.5 regression tester. I think the latter option is the better one. Maybe, you could add warning when a build with a buggy Intel compiler version is attempted.