please take care to fix all examples that us an API you changed

Barry Smith bsmith at mcs.anl.gov
Thu Jul 16 21:12:10 CDT 2009


   Recently people have been changing calling sequences of some PETSc  
routines (which is fine) but NOT changing all the examples that use  
the API (which is not fine). Thus breaking the tests. Whenever you  
change an API please check all the examples (with etags this is  
trivial) and update all use of that API. For example, some bugs I  
found today include the below. Will the guilty people please fix  
these? The tests are a mess now because of these errors!

You should ALWAYS run  make alltests  after making an API change to  
catch any missed. If you do not do this, more and more errors  
accumulate in the tests so that they become worthless.  For example, I  
made some changes today but cannot tell what harm my changes did  
because make alltests is already a huge mess.


    Thanks

    Barry


/Users/barrysmith/Src/petsc-dev/arch-gnu/bin/mpicc -o ex43.o -c -Wall - 
Wwrite-strings -Wno-strict-aliasing -g3 -I/Users/barrysmith/Src/petsc- 
dev/arch-gnu/include -I/Users/barrysmith/Src/petsc-dev/include -I/usr/ 
X11/include -I/Users/barrysmith/Src/petsc-dev/arch-gnu/include -I/ 
Applications/MATLAB_R2009a.app/extern/include -D__SDIR__="src/snes/ 
examples/tutorials/" ex43.c
In file included from ex43.c:15:
ex43-44.h: In function ‘FormJacobianSub’:
ex43-44.h:52: warning: passing argument 5 of ‘MatGetSubMatrix’ makes  
pointer from integer without a cast
ex43-44.h:52: error: too many arguments to function ‘MatGetSubMatrix’
ex43-44.h:54: error: too many arguments to function ‘MatGetSubMatrix’
make[6]: [ex43.o] Error 1 (ignored)
/Users/barrysmith/Src/petsc-dev/arch-gnu/bin/mpicc -Wl,- 
multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress -Wl,- 
commons,use_dylibs -Wl,-search_paths_first -Wl,- 
multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress -Wl,- 
commons,use_dylibs -Wl,-search_paths_first  -Wall -Wwrite-strings -Wno- 
strict-aliasing -g3  -o ex43 ex43.o -L/Users/barrysmith/Src/petsc-dev/ 
arch-gnu/lib -L/Users/barrysmith/Src/petsc-dev/arch-gnu/lib - 
lpetscsnes -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc   -L/usr/ 
X11/lib -lX11 -L/Users/barrysmith/Src/petsc-dev/arch-gnu/lib -lHYPRE - 
lmpichcxx -lstdc++ -lhdf5 -lz -lparmetis -lmetis -llapack -lblas -L/ 
Users/barrysmith/Src/petsc-dev/arch-gnu/lib -L/usr/lib/i686-apple- 
darwin9/4.0.1 -L/usr/lib/gcc/i686-apple-darwin9/4.0.1 -ldl -lpmpich - 
lmpich -lgcc_s.10.5 -lSystem -lmpichf90 -lgfortranbegin -lgfortran -L/ 
usr/local/libexec/gcc/i386-apple-darwin9.0.0/4.3.0 -L/usr/local/ 
libexec/gcc/i386-apple-darwin9.0.0 -L/usr/local/lib/gcc/i386-apple- 
darwin9.0.0/4.3.0 -L/usr/local/lib/gcc/i386-apple-darwin9.0.0 -L/usr/ 
local/lib -lmpichcxx -lstdc++ -lmpichcxx -lstdc++ -ldl -lpmpich - 
lmpich -lgcc_s.10.5 -lSystem -ldl
i686-apple-darwin9-gcc-4.0.1: ex43.o: No such file or directory
make[6]: [ex43] Error 1 (ignored)
/bin/rm -f ex43.o

testexamples_C in: /Users/barrysmith/Src/petsc-dev/src/ts/examples/tests
1,11c1,42
< At t[0] =      0.00e+00 u=       1.00e+00 at the center
< At t[1] =      1.00e-01 u=       5.73e-01 at the center
< At t[2] =      2.00e-01 u=       3.28e-01 at the center
< At t[3] =      3.00e-01 u=       1.89e-01 at the center
< At t[4] =      4.00e-01 u=       1.09e-01 at the center
< At t[5] =      5.00e-01 u=       6.35e-02 at the center
< At t[6] =      6.00e-01 u=       3.73e-02 at the center
< At t[7] =      7.00e-01 u=       2.20e-02 at the center
< At t[8] =      8.00e-01 u=       1.30e-02 at the center
< At t[9] =      9.00e-01 u=       7.78e-03 at the center
< At t[10] =      1.00e+00 u=       4.67e-03 at the center
---
 > [0]PETSC ERROR: --------------------- Error Message  
------------------------------------
 > [0]PETSC ERROR: Object is in wrong state!
 > [0]PETSC ERROR: SNESSetFunction() must be called first!
 > [0]PETSC ERROR:  
------------------------------------------------------------------------
 > [0]PETSC ERROR: Petsc Development HG revision:  
e1f076dca7c745ad92f3e0051127f9b15b56c9dc HG Date: Thu Jul 16 13:52:58  
2009 -0500
 > [0]PETSC ERROR: See docs/changes/index.html for recent updates.
 > [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
 > [0]PETSC ERROR: See docs/index.html for manual pages.
 > [0]PETSC ERROR:  
------------------------------------------------------------------------
 > [0]PETSC ERROR: ./ex4 on a arch-gnu named barry-smiths-macbook- 
pro.local by barrysmith Thu Jul 16 21:04:21 2009
 > [0]PETSC ERROR: Libraries linked from /Users/barrysmith/Src/petsc- 
dev/arch-gnu/lib
 > [0]PETSC ERROR: Configure run at Thu Jul 16 19:41:28 2009
 > [0]PETSC ERROR: Configure options --with-cc=gcc --download-mpich -- 
with-shared=0 --download-[1]PETSC ERROR: --------------------- Error  
Message ------------------------------------
 > [1]PETSC ERROR: Object is in wrong state!
 > [1]PETSC ERROR: SNESSetFunction() must be called first!
 > [1]PETSC ERROR:  
------------------------------------------------------------------------
 > [1]PETSC ERROR: Petsc Development HG revision:  
e1f076dca7c745ad92f3e0051127f9b15b56c9dc HG Date: Thu Jul 16 13:52:58  
2009 -0500
 > [1]PETSC ERROR: See docs/changes/index.html for recent updates.
 > [1]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
 > [1]PETSC ERROR: See docs/index.html for manual pages.
 > [1]PETSC ERROR:  
------------------------------------------------------------------------
 > [1]PETSC ERROR: ./ex4 on a arch-gnu named barry-smiths-macbook- 
pro.local by barrysmith Thu Jul 16 21:04:21 2009
 > [1]PETSC ERROR: Libraries linked from /Users/barrysmith/Src/petsc- 
dev/arch-gnu/lib
 > [1]PETSC ERROR: Configure run at Thu Jul 16 19:41:28 2009
 > [1]PETSC ERROR: Configure options --with-cc=gcc --download-mpich -- 
with-shared=0 --download-parmetis --with-matlab -PETSC_ARCH=arch-gnu -- 
download-hypre --download-hdf5 --with-fc=gfortran --with-fortran-kernels
 > [0]PETSC ERROR:  
------------------------------------------------------------------------
 > [0]PETSC ERROR: MatCreateSNESMF() line 134 in src/snes/mf/snesmfj.c
 > [0]PETSC ERROR: SNESSetUpMatrixFree_Private() line 175 in src/snes/ 
interface/snes.c
 > [0]PETSC ERROR: SNESSetFromOptions() line 405 in src/snes/interface/ 
snes.c
 > [0]PETSC ERROR: TSSetFromOptions() line 134 in src/ts/interface/ts.c
 > [0]PETSC ERROR: main() line 163 in src/ts/examples/tests/ex4.c

 > [0]PETSC ERROR: --------------------- Error Message  
------------------------------------
 > [0]PETSC ERROR: Object is in wrong state!
 > [0]PETSC ERROR: SNESSetFunction() must be called first!
 > [0]PETSC ERROR:  
------------------------------------------------------------------------
 > [0]PETSC ERROR: Petsc Development HG revision:  
e1f076dca7c745ad92f3e0051127f9b15b56c9dc HG Date: Thu Jul 16 13:52:58  
2009 -0500
 > [0]PETSC ERROR: See docs/changes/index.html for recent updates.
 > [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
 > [0]PETSC ERROR: See docs/index.html for manual pages.
 > [0]PETSC ERROR:  
------------------------------------------------------------------------
 > [0]PETSC ERROR: ./ex7 on a arch-gnu named barry-smiths-macbook- 
pro.local by barrysmith Thu Jul 16 21:05:26 2009
 > [0]PETSC ERROR: Libraries linked from /Users/barrysmith/Src/petsc- 
dev/arch-gnu/lib
 > [0]PETSC ERROR: Configure run at Thu Jul 16 19:41:28 2009
 > [0]PETSC ERROR: Configure options --with-cc=gcc --download-mpich -- 
with-shared=0 --download-parmetis --with-matlab -PETSC_ARCH=arch-gnu -- 
download-hypre --download-hdf5 --with-fc=gfortran --with-fortran-kernels
 > [0]PETSC ERROR:  
------------------------------------------------------------------------
 > [0]PETSC ERROR: MatCreateSNESMF() line 134 in src/snes/mf/snesmfj.c
 > [0]PETSC ERROR: SNESSetUpMatrixFree_Private() line 175 in src/snes/ 
interface/snes.c
 > [0]PETSC ERROR: SNESSetFromOptions() line 405 in src/snes/interface/ 
snes.c
 > [0]PETSC ERROR: TSSetFromOptions() line 134 in src/ts/interface/ts.c
 > [0]PETSC ERROR: main() line 109 in src/ts/examples/tutorials/ex7.c
 > application called MPI_Abort(MPI_COMM_WORLD, 73) - process  
0[cli_0]: aborting job:
 > application called MPI_Abort(MPI_COMM_WORLD, 73) - process 0
Possible problem with ex7_2, diffs above

  [0]PETSC ERROR: See docs/index.html for manual pages.
 > [0]PETSC ERROR:  
------------------------------------------------------------------------
 > [0]PETSC ERROR: ./mp on a arch-gnu named barry-smiths-macbook- 
pro.local by barrysmith Thu Jul 16 21:05:49 2009
 > [0]PETSC ERROR: Libraries linked from /Users/barrysmith/Src/petsc- 
dev/arch-gnu/lib
 > [0]PETSC ERROR: Configure run at Thu Jul 16 19:41:28 2009
 > [0]PETSC ERROR: Configure options --with-cc=gcc --download-mpich -- 
with-shared=0 --download-parmetis --with-matlab -PETSC_ARCH=arch-gnu -- 
download-hypre --download-hdf5 --with-fc=gfortran --with-fortran-kernels
 > [0]PETSC ERROR:  
------------------------------------------------------------------------
 > [0]PETSC ERROR: PetscOptionsGetEList() line 1179 in src/sys/objects/ 
options.c
 > [0]PETSC ERROR: PetscOptionsEList() line 639 in src/sys/objects/ 
aoptions.c
 > [0]PETSC ERROR: PetscOptionsEnum() line 314 in src/sys/objects/ 
aoptions.c
 > [0]PETSC ERROR: PCSetFromOptions_FieldSplit() line 692 in src/ksp/ 
pc/impls/fieldsplit/fieldsplit.c
 > [0]PETSC ERROR: PCSetFromOptions() line 186 in src/ksp/pc/interface/ 
pcset.c
 > [0]PETSC ERROR: KSPSetFromOptions() line 324 in src/ksp/ksp/ 
interface/itcl.c
 > [0]PETSC ERROR: SNESSetFromOptions() line 410 in src/snes/interface/ 
snes.c
 > [0]PETSC ERROR: DMMGSetFromOptions() line 817 in src/snes/utils/ 
damgsnes.c
 > [0]PETSC ERROR: main() line 81 in tutorials/multiphysicsmp.c
 > application called MPI_Abort(MPI_COMM_WORLD, 83) - process  
0[cli_0]: aborting job:
 > application called MPI_Abort(MPI_COMM_WORLD, 83) - process 0
Possible problem with mp_9, diffs above
1,445c1,25
<   0 SNES Function norm 222.222

<


More information about the petsc-dev mailing list