Grid
Grid copied to clipboard
BlockConjugateGradient.h fails to compile with gcc-9.1.0
The operator() member calls Lattice_reduction.h - sliceMulMatrix which encounters an ambiguous overload of the operator* in Tensor_arith_scalar.h:
../Grid/install-grid-gpu-cuda/include/Grid/lattice/Lattice_reduction.h: In instantiation of 'void Grid::sl
iceMaddMatrix(Grid::Lattice
j>&, int, Grid::RealD) [with vobj = Grid::iScalar<Grid::iScalar<Grid::iVector<Grid::Grid_simd<thrust::comp
lex
:complex
d from 'void Grid::BlockConjugateGradient<Field>::BlockCGrQsolve(Grid::LinearOperatorBase<Field>&, const F
ield&, Field&) [with Field = Grid::Lattice<Grid::iScalar<Grid::iScalar<Grid::iVector<Grid::Grid_simd<thrus
t::complex
from 'void Grid::BlockConjugateGradient<Field>::operator()(Grid::LinearOperatorBase<Field>&, const Field&
, Field&) [with Field = Grid::Lattice<Grid::iScalar<Grid::iScalar<Grid::iVector<Grid::Grid_simd<thrust::co
mplex
from here
../Grid/install-grid-gpu-cuda/include/Grid/lattice/Lattice_reduction.h:643:315: error: ambiguous overload
for 'operator*' (operand types are '__gnu_cxx::__alloc_traits<Grid::uvmAllocator<Grid::iScalar<Grid::iScal
ar<Grid::iVector<Grid::Grid_simd<thrust::complex
3> > > >, Grid::iScalar<Grid::iScalar<Grid::iVector<Grid::Grid_simd<thrust::complex
r<8, Grid::GpuComplex
rid::Grid_simd<thrust::complex
:complex
^
../Grid/install-grid-gpu-cuda/include/Grid/tensors/Tensor_arith_scalar.h:39:40: note: candidate: 'Grid::iS
calar<T> Grid::operator*(const Grid::iScalar<T>&, typename Grid::iScalar<T>::scalar_type) [with l = Grid::
iScalar<Grid::iVector<Grid::Grid_simd<thrust::complex
, 3> >; typename Grid::iScalar<T>::scalar_type = thrust::complex
]' 39 | template accelerator_inline iScalar operator * (const iScalar & lhs,const typename i
Scalar::scalar_type rhs) | ^~~~~~~~ ../Grid/install-grid-gpu-cuda/include/Grid/tensors/Tensor_arith_scalar.h:113:1: note: candidate: 'Grid::iS
calar<T> Grid::operator*(const Grid::iScalar<T>&, Grid::ComplexD) [with l = Grid::iScalar<Grid::iVector<Gr
id::Grid_simd<thrust::complex, Grid::GpuVector<8, Grid::GpuComplex > >, 3> >; typename std:
:enable_if<(! std::is_same<typename Grid::iScalar<T>::scalar_type, thrust::complex>::value), int>
::type= 0; Grid::ComplexD = thrust::complex ]' 113 | accelerator_inline iScalar operator * (const iScalar & lhs,ComplexD rhs) | ^~~~~~~~