<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri, sans-serif" size="2">
<div>Hi, there, I got an error while trying to do run an example in PETSc src/snes/examples/tutorials:</div>
<div> </div>
<div>[d3m956@olympus tutorials]$ make ex5</div>
<div>*********************W-a-r-n-i-n-g*************************</div>
<div>Your PETSC_DIR may not match the directory you are in</div>
<div>PETSC_DIR  /share/apps/petsc/3.2p3 Current directory /pic/projects/mca/ss/petsc-3.3/src/snes/examples/tutorials</div>
<div>Ignore this if you are running make test</div>
<div>******************************************************</div>
<div>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</div>
<div>ex5.c(67): remark #1419: external declaration in primary source file</div>
<div>  extern PetscErrorCode FormInitialGuess(DM,AppCtx*,Vec);</div>
<div>                        ^</div>
<div> </div>
<div>ex5.c(68): remark #1419: external declaration in primary source file</div>
<div>  extern PetscErrorCode FormFunctionLocal(DMDALocalInfo*,PetscScalar**,PetscScalar**,AppCtx*);</div>
<div>                        ^</div>
<div> </div>
<div>ex5.c(69): remark #1419: external declaration in primary source file</div>
<div>  extern PetscErrorCode FormJacobianLocal(DMDALocalInfo*,PetscScalar**,Mat,AppCtx*);</div>
<div>                        ^</div>
<div> </div>
<div>ex5.c(73): remark #1419: external declaration in primary source file</div>
<div>  extern PetscErrorCode NonlinearGS(SNES,Vec,Vec,void*);</div>
<div>                        ^</div>
<div> </div>
<div>ex5.c(107): remark #266: function "SNESSetGS" declared implicitly</div>
<div>    ierr = SNESSetGS(snes, NonlinearGS, PETSC_NULL);CHKERRQ(ierr);</div>
<div>           ^</div>
<div> </div>
<div>ex5.c(403): remark #869: parameter "ctx" was never referenced</div>
<div>  PetscErrorCode NonlinearGS(SNES snes,Vec X, Vec B, void * ctx)</div>
<div>                                                            ^</div>
<div> </div>
<div>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</div>
<div>/share/apps/intel/11.1/069/lib/intel64/libimf.so: warning: warning: feupdateenv is not implemented and will always fail</div>
<div>ex5.o: In function `main':</div>
<div>/pic/projects/mca/ss/petsc-3.3/src/snes/examples/tutorials/ex5.c:107: undefined reference to `SNESSetGS'</div>
<div>make: [ex5] Error 1 (ignored)</div>
<div>/bin/rm -f ex5.o</div>
<div><font face="Times New Roman, serif"> </font></div>
<div>Can anyone tell me what is the problem here?</div>
<div> </div>
<div>Thanks,</div>
<div>Shuangshuang</div>
<div><font face="Times New Roman, serif"> </font></div>
</font>
</body>
</html>