Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlockConjugateGradient.h fails to compile with gcc-9.1.0 #373

Open
detar opened this issue Oct 20, 2021 · 0 comments
Open

BlockConjugateGradient.h fails to compile with gcc-9.1.0 #373

detar opened this issue Oct 20, 2021 · 0 comments

Comments

@detar
Copy link

detar commented Oct 20, 2021

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&, Eigen::MatrixXcd&, const Grid::Lattice&, const Grid::Lattice<vob
j>&, int, Grid::RealD) [with vobj = Grid::iScalar<Grid::iScalar<Grid::iVector<Grid::Grid_simd<thrust::comp
lex, Grid::GpuVector<8, Grid::GpuComplex > >, 3> > >; Eigen::MatrixXcd = Eigen::Matrix<std:
:complex, -1, -1>; Grid::RealD = double]':
../Grid/install-grid-gpu-cuda/include/Grid/algorithms/iterative/BlockConjugateGradient.h:256:16: require
d from 'void Grid::BlockConjugateGradient::BlockCGrQsolve(Grid::LinearOperatorBase&, const F
ield&, Field&) [with Field = Grid::Lattice<Grid::iScalar<Grid::iScalar<Grid::iVector<Grid::Grid_simd<thrus
t::complex, Grid::GpuVector<8, Grid::GpuComplex > >, 3> > > >]'
../Grid/install-grid-gpu-cuda/include/Grid/algorithms/iterative/BlockConjugateGradient.h:130:1: required
from 'void Grid::BlockConjugateGradient::operator()(Grid::LinearOperatorBase&, const Field&
, Field&) [with Field = Grid::Lattice<Grid::iScalar<Grid::iScalar<Grid::iVector<Grid::Grid_simd<thrust::co
mplex, Grid::GpuVector<8, Grid::GpuComplex > >, 3> > > >]'
../Grid/install-grid-gpu-cuda/include/Grid/algorithms/iterative/BlockConjugateGradient.h:127:6: required
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, Grid::GpuVector<8, Grid::GpuComplex > >,
3> > > >, Grid::iScalar<Grid::iScalar<Grid::iVector<Grid::Grid_simd<thrust::complex, Grid::GpuVecto
r<8, Grid::GpuComplex > >, 3> > > >::value_type' {aka 'Grid::iScalar<Grid::iScalar<Grid::iVector<G
rid::Grid_simd<thrust::complex, Grid::GpuVector<8, Grid::GpuComplex > >, 3> > >'} and 'std:
:complex')
643 | thread_for_collapse_in_region(2, n,nblock, {
|


^
../Grid/install-grid-gpu-cuda/include/Grid/tensors/Tensor_arith_scalar.h:39:40: note: candidate: 'Grid::iS
calar Grid::operator*(const Grid::iScalar&, typename Grid::iScalar::scalar_type) [with l = Grid::
iScalar<Grid::iVector<Grid::Grid_simd<thrust::complex, Grid::GpuVector<8, Grid::GpuComplex \

, 3> >; typename Grid::iScalar::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 Grid::operator*(const Grid::iScalar&, 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::scalar_type, thrust::complex >::value), int>
::type = 0; Grid::ComplexD = thrust::complex]'
113 | accelerator_inline iScalar operator * (const iScalar& lhs,ComplexD rhs)
| ^~~~~~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant