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

Jed Brown jed at jedbrown.org
Sun Mar 16 03:17:38 CDT 2014


Bad merge.  Sorry; fixed now.

Barry Smith <bsmith at mcs.anl.gov> writes:

> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20140316/133bcc47/attachment.sig>


More information about the petsc-dev mailing list