[petsc-dev] example broken in next ex56.c:276:22: error: ‘sCoord’ undeclared (first use in this function)

Barry Smith bsmith at mcs.anl.gov
Fri Mar 14 15:26:41 CDT 2014


mpicc -o ex56.o -c -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -O0   -I/sandbox/petsc/petsc.clone-3/include -I/sandbox/petsc/petsc.clone-3/arch-linux-dbg-quad/include -I/usr/include/mpich2    `pwd`/ex56.c
In file included from /sandbox/petsc/petsc.clone-3/include/petscis.h:7:0,
                 from /sandbox/petsc/petsc.clone-3/include/petscvec.h:9,
                 from /sandbox/petsc/petsc.clone-3/include/petscmat.h:6,
                 from /sandbox/petsc/petsc.clone-3/include/petscpc.h:6,
                 from /sandbox/petsc/petsc.clone-3/include/petscksp.h:6,
                 from /sandbox/petsc/petsc.clone-3/src/ksp/ksp/examples/tutorials/ex56.c:8:
/sandbox/petsc/petsc.clone-3/src/ksp/ksp/examples/tutorials/ex56.c: In function ‘main’:
/sandbox/petsc/petsc.clone-3/src/ksp/ksp/examples/tutorials/ex56.c:276:22: error: ‘sCoord’ undeclared (first use in this function)
     ierr = PetscFree(sCoord);CHKERRQ(ierr);
                      ^
/sandbox/petsc/petsc.clone-3/include/petscsys.h:1099:48: note: in definition of macro ‘PetscFree’
 #define PetscFree(a)   ((*PetscTrFree)((void*)(a),__LINE__,PETSC_FUNCTION_NAME,__FILE__) || ((a) = 0,0))
                                                ^
/sandbox/petsc/petsc.clone-3/src/ksp/ksp/examples/tutorials/ex56.c:276:22: note: each undeclared identifier is reported only once for each function it appears in
     ierr = PetscFree(sCoord);CHKERRQ(ierr);
                      ^
/sandbox/petsc/petsc.clone-3/include/petscsys.h:1099:48: note: in definition of macro ‘PetscFree’
 #define PetscFree(a)   ((*PetscTrFree)((void*)(a),__LINE__,PETSC_FUNCTION_NAME,__FILE__) || ((a) = 0,0))
                                                ^
/sandbox/petsc/petsc.clone-3/include/petscsys.h:1099:101: warning: left-hand operand of comma expression has no effect [-Wunused-value]
 #define PetscFree(a)   ((*PetscTrFree)((void*)(a),__LINE__,PETSC_FUNCTION_NAME,__FILE__) || ((a) = 0,0))
                                                                                                     ^
/sandbox/petsc/petsc.clone-3/src/ksp/ksp/examples/tutorials/ex56.c:276:12: note: in expansion of macro ‘PetscFree’
     ierr = PetscFree(sCoord);CHKERRQ(ierr);
            ^
make[8]: *** [ex56.o] Error 1




More information about the petsc-dev mailing list