[petsc-users] potential problem in dageometry

Jed Brown jedbrown at mcs.anl.gov
Tue Jun 26 17:07:57 CDT 2012


Matt was a bad boy and forgot to remove the debugging print statements and
check that it does the correct thing with complex before pushing.

http://petsc.cs.iit.edu/petsc/petsc-dev/rev/e2c8cd4c372b

On Tue, Jun 26, 2012 at 12:29 PM, Paul Mullowney <paulm at txcorp.com> wrote:

> Hi All,
>
> I'm trying to build PETSc with the configuration:
> ./configure -with-debugging=no --with-mpi=1 --with-mpi-dir=/usr/mpi/gcc/**openmpi-1.4.3
> --CFLAGS="-g -O3" --with-precision=double --with-clanguage=C++
> --with-scalar-type=complex --with-thrust=0 --with-cusp=0 --with-cuda=0
>
> I see the errors listed below. I'm wondering if the code in
> DMDAComputeCellGeometry_2D function should be using PetscReal instead of
> PetscScalar?
>
> Thanks,
> -Paul
>
>
> dageometry.c: In function ‘PetscErrorCode DMDAComputeCellGeometry_2D(_p_**DM*,
> const PetscScalar*, const PetscReal*, PetscReal*, PetscReal*,
> PetscScalar*)’:
> dageometry.c:323: warning: cannot pass objects of non-POD type ‘const
> struct PetscScalar’ through ‘...’; call will abort at runtime
> dageometry.c:323: warning: cannot pass objects of non-POD type ‘const
> struct PetscScalar’ through ‘...’; call will abort at runtime
> dageometry.c:323: warning: cannot pass objects of non-POD type ‘const
> struct PetscScalar’ through ‘...’; call will abort at runtime
> dageometry.c:323: warning: cannot pass objects of non-POD type ‘const
> struct PetscScalar’ through ‘...’; call will abort at runtime
> dageometry.c:323: warning: cannot pass objects of non-POD type ‘const
> struct PetscScalar’ through ‘...’; call will abort at runtime
> dageometry.c:323: warning: cannot pass objects of non-POD type ‘const
> struct PetscScalar’ through ‘...’; call will abort at runtime
> dageometry.c:323: warning: cannot pass objects of non-POD type ‘const
> struct PetscScalar’ through ‘...’; call will abort at runtime
> dageometry.c:323: warning: cannot pass objects of non-POD type ‘const
> struct PetscScalar’ through ‘...’; call will abort at runtime
> dageometry.c:324: warning: cannot pass objects of non-POD type ‘const
> struct PetscScalar’ through ‘...’; call will abort at runtime
> dageometry.c:324: warning: cannot pass objects of non-POD type ‘const
> struct PetscScalar’ through ‘...’; call will abort at runtime
> dageometry.c:325: error: cannot convert ‘std::complex<double>’ to ‘double’
> in assignment
> dageometry.c:325: error: cannot convert ‘std::complex<double>’ to ‘double’
> in assignment
> dageometry.c:326: error: cannot convert ‘std::complex<double>’ to ‘double’
> in assignment
> dageometry.c:326: error: cannot convert ‘std::complex<double>’ to ‘double’
> in assignment
> dageometry.c:328: error: cannot convert ‘std::complex<double>’ to
> ‘PetscReal’ in assignment
> dageometry.c: In function ‘PetscErrorCode DMDAComputeCellGeometry(_p_DM***,
> PetscInt, PetscQuadrature*, PetscReal*, PetscReal*, PetscReal*,
> PetscReal*)’:
> dageometry.c:352: error: cannot convert ‘const std::complex<double>’ to
> ‘double’ in assignment
> dageometry.c:357: error: cannot convert ‘PetscReal*’ to ‘PetscScalar*’ for
> argument ‘6’ to ‘PetscErrorCode DMDAComputeCellGeometry_2D(_p_**DM*,
> const PetscScalar*, const PetscReal*, PetscReal*, PetscReal*, PetscScalar*)’
> /usr/bin/ar: dageometry.o: No such file or directory
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120626/c9030b65/attachment.html>


More information about the petsc-users mailing list