[petsc-users] potential problem in dageometry

Paul Mullowney paulm at txcorp.com
Tue Jun 26 15:29:00 CDT 2012


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




More information about the petsc-users mailing list