[petsc-users] make ex5

Jin, Shuangshuang Shuangshuang.Jin at pnnl.gov
Thu Aug 30 18:20:04 CDT 2012


Hi, there, I got an error while trying to do run an example in PETSc src/snes/examples/tutorials:

[d3m956 at olympus tutorials]$ make ex5
*********************W-a-r-n-i-n-g*************************
Your PETSC_DIR may not match the directory you are in
PETSC_DIR  /share/apps/petsc/3.2p3 Current directory /pic/projects/mca/ss/petsc-3.3/src/snes/examples/tutorials
Ignore this if you are running make test
******************************************************
mpicc -o ex5.o -c -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -I/share/apps/petsc/3.2p3/include -I/share/apps/petsc/3.2p3/gcc-4.1.2-openmpi-1.5.4/includ               e -I/share/apps/openmpi/1.5.4/gcc/4.1.2/include -D__INSDIR__=src/snes/examples/tutorials/ ex5.c
ex5.c(67): remark #1419: external declaration in primary source file
  extern PetscErrorCode FormInitialGuess(DM,AppCtx*,Vec);
                        ^

ex5.c(68): remark #1419: external declaration in primary source file
  extern PetscErrorCode FormFunctionLocal(DMDALocalInfo*,PetscScalar**,PetscScalar**,AppCtx*);
                        ^

ex5.c(69): remark #1419: external declaration in primary source file
  extern PetscErrorCode FormJacobianLocal(DMDALocalInfo*,PetscScalar**,Mat,AppCtx*);
                        ^

ex5.c(73): remark #1419: external declaration in primary source file
  extern PetscErrorCode NonlinearGS(SNES,Vec,Vec,void*);
                        ^

ex5.c(107): remark #266: function "SNESSetGS" declared implicitly
    ierr = SNESSetGS(snes, NonlinearGS, PETSC_NULL);CHKERRQ(ierr);
           ^

ex5.c(403): remark #869: parameter "ctx" was never referenced
  PetscErrorCode NonlinearGS(SNES snes,Vec X, Vec B, void * ctx)
                                                            ^

mpicc -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3  -o ex5 ex5.o -Wl,-rpath,/share/apps/petsc/3.2p3//gcc-4.1.2-openmpi-1.5.4/lib -L/share/apps/petsc/3.2p               3/gcc-4.1.2-openmpi-1.5.4/lib  -lpetsc -lX11 -lpthread -Wl,-rpath,/share/apps/petsc/3.2p3/gcc-4.1.2-openmpi-1.5.4/lib -lflapack -lfblas -Wl,-rpath,/share/apps/openmpi/1.5.4/gcc/4.1.2               /lib -L/share/apps/openmpi/1.5.4/gcc/4.1.2/lib -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -ldl -lmpi -lnsl -lutil -lgcc_s -lpthread -l               mpi_f90 -lmpi_f77 -lgfortran -lm -lm -lm -lm -ldl -lmpi -lnsl -lutil -lgcc_s -lpthread -ldl
/share/apps/intel/11.1/069/lib/intel64/libimf.so: warning: warning: feupdateenv is not implemented and will always fail
ex5.o: In function `main':
/pic/projects/mca/ss/petsc-3.3/src/snes/examples/tutorials/ex5.c:107: undefined reference to `SNESSetGS'
make: [ex5] Error 1 (ignored)
/bin/rm -f ex5.o

Can anyone tell me what is the problem here?

Thanks,
Shuangshuang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120830/dc65438d/attachment.html>


More information about the petsc-users mailing list