Jan Biermann | 3 Sep 17:28
Picon
Favicon

libmesh/petsc trouble

I have a question regarding the linking to petsc. I have a working petsc
        installation that I configure with

        ./config/configure.py --download-mpich=1\
                            --with-debugging=1 \
                            --with-scalar-type=complex\
                            --with-fc=0\
                            --download-c-blas-lapack=1\
                            --with-mpi-compilers=0

        If I want to use libmesh with this Petsc version I get the error
        messages like this during compilation:

        petsc_matrix.C:199: error: cannot convert ‘std::complex<double>’
        to
        ‘double __complex__’ for argument ‘4’ to ‘PetscErrorCode
        MatZeroRows(_p_Mat*, PetscInt, const PetscInt*, double
        __complex__)’

        include/utils/compare_types.h:185: error: template argument 2 is
        invalid
        include/utils/compare_types.h:185: error: wrong number of
        template
        arguments (1, should be 2)
        include/utils/compare_types.h:103: error: provided for
        ‘template<class
        S, class T> struct CompareTypes’

        so do I have to configure petsc with --with-clanguage=c++ etc.
        or is
(Continue reading)

David Knezevic | 3 Sep 17:37
Picon
Favicon

Re: libmesh/petsc trouble

Hi Jan,

I got the same kind of errors as you and they went away when I 
configured petsc with --with-clanguage=c++

Dave

On 09/03/2010 11:28 AM, Jan Biermann wrote:
> I have a question regarding the linking to petsc. I have a working petsc
>          installation that I configure with
>
>          ./config/configure.py --download-mpich=1\
>                              --with-debugging=1 \
>                              --with-scalar-type=complex\
>                              --with-fc=0\
>                              --download-c-blas-lapack=1\
>                              --with-mpi-compilers=0
>
>          If I want to use libmesh with this Petsc version I get the error
>          messages like this during compilation:
>
>          petsc_matrix.C:199: error: cannot convert ‘std::complex<double>’
>          to
>          ‘double __complex__’ for argument ‘4’ to ‘PetscErrorCode
>          MatZeroRows(_p_Mat*, PetscInt, const PetscInt*, double
>          __complex__)’
>
>          include/utils/compare_types.h:185: error: template argument 2 is
>          invalid
>          include/utils/compare_types.h:185: error: wrong number of
(Continue reading)

Picon
Favicon

Re: libmesh/petsc trouble

Indeed you do need to use c++ to build PETSc in this case since the C and
C++ complex types are not related to each other.

-Ben

On 9/3/10 10:28 AM, "Jan Biermann" <biermann@...> wrote:

> I have a question regarding the linking to petsc. I have a working petsc

> installation that I configure with

        ./config/configure.py
> --download-mpich=1\
                            --with-debugging=1 \

> --with-scalar-type=complex\
                            --with-fc=0\

> --download-c-blas-lapack=1\

> --with-mpi-compilers=0

        If I want to use libmesh with this
> Petsc version I get the error
        messages like this during compilation:

> 
        petsc_matrix.C:199: error: cannot convert Œstd::complex<double>¹

> to
(Continue reading)


Gmane