Are you sure you've compiled PETSc in complex mode?

On Fri, Aug 16, 2013 at 8:54 AM, Jens Lohne Eftang <[email protected]>wrote:

> I'm using gcc 4.7
>
> I tried --with-clanguage=cxx for PETSc, but that did not resolve
> everything.
>
> Now I get another error message during libmesh compilation:
>
>
> CXX      src/numerics/libmesh_dbg_la-dense_matrix_blas_lapack.lo
> src/numerics/dense_matrix_blas_lapack.C: In instantiation of 'void
> libMesh::DenseMatrix<T>::_multiply_blas(const
> libMesh::DenseMatrixBase<T>&,
> libMesh::DenseMatrix<T>::_BLAS_Multiply_Flag) [with T = double]':
> src/numerics/dense_matrix_blas_lapack.C:760:98:   required from here
> src/numerics/dense_matrix_blas_lapack.C:174:3: error: cannot convert
> 'double*' to 'PetscScalar* {aka std::complex<double>*}' for argument '6'
> to 'void zgemm_(const char*, const char*, PetscBLASInt*, PetscBLASInt*,
> PetscBLASInt*, PetscScalar*, PetscScalar*, PetscBLASInt*, PetscScalar*,
> PetscBLASInt*, PetscScalar*, PetscScalar*, PetscBLASInt*)'
> src/numerics/dense_matrix_blas_lapack.C: In instantiation of 'void
> libMesh::DenseMatrix<T>::_lu_decompose_lapack() [with T = double]':
> src/numerics/dense_matrix_blas_lapack.C:761:55:   required from here
> src/numerics/dense_matrix_blas_lapack.C:260:3: error: cannot convert
> 'double*' to 'PetscScalar* {aka std::complex<double>*}' for argument '3'
> to 'void zgetrf_(PetscBLASInt*, PetscBLASInt*, PetscScalar*,
> PetscBLASInt*, PetscBLASInt*, PetscBLASInt*)'
> src/numerics/dense_matrix_blas_lapack.C: In instantiation of 'void
> libMesh::DenseMatrix<T>::_lu_back_substitute_lapack(const
> libMesh::DenseVector<T>&, libMesh::DenseVector<T>&) [with T = double]':
> src/numerics/dense_matrix_blas_lapack.C:763:30:   required from here
> src/numerics/dense_matrix_blas_lapack.C:592:3: error: cannot convert
> 'double*' to 'PetscScalar* {aka std::complex<double>*}' for argument '4'
> to 'void zgetrs_(const char*, PetscBLASInt*, PetscBLASInt*,
> PetscScalar*, PetscBLASInt*, PetscBLASInt*, PetscScalar*, PetscBLASInt*,
> PetscBLASInt*)'
> src/numerics/dense_matrix_blas_lapack.C: In instantiation of 'void
> libMesh::DenseMatrix<T>::_matvec_blas(T, T, libMesh::DenseVector<T>&,
> const libMesh::DenseVector<T>&, bool) const [with T = double]':
> src/numerics/dense_matrix_blas_lapack.C:767:19:   required from here
> src/numerics/dense_matrix_blas_lapack.C:737:3: error: cannot convert
> 'double*' to 'const PetscScalar* {aka const std::complex<double>*}' for
> argument '4' to 'void zgemv_(const char*, const PetscBLASInt*, const
> PetscBLASInt*, const PetscScalar*, const PetscScalar*, const
> PetscBLASInt*, const PetscScalar*, const PetscBLASInt*, const
> PetscScalar*, PetscScalar*, const PetscBLASInt*)'
> src/numerics/dense_matrix_blas_lapack.C: In instantiation of 'void
> libMesh::DenseMatrix<T>::_svd_helper(char, char,
> std::__debug::vector<T>&, std::__debug::vector<T>&,
> std::__debug::vector<T>&) [with T = double]':
> src/numerics/dense_matrix_blas_lapack.C:772:66:   required from here
> src/numerics/dense_matrix_blas_lapack.C:499:3: error: cannot convert
> 'double*' to 'PetscScalar* {aka std::complex<double>*}' for argument '5'
> to 'void zgesvd_(const char*, const char*, PetscBLASInt*, PetscBLASInt*,
> PetscScalar*, PetscBLASInt*, PetscReal*, PetscScalar*, PetscBLASInt*,
> PetscScalar*, PetscBLASInt*, PetscScalar*, PetscBLASInt*, PetscReal*,
> PetscBLASInt*)'
> make[1]: *** [src/numerics/libmesh_dbg_la-dense_matrix_blas_lapack.lo]
> Error 1
> make[1]: Leaving directory `/home/eftang/dev_software/libmesh'
> make: *** [all-recursive] Error 1
>
>
> Thanks again,
> Jens
>
>
> On 08/16/2013 12:49 AM, David Knezevic wrote:
> > I use " --with-clanguage=cxx" in the PETSc configuration. Can you try
> > adding that?
> >
> > David
> >
> >
> > On 08/16/2013 03:24 AM, Jens Lohne Eftang wrote:
> >> I want to configure and compile libmesh for complex number support.
> >>
> >> However I get the following error when making libmesh:
> >>
> >> In file included from ./include/libmesh/tensor_tools.h:25:0,
> >>                     from src/numerics/numeric_vector.C:33:
> >> ./include/libmesh/compare_types.h:65:37: error: template argument 1 is
> >> invalid
> >> ./include/libmesh/compare_types.h:87:40: error: template argument 2 is
> >> invalid
> >> ./include/libmesh/compare_types.h:92:39: error: wrong number of template
> >> arguments (1, should be 2)
> >> ./include/libmesh/compare_types.h:77:8: error: provided for
> >> 'template<class S, class T> struct libMesh::CompareTypes'
> >> ./include/libmesh/compare_types.h:116:1: error: wrong number of template
> >> arguments (1, should be 2)
> >> ./include/libmesh/compare_types.h:77:8: error: provided for
> >> 'template<class S, class T> struct libMesh::CompareTypes'
> >> ./include/libmesh/compare_types.h:116:1: error: template argument 2 is
> >> invalid
> >> ./include/libmesh/compare_types.h:116:1: error: template argument 2 is
> >> invalid
> >> ./include/libmesh/compare_types.h:116:1: error: wrong number of template
> >> arguments (1, should be 2)
> >> ./include/libmesh/compare_types.h:77:8: error: provided for
> >> 'template<class S, class T> struct libMesh::CompareTypes'
> >> ./include/libmesh/compare_types.h:116:1: error: wrong number of template
> >> arguments (1, should be 2)
> >>
> >> .... lots of similar errors ...
> >>
> >> src/numerics/numeric_vector.C: In instantiation of 'libMesh::Real
> >> libMesh::NumericVector<T>::subset_l2_norm(const
> >> std::__debug::set<unsigned int>&) const [with T = std::complex<double>;
> >> libMesh::Real = double]':
> >> src/numerics/numeric_vector.C:390:16:   required from here
> >> src/numerics/numeric_vector.C:348:5: error: no match for 'operator+=' in
> >> 'norm += libMesh::TensorTools::norm_sq<std::complex<double> >((&
> >> v)->libMesh::NumericVector<T>::operator()<std::complex<double>
> >>    >(((unsigned int)it.__gnu_debug::_Safe_iterator<_Iterator,
> >> _Sequence>::operator*<std::_Rb_tree_const_iterator<unsigned int>,
> >> std::__debug::set<unsigned int> >())))'
> >> make[1]: *** [src/numerics/libmesh_dbg_la-numeric_vector.lo] Error 1
> >>
> >>
> >> I have configured petsc 3.4.2 with
> >>
> >> --download-f-blas-lapack=1
> >> --with-mpi-dir=/home/eftang/dev_software/mpich-install/
> >> --with-debugging=0 --with-shared-libraries=1 --download-mumps=1
> >> --download-umfpack=1 --with-scalar-type=complex --download-scalapack
> >> --download-ptscotch
> >>
> >> and libmesh with
> >>
> >> ./configure --enable-complex --enable-shared --enable-slepc
> >> --enable-everything
> >> --with-eigen-include=/home/eftang/dev_software/eigen-3.1.2
> >> --prefix=/home/eftang/dev_software/libmesh_install
> >>
> >>
> >> Any ideas?
> >>
> >> Best,
> >> Jens
> >>
> >>
> ------------------------------------------------------------------------------
> >> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> >> It's a free troubleshooting tool designed for production.
> >> Get down to code-level detail for bottlenecks, with <2% overhead.
> >> Download for free and get started troubleshooting in minutes.
> >>
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> >> _______________________________________________
> >> Libmesh-users mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/libmesh-users
> >
> ------------------------------------------------------------------------------
> > Get 100% visibility into Java/.NET code with AppDynamics Lite!
> > It's a free troubleshooting tool designed for production.
> > Get down to code-level detail for bottlenecks, with <2% overhead.
> > Download for free and get started troubleshooting in minutes.
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Libmesh-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/libmesh-users
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Libmesh-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libmesh-users
>
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to