[petsc-dev] getting rid of TESTEXAMPLES_XXX_XXX stuff

Jed Brown jedbrown at mcs.anl.gov
Fri Dec 6 15:06:40 CST 2013


Barry Smith <bsmith at mcs.anl.gov> writes:
>    Ok, just let me know when I can try again.

Okay, the branch is rebased onto 'master'.  Delete your old branch, then
checkout 'jed/tap'.

$ make PETSC_ARCH=mpich-clang -f gmakefile -j4 build-test

This will build all the tests for all modules.  The executables go in
$PETSC_ARCH/bin/$pkg.test.  Run specific examples like this:

$ mpiexec -n 4 mpich-clang/bin/snes.test src/snes/examples/tutorials/ex19.c -snes_monitor
/home/jed/petsc/src/snes/examples/tutorials/ex19.c:105: __FUNCT__="main" does not agree with __func__="main_snes_u_ex19"
/home/jed/petsc/src/snes/examples/tutorials/ex19.c:105: __FUNCT__="main" does not agree with __func__="main_snes_u_ex19"
/home/jed/petsc/src/snes/examples/tutorials/ex19.c:105: __FUNCT__="main" does not agree with __func__="main_snes_u_ex19"
/home/jed/petsc/src/snes/examples/tutorials/ex19.c:105: __FUNCT__="main" does not agree with __func__="main_snes_u_ex19"
lid velocity = 0.0625, prandtl # = 1, grashof # = 1
  0 SNES Function norm 2.391552133017e-01 
  1 SNES Function norm 6.797461811808e-05 
  2 SNES Function norm 3.899893090171e-11 
Number of SNES iterations = 2


You won't get the noise about main if you use an optimized build:

$ mpiexec -n 4 mpich-clang-optg/bin/snes.test src/snes/examples/tutorials/ex19.c -snes_monitor                                         
lid velocity = 0.0625, prandtl # = 1, grashof # = 1
  0 SNES Function norm 2.391552133017e-01 
  1 SNES Function norm 6.797461811808e-05 
  2 SNES Function norm 3.899893090171e-11 
Number of SNES iterations = 2


If you look in $PETSC_ARCH/conf/files, you'll see target-local variables
setting flags.c = -Dmain=main_vec_vec_u_ex12.  The generated main
resides in $PETSC_ARCH/src/$pkg.test.c.

I don't know how to do the equivalent for Fortran.
-------------- 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/20131206/e34288b8/attachment.sig>


More information about the petsc-dev mailing list