Commits

BarryFSmith  committed 633d69f Merge

Merge branch 'barry/new-test-makefiles' into next

  • Participants
  • Parent commits 3e99bbd, 1ee5a33
  • Branches knepley/fix-quadrature-order, next-oct-2014

Comments (0)

Files changed (17)

File bin/petscdiff

+#! /bin/csh -f
+
+sed  "s/[0-9]\.[0-9]*[e]*[-]*[+]*[0-9]*/XXX/g" $1 > tmpA
+sed  "s/[0-9]\.[0-9]*[e]*[-]*[+]*[0-9]*/XXX/g" $2 > tmpB
+diff tmpA tmpB >& /dev/null
+if ($?) then
+  diff -y --suppress-common-lines -B $1 $2 > tmpDiff;
+  if (`cat tmpDiff | wc -l` < 16) then
+    cat tmpDiff
+  else
+    head -8 tmpDiff
+    echo "           MORE DIFFERENCES"
+    tail -8 tmpDiff
+  endif
+  rm -f tmpDiff tmpA tmpB
+  exit 1;
+else
+  rm -f tmpA tmpB
+  exit 0;
+endif
+
+
 	-@${RM} ${PETSC_ARCH}/conf/alltests.log alltests.log
 	-@ln -s ${PETSC_ARCH}/conf/alltests.log alltests.log
 	-@if [ "${PETSC_WITH_BATCH}" == "" ]; then make PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} stream NPMAX=4 | tee ${PETSC_ARCH}/conf/alltests.log ;fi
+	-@${OMAKE} tree_gmake_test  PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} MPIEXEC="${MPIEXEC}" DATAFILESPATH=${DATAFILESPATH} 2>&1 | tee ${PETSC_ARCH}/conf/alltests.log
 	-@${OMAKE} alltest PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} MPIEXEC="${MPIEXEC}" DATAFILESPATH=${DATAFILESPATH} 2>&1 | tee ${PETSC_ARCH}/conf/alltests.log
 
 alltest:
 	  ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ACTION=${TESTMODE}_$$i MPIEXEC="${MPIEXEC}" NO_PRINT_DIR=yes tree ; \
 	done
 
+#
+#  will run the gmake tests in each directory that has a gmakefile
+#
+tree_gmake_test:
+	-@for dir in ${DIRS} ; do if [ -d $$dir ]; then \
+	(cd $$dir ; \
+        if [ -f gmakefile ]; then \
+	  ${OMAKE}  -f gmakefile runex19 PETSC_ARCH=${PETSC_ARCH} MPIEXEC="${MPIEXEC}" DATAFILESPATH=${DATAFILESPATH}; \
+        fi; \
+	${OMAKE}  tree_gmake_test ACTION=${ACTION} PETSC_ARCH=${PETSC_ARCH}  MPIEXEC="${MPIEXEC}" DATAFILESPATH=${DATAFILESPATH}) ;fi; \
+	done
+
 tests_DATAFILESPATH:
 	make ACTION=testexamples_DATAFILESPATH tree DATAFILESPATH=${DATAFILESPATH}
 

File config/PETSc/Configure.py

       for i in postPackages: i.postProcess()
     return
 
+  def DumpFeatures(self):
+    fd  = open(os.path.join(self.arch.arch,'conf','gmakevariables'),'w')
+    cnt = 0
+    fd.write('PETSCINSTALLEDFEATURES="')
+    for i in self.framework.packages:
+      if i.useddirectly and not i.PACKAGE.replace('-','_').lower() in ['mpi','pthread','blaslapack','sowing','valgrind']:
+        if cnt: fd.write(",")
+        fd.write(i.PACKAGE.replace('-','_').lower())
+        cnt = cnt+1
+    if cnt: fd.write(",")
+    fd.write(self.scalartypes.precision)
+    fd.write(",")
+    fd.write(self.scalartypes.scalartype)
+    fd.write(",")
+    fd.write(str(self.libraryoptions.integerSize)+'bitindices')
+    fd.write('"\n')
+    fd.close()
+
   def configure(self):
     if not os.path.samefile(self.petscdir.dir, os.getcwd()):
       raise RuntimeError('Wrong PETSC_DIR option specified: '+str(self.petscdir.dir) + '\n  Configure invoked in: '+os.path.realpath(os.getcwd()))
     self.cmakeBoot()
     self.DumpPkgconfig()
     self.DumpModule()
+    self.DumpFeatures()
     self.framework.log.write('================================================================================\n')
     self.logClear()
     return

File src/snes/examples/tutorials/ex10.c

-static const char help[] = "EXAMPLE REMOVED.\n\n";
-
-#undef __FUNCT__
-#define __FUNCT__ "main"
-int main(int argc, char *argv[])
-{
-  PetscErrorCode ierr;
-
-  ierr = PetscInitialize(&argc,&argv,0,help);CHKERRQ(ierr);
-  PetscFinalize();
-  return 0;
-}

File src/snes/examples/tutorials/ex19.c

   }
   PetscFunctionReturn(0);
 }
+
+/*
+   Compile Requirements:
+
+   Run Number Processes: 2
+   Run Output File:      ex19_1
+   Run Requirements:
+   Run Arguments:        -da_refine 3 -snes_monitor_short -pc_type mg -ksp_type fgmres -pc_mg_type full
+
+   Run Number Processes: 4
+   Run Output File:      ex19_2
+   Run Requirements:
+   Run Arguments:        -da_refine 3 -snes_converged_reason -pc_type mg -mat_fd_type ds
+
+   Run Number Processes: 2
+   Run Output File:      ex19_1
+   Run Requirements:
+   Run Arguments:        -da_refine 3 -snes_monitor_short -pc_type mg -ksp_type fgmres -pc_mg_type full -mat_fd_coloring_bcols 1
+
+   Run Number Processes: 4
+   Run Output File:      ex19_2
+   Run Requirements:
+   Run Arguments:        -da_refine 3 -snes_converged_reason -pc_type mg -mat_fd_type ds -mat_fd_coloring_bcols 1
+
+   Run Number Processes: 1
+   Run Output File:      ex19_fdcoloring_wp
+   Run Requirements:
+   Run Arguments:        -da_refine 3 -snes_monitor_short -pc_type mg
+
+   Run Number Processes: 1
+   Run Output File:      ex19_2
+   Run Requirements:
+   Run Arguments:        -da_refine 3 -snes_converged_reason -pc_type mg -mat_fd_type ds
+
+   Run Number Processes: 1
+   Run Output File:      ex19_fdcoloring_wp
+   Run Requirements:
+   Run Arguments:        -da_refine 3 -snes_monitor_short -pc_type mg -mat_fd_coloring_bcols 1
+
+   Run Number Processes: 1
+   Run Output File:      ex19_2
+   Run Requirements:
+   Run Arguments:        -da_refine 3 -snes_converged_reason -pc_type mg -mat_fd_type ds -mat_fd_coloring_bcols 1
+
+   Run Number Processes: 1
+   Run Output File:      ex19_fdcoloring_wp
+   Run Requirements:
+   Run Arguments:        -da_refine 3 -snes_monitor_short -pc_type mg -dm_mat_type baij
+
+   Run Number Processes: 1
+   Run Output File:      ex19_2
+   Run Requirements:
+   Run Arguments:        -da_refine 3 -snes_converged_reason -pc_type mg -mat_fd_type ds -dm_mat_type baij
+
+   Run Number Processes: 4
+   Run Output File:      ex19_3
+   Run Requirements:
+   Run Arguments:        -da_refine 3 -snes_monitor_short -pc_type redundant -mat_type mpiaij -redundant_ksp_type preonly -redundant_pc_factor_mat_solver_package mumps -pc_redundant_number 2
+
+Tests various scatter implementations
+   Run Number Processes: 4
+   Run Output File:      ex19_5
+   Run Requirements:
+   Run Arguments:        -da_refine 3 -ksp_type fgmres -pc_type mg -pc_mg_type full
+   Run Number Processes: 4
+   Run Output File:      ex19_5
+   Run Requirements:
+   Run Arguments:        -da_refine 3 -ksp_type fgmres -pc_type mg -pc_mg_type full -vecscatter_rsend
+   Run Number Processes: 4
+   Run Output File:      ex19_5
+   Run Requirements:
+   Run Arguments:        -da_refine 3 -ksp_type fgmres -pc_type mg -pc_mg_type full -vecscatter_ssend
+   Run Number Processes: 4
+   Run Output File:      ex19_5
+   Run Requirements:
+   Run Arguments:        -da_refine 3 -ksp_type fgmres -pc_type mg -pc_mg_type full -vecscatter_alltoall
+   Run Number Processes: 4
+   Run Output File:      ex19_5
+   Run Requirements:     mpi_alltoallw 32bitindices
+   Run Arguments:        -da_refine 3 -ksp_type fgmres -pc_type mg -pc_mg_type full -vecscatter_alltoall -vecscatter_nopack
+   Run Number Processes: 4
+   Run Output File:      ex19_5
+   Run Requirements:     mpi_win_create
+   Run Arguments:        -da_refine 3 -ksp_type fgmres -pc_type mg -pc_mg_type full -vecscatter_window
+
+   Run Number Processes: 1
+   Run Output File:      ex19_6
+   Run Requirements:
+   Run Arguments:        -snes_monitor_short -ksp_monitor_short -pc_type fieldsplit -snes_view -ksp_type fgmres -da_refine 1
+
+   Run Number Processes: 3
+   Run Output File:      ex19_7
+   Run Requirements:
+   Run Arguments:        -snes_monitor_short -ksp_monitor_short -pc_type fieldsplit -snes_view -da_refine 1 -ksp_type fgmres
+
+   Run Number Processes: 1
+   Run Output File:      ex19_8
+   Run Requirements:
+   Run Arguments:        -snes_monitor_short -ksp_monitor_short -pc_type fieldsplit -pc_fieldsplit_block_size 2 -pc_fieldsplit_0_fields 0,1 -pc_fieldsplit_1_fields 0,1 -pc_fieldsplit_type multiplicative -snes_view   -fieldsplit_pc_type lu -da_refine 1 -ksp_type fgmres
+
+   Run Number Processes: 3
+   Run Output File:      ex19_9
+   Run Requirements:
+   Run Arguments:        -snes_monitor_short -ksp_monitor_short -pc_type fieldsplit -pc_fieldsplit_type multiplicative -snes_view -da_refine 1 -ksp_type fgmres
+
+   Run Number Processes: 3
+   Run Output File:      ex19_10
+   Run Requirements:
+   Run Arguments:        -snes_monitor_short -ksp_monitor_short -pc_type fieldsplit -pc_fieldsplit_type symmetric_multiplicative -snes_view  -da_refine 1 -ksp_type fgmres
+
+   Run Number Processes: 4
+   Run Output File:      ex19_11
+   Run Requirements:
+   Run Arguments:         -snes_monitor_short -pc_type redundant -mat_type mpiaij -redundant_pc_factor_mat_solver_package pastix -pc_redundant_number 2 -da_refine 4 -ksp_type fgmres
+
+   Run Number Processes: 12
+   Run Output File:      ex19_12
+   Run Requirements:
+   Run Arguments:         -snes_monitor_short -pc_type redundant -mat_type mpiaij -redundant_pc_factor_mat_solver_package pastix -pc_redundant_number 5  -da_refine 4 -ksp_type fgmres
+
+   Run Number Processes: 3
+   Run Output File:      ex19_13
+   Run Requirements:
+   Run Arguments:        -snes_monitor_short -ksp_monitor_short -pc_type fieldsplit -pc_fieldsplit_type multiplicative -snes_view  -da_refine 1 -ksp_type fgmres  -snes_mf_operator
+
+   Run Number Processes: 4
+   Run Output File:      ex19_14
+   Run Requirements:
+   Run Arguments:        -snes_monitor_short -pc_type mg -dm_mat_type baij -mg_coarse_pc_type bjacobi -da_refine 3 -ksp_type fgmres
+
+   Run Number Processes: 4
+   Run Output File:      ex19_2
+   Run Requirements:
+   Run Arguments:        -snes_converged_reason -pc_type mg -dm_mat_type baij -mg_coarse_pc_type bjacobi -da_refine 3 -ksp_type fgmres -mat_fd_type ds
+
+   Run Number Processes: 1
+   Run Output File:      ex19_superlu
+   Run Requirements:
+   Run Arguments:        -da_grid_x 20 -da_grid_y 20 -pc_type lu -pc_factor_mat_solver_package superlu
+
+   Run Number Processes: 1
+   Run Output File:      ex19_superlu_equil
+   Run Requirements:
+   Run Arguments:         -da_grid_x 20 -da_grid_y 20 -snes_monitor_short -ksp_monitor_short -pc_type lu -pc_factor_mat_solver_package superlu -mat_superlu_equil
+
+   Run Number Processes: 1
+   Run Output File:      ex19_superlu
+   Run Requirements:
+   Run Arguments:        -da_grid_x 20 -da_grid_y 20 -pc_type lu -pc_factor_mat_solver_package superlu_dist
+
+   Run Number Processes: 2
+   Run Output File:      ex19_superlu
+   Run Requirements:
+   Run Arguments:        -da_grid_x 20 -da_grid_y 20 -pc_type lu -pc_factor_mat_solver_package superlu_dist
+
+   Run Number Processes: 1
+   Run Output File:      ex19_fieldsplit_2
+   Run Requirements:
+   Run Arguments:        -ksp_type fgmres -pc_type fieldsplit -pc_fieldsplit_block_size 4 -pc_fieldsplit_type additive -pc_fieldsplit_0_fields 0,1,2 -pc_fieldsplit_1_fields 3 -snes_monitor_short -ksp_monitor_short
+
+   Run Number Processes: 1
+   Run Output File:      ex19_fieldsplit_3
+   Run Requirements:
+   Run Arguments:        -ksp_type fgmres -pc_type fieldsplit -pc_fieldsplit_block_size 4 -pc_fieldsplit_type additive -pc_fieldsplit_0_fields 0,1,2 -pc_fieldsplit_1_fields 3 -fieldsplit_0_pc_type lu -fieldsplit_1_pc_type lu -snes_monitor_short -ksp_monitor_short
+
+   Run Number Processes: 1
+   Run Output File:      ex19_fieldsplit_4
+   Run Requirements:
+   Run Arguments:        -ksp_type fgmres -pc_type fieldsplit -pc_fieldsplit_block_size 4 -pc_fieldsplit_type SCHUR -pc_fieldsplit_0_fields 0,1,2 -pc_fieldsplit_1_fields 3 -fieldsplit_0_pc_type lu -fieldsplit_1_pc_type lu -snes_monitor_short -ksp_monitor_short
+
+   Run Number Processes: 2
+   Run Output File:      ex19_fieldsplit_5
+   Run Requirements:
+   Run Arguments:        -pc_type fieldsplit -pc_fieldsplit_block_size 4 -pc_fieldsplit_type SCHUR -pc_fieldsplit_0_fields 0,1,2 -pc_fieldsplit_1_fields 3 -fieldsplit_0_pc_type lu -fieldsplit_1_pc_type lu -snes_monitor_short -ksp_monitor_short  -fieldsplit_0_pc_factor_mat_solver_package mumps -fieldsplit_1_pc_factor_mat_solver_package mumps
+
+   Run Number Processes: 2
+   Run Output File:      ex19_fieldsplit_hypre
+   Run Requirements:
+   Run Arguments:        -pc_type fieldsplit -pc_fieldsplit_block_size 4 -pc_fieldsplit_type SCHUR -pc_fieldsplit_0_fields 0,1,2 -pc_fieldsplit_1_fields 3 -fieldsplit_0_pc_type lu -fieldsplit_0_pc_factor_mat_solver_package mumps -fieldsplit_1_pc_type hypre -fieldsplit_1_pc_hypre_type boomeramg -snes_monitor_short -ksp_monitor_short
+
+   Run Number Processes: 1
+   Run Output File:      ex19_composite_fieldsplit
+   Run Requirements:
+   Run Arguments:        -ksp_type fgmres -pc_type composite -pc_composite_type MULTIPLICATIVE -pc_composite_pcs fieldsplit,none -sub_0_pc_fieldsplit_block_size 4 -sub_0_pc_fieldsplit_type additive -sub_0_pc_fieldsplit_0_fields 0,1,2 -sub_0_pc_fieldsplit_1_fields 3 -snes_monitor_short -ksp_monitor_short
+
+   Run Number Processes: 1
+   Run Output File:      ex19_composite_fieldsplit_bjacobi
+   Run Requirements:
+   Run Arguments:        -ksp_type fgmres -pc_type composite -pc_composite_type MULTIPLICATIVE -pc_composite_pcs fieldsplit,bjacobi -sub_0_pc_fieldsplit_block_size 4 -sub_0_pc_fieldsplit_type additive -sub_0_pc_fieldsplit_0_fields 0,1,2 -sub_0_pc_fieldsplit_1_fields 3 -sub_1_pc_bjacobi_blocks 16 -sub_1_sub_pc_type lu -snes_monitor_short -ksp_monitor_short
+
+   Run Number Processes: 4
+   Run Output File:      ex19_composite_fieldsplit_bjacobi_2
+   Run Requirements:
+   Run Arguments:        -ksp_type fgmres -pc_type composite -pc_composite_type MULTIPLICATIVE -pc_composite_pcs fieldsplit,bjacobi -sub_0_pc_fieldsplit_block_size 4 -sub_0_pc_fieldsplit_type additive -sub_0_pc_fieldsplit_0_fields 0,1,2 -sub_0_pc_fieldsplit_1_fields 3 -sub_1_pc_bjacobi_blocks 16 -sub_1_sub_pc_type lu -snes_monitor_short -ksp_monitor_short
+
+   Run Number Processes: 4
+   Run Output File:      ex19_ngmres_nasm
+   Run Requirements:
+   Run Arguments:        -da_refine 4 -da_overlap 2 -snes_monitor_short -snes_type ngmres -snes_max_it 10 -npc_snes_type nasm -npc_snes_nasm_type basic -grashof 4e4 -lidvelocity 100
+
+   Run Number Processes: 4
+   Run Output File:      ex19_aspin
+   Run Requirements:
+   Run Arguments:        -da_refine 3 -da_overlap 2 -snes_monitor_short -snes_type aspin -grashof 4e4 -lidvelocity 100 -ksp_monitor_short
+
+   Run Number Processes: 1
+   Run Output File:      ex19_fas
+   Run Requirements:
+   Run Arguments:        -da_refine 4 -snes_monitor_short -snes_type fas -fas_levels_snes_type ngs -fas_levels_snes_ngs_sweeps 3 -fas_levels_snes_ngs_rtol 1e-15 -fas_levels_snes_ngs_atol 0.0 -fas_levels_snes_ngs_stol 0.0  -grashof 4e4 -snes_fas_smoothup 6 -snes_fas_smoothdown 6 -lidvelocity 100
+
+   Run Number Processes: 1
+   Run Output File:      ex19_fas_full
+   Run Requirements:
+   Run Arguments:        -da_refine 4 -snes_monitor_short -snes_type fas -snes_fas_type full -snes_fas_full_downsweep -fas_levels_snes_type ngs -fas_levels_snes_ngs_sweeps 3 -fas_levels_snes_ngs_rtol 1e-15 -fas_levels_snes_ngs_atol 0.0 -fas_levels_snes_ngs_stol 0.0 -grashof 4e4 -snes_fas_smoothup 6 -snes_fas_smoothdown 6 -lidvelocity 100
+
+   Run Number Processes: 1
+   Run Output File:      ex19_ngmres_fas
+   Run Requirements:
+   Run Arguments:        -da_refine 4 -snes_monitor_short -snes_type ngmres -npc_fas_levels_snes_type ngs -npc_fas_levels_snes_ngs_sweeps 3 -npc_fas_levels_snes_ngs_rtol 1e-15 -npc_fas_levels_snes_ngs_atol 0.0 -npc_fas_levels_snes_ngs_stol 0.0 -npc_snes_type fas -npc_fas_levels_snes_type ngs -npc_snes_max_it 1 -npc_snes_fas_smoothup 6 -npc_snes_fas_smoothdown 6  -lidvelocity 100 -grashof 4e4
+
+   Run Number Processes: 1
+   Run Output File:      ex19_ngmres_fas_gssecant
+   Run Requirements:
+   Run Arguments:        -da_refine 3 -snes_monitor_short -snes_type ngmres -npc_snes_type fas -npc_fas_levels_snes_type ngs -npc_fas_levels_snes_max_it 6 -npc_fas_levels_snes_ngs_secant -npc_fas_levels_snes_ngs_max_it 1 -npc_fas_coarse_snes_max_it 1 -lidvelocity 100 -grashof 4e4
+
+   Run BROKEN Number Processes: 2
+   Run BROKEN Output File:      ex19_ngmres_fas_ms
+   Run BROKEN Requirements:
+   Run BROKEN Arguments:        -snes_grid_sequence 2 -lidvelocity 200 -grashof 1e4 -snes_monitor_short -snes_view -snes_converged_reason -snes_type ngmres -npc_snes_type fas -npc_fas_coarse_snes_type newtonls -npc_fas_coarse_ksp_type preonly -npc_snes_max_it 1 -npc_fas_snes_type ms -npc_fas_snes_max_it 1 -npc_fas_ksp_type preonly -npc_fas_pc_type none -npc_fas_snes_ms_type m62 -npc_fas_snes_max_it 1 -npc_fas_snes_ms_damping 0.22
+
+   Run Number Processes: 4
+   Run Output File:      ex19_bjacobi
+   Run Requirements:
+   Run Arguments:        -da_refine 4 -ksp_type fgmres -pc_type bjacobi -pc_bjacobi_blocks 2 -sub_ksp_type gmres -sub_ksp_max_it 2 -sub_pc_type bjacobi -sub_sub_ksp_type preonly -sub_sub_pc_type ilu -snes_monitor_short
+
+   Run Number Processes: 2
+   Run Output File:      ex19_composite_gs_newton
+   Run Requirements:
+   Run Arguments:        -da_refine 3 -grashof 4e4 -lidvelocity 100 -snes_monitor_short -snes_type composite -snes_composite_type additiveoptimal -snes_composite_sneses ngs,newtonls -sub_0_snes_max_it 20 -sub_1_pc_type mg
+
+   Run Number Processes: 1
+   Run Output File:      ex19_draw
+   Run Requirements:     x
+   Run Arguments:        -pc_type fieldsplit -snes_view draw -fieldsplit_x_velocity_pc_type mg -fieldsplit_x_velocity_pc_mg_galerkin -fieldsplit_x_velocity_pc_mg_levels 2 -da_refine 1 -fieldsplit_x_velocity_mg_coarse_pc_type svd
+
+
+*/

File src/snes/examples/tutorials/ex33.c

   DM             da;     /* grid */
   Vec            u;      /* solution vector */
   AppCtx         user;   /* user-defined work context */
-  PetscReal      t;      /* time */
+  PetscReal      t = 0.0;      /* time */
   PetscErrorCode ierr;
   PetscInt       n;
 

File src/snes/examples/tutorials/ex56.c

-static char help[] = "REPLACE WITH AN ACTUAL EXAMPLE\n\n";
-
-#undef __FUNCT__
-#define __FUNCT__ "main"
-int main(int argc, char **argv)
-{
-  ierr = PetscInitialize(&argc, &argv, NULL, help);CHKERRQ(ierr);
-  ierr = PetscFinalize();
-  return 0;
-}

File src/snes/examples/tutorials/ex57.c

-static char help[] = "REPLACE WITH AN ACTUAL EXAMPLE\n\n";
-
-#undef __FUNCT__
-#define __FUNCT__ "main"
-int main(int argc, char **argv)
-{
-  ierr = PetscInitialize(&argc, &argv, NULL, help);CHKERRQ(ierr);
-  ierr = PetscFinalize();
-  return 0;
-}

File src/snes/examples/tutorials/ex60.c

   ierr = DMDASetElementType(user.da2,DMDA_ELEMENT_P1);CHKERRQ(ierr);
 
   /* Set x and y coordinates */
-  ierr = DMDASetUniformCoordinates(user.da1,user.xmin,user.xmax,user.ymin,user.ymax,NULL,NULL);CHKERRQ(ierr);
-  ierr = DMDASetUniformCoordinates(user.da2,user.xmin,user.xmax,user.ymin,user.ymax,NULL,NULL);CHKERRQ(ierr);
+  ierr = DMDASetUniformCoordinates(user.da1,user.xmin,user.xmax,user.ymin,user.ymax,0.0,0.0);CHKERRQ(ierr);
+  ierr = DMDASetUniformCoordinates(user.da2,user.xmin,user.xmax,user.ymin,user.ymax,0.0,0.0);CHKERRQ(ierr);
   /* Get global vector x from DM (da1) and duplicate vectors r,xl,xu */
   ierr = DMCreateGlobalVector(user.da1,&x);CHKERRQ(ierr);
   ierr = VecGetSize(x,&N);CHKERRQ(ierr);

File src/snes/examples/tutorials/ex61.c

   ierr = DMDASetElementType(user.da2,DMDA_ELEMENT_P1);CHKERRQ(ierr);
 
   /* Set x and y coordinates */
-  ierr = DMDASetUniformCoordinates(user.da1,user.xmin,user.xmax,user.ymin,user.ymax,NULL,NULL);CHKERRQ(ierr);
-  ierr = DMDASetUniformCoordinates(user.da2,user.xmin,user.xmax,user.ymin,user.ymax,NULL,NULL);CHKERRQ(ierr);
+  ierr = DMDASetUniformCoordinates(user.da1,user.xmin,user.xmax,user.ymin,user.ymax,0.0,0.0);CHKERRQ(ierr);
+  ierr = DMDASetUniformCoordinates(user.da2,user.xmin,user.xmax,user.ymin,user.ymax,0.0,0.0);CHKERRQ(ierr);
 
 
   /* Get global vector x from DM (da1) and duplicate vectors r,xl,xu */
 PetscErrorCode Update_q(AppCtx *user)
 {
   PetscErrorCode ierr;
-  PetscScalar    *q_p,*w1,*w2,max1;
+  PetscScalar    *q_p,*w1,*w2;
   PetscInt       i,n;
 
   PetscFunctionBeginUser;

File src/snes/examples/tutorials/ex63.c

   ierr = DMDASetElementType(user.da2,DMDA_ELEMENT_P1);CHKERRQ(ierr);
 
   /* Set x and y coordinates */
-  ierr = DMDASetUniformCoordinates(user.da1,user.xmin,user.xmax,NULL,NULL,NULL,NULL);CHKERRQ(ierr);
-  ierr = DMDASetUniformCoordinates(user.da2,user.xmin,user.xmax,NULL,NULL,NULL,NULL);CHKERRQ(ierr);
+  ierr = DMDASetUniformCoordinates(user.da1,user.xmin,user.xmax,0.0,0.0,0.0,0.0);CHKERRQ(ierr);
+  ierr = DMDASetUniformCoordinates(user.da2,user.xmin,user.xmax,0.0,0.0,0.0,0.0);CHKERRQ(ierr);
   /* Get global vector x from DM (da1) and duplicate vectors r,xl,xu */
   ierr = DMCreateGlobalVector(user.da1,&x);CHKERRQ(ierr);
   ierr = VecDuplicate(x,&r);CHKERRQ(ierr);
   PetscErrorCode ierr;
   PetscScalar    *q_p, *w1, *w2;
   PetscInt       i,n;
-  PetscScalar    norm1;
 
   PetscFunctionBeginUser;
   ierr = VecPointwiseMult(user->Riv,user->eta,user->eta);CHKERRQ(ierr);
   PetscScalar       x[2];
   Vec               coords;
   const PetscScalar *_coords;
-  PetscViewer       view;
   PetscScalar       xwidth = user->xmax - user->xmin;
 
   PetscFunctionBeginUser;

File src/snes/examples/tutorials/ex64.c

   ierr = DMDASetElementType(user.da2,DMDA_ELEMENT_P1);CHKERRQ(ierr);
 
   /* Set x and y coordinates */
-  ierr = DMDASetUniformCoordinates(user.da1,user.xmin,user.xmax,NULL,NULL,NULL,NULL);CHKERRQ(ierr);
-  ierr = DMDASetUniformCoordinates(user.da2,user.xmin,user.xmax,NULL,NULL,NULL,NULL);CHKERRQ(ierr);
+  ierr = DMDASetUniformCoordinates(user.da1,user.xmin,user.xmax,0.0,0.0,0.0,0.0);CHKERRQ(ierr);
+  ierr = DMDASetUniformCoordinates(user.da2,user.xmin,user.xmax,0.0,0.0,0.0,0.0);CHKERRQ(ierr);
   /* Get global vector x from DM (da1) and duplicate vectors r,xl,xu */
   ierr = DMCreateGlobalVector(user.da1,&x);CHKERRQ(ierr);
   ierr = VecDuplicate(x,&r);CHKERRQ(ierr);

File src/snes/examples/tutorials/ex65.c

   Mat            J;
   PetscScalar    t=0.0;
   /* PetscViewer    view_out, view_p, view_q, view_psi, view_mat; */
-  PetscReal      bounds[] = {1000.0,-1000.,0.0,1.0,1000.0,-1000.0,0.0,1.0,1000.0,-1000.0};
+  PetscReal      PETSC_UNUSED bounds[] = {1000.0,-1000.,0.0,1.0,1000.0,-1000.0,0.0,1.0,1000.0,-1000.0};
 
 
   PetscInitialize(&argc,&argv, (char*)0, help);
   ierr = DMDASetElementType(user.da2,DMDA_ELEMENT_P1);CHKERRQ(ierr);
 
   /* Set x and y coordinates */
-  ierr = DMDASetUniformCoordinates(user.da1,user.xmin,user.xmax,user.ymin,user.ymax,NULL,NULL);CHKERRQ(ierr);
-  ierr = DMDASetUniformCoordinates(user.da2,user.xmin,user.xmax,user.ymin,user.ymax,NULL,NULL);CHKERRQ(ierr);
+  ierr = DMDASetUniformCoordinates(user.da1,user.xmin,user.xmax,user.ymin,user.ymax,0.0,0.0);CHKERRQ(ierr);
+  ierr = DMDASetUniformCoordinates(user.da2,user.xmin,user.xmax,user.ymin,user.ymax,0.0,0.0);CHKERRQ(ierr);
   /* Get global vector x from DM (da1) and duplicate vectors r,xl,xu */
   ierr = DMCreateGlobalVector(user.da1,&x);CHKERRQ(ierr);
   ierr = VecDuplicate(x,&r);CHKERRQ(ierr);
 
   while (t<user.T) {
 
-    char        filename[PETSC_MAX_PATH_LEN];
-    PetscScalar a = 1.0;
-    PetscInt    i;
-    /*PetscViewer  view;*/
-
-
     ierr = SNESSetFunction(snes,r,FormFunction,(void*)&user);CHKERRQ(ierr);
     ierr = SNESSetJacobian(snes,J,J,FormJacobian,(void*)&user);CHKERRQ(ierr);
 
   PetscScalar       x[3],y[3];
   Vec               coords;
   const PetscScalar *_coords;
-  PetscScalar       xwidth = user->xmax - user->xmin, ywidth = user->ymax - user->ymin;
+  PetscScalar       xwidth = user->xmax - user->xmin;
 
   PetscFunctionBeginUser;
   ierr = VecGetLocalSize(X,&n);CHKERRQ(ierr);
 PetscErrorCode Phi_read(AppCtx *user)
 {
   PetscErrorCode ierr;
-  PetscReal      *values;
   PetscViewer    viewer;
   PetscInt       power;
 

File src/snes/examples/tutorials/ex653d.c

   Vec            xl,xu; /* Upper and lower bounds on variables */
   Mat            J;
   PetscScalar    t=0.0;
-  PetscViewer    view_out, view_p, view_q, view_psi, view_mat, view_vtk_cv,view_vtk_eta;
-  char           cv_filename[80],eta_filename[80];
-  PetscReal      bounds[] = {1000.0,-1000.,0.0,1.0,1000.0,-1000.0,0.0,1.0,1000.0,-1000.0};
+  PetscReal      PETSC_UNUSED bounds[] = {1000.0,-1000.,0.0,1.0,1000.0,-1000.0,0.0,1.0,1000.0,-1000.0};
 
 
   PetscInitialize(&argc,&argv, (char*)0, help);
 
   while (t<user.T) {
 
-    char        filename[PETSC_MAX_PATH_LEN];
-    PetscScalar a = 1.0;
-    PetscInt    i;
-    PetscViewer view;
-
-
     ierr = SNESSetFunction(snes,r,FormFunction,(void*)&user);CHKERRQ(ierr);
     ierr = SNESSetJacobian(snes,J,J,FormJacobian,(void*)&user);CHKERRQ(ierr);
 
   PetscErrorCode ierr;
   PetscInt       n,i,j,Xda,Yda,Zda;
   PetscScalar    *xx,*cv_p,*wv_p,*eta_p;
-  PetscViewer    view_out;
 
   /* needed for the void growth case */
   PetscScalar       xmid,ymid,zmid,cv_v=1.0,cv_m=user->Sv*user->cv0,eta_v=1.0,eta_m=0.0,h,lambda;
   PetscErrorCode ierr;
   PetscInt       nele,nen,i,j,n;
   const PetscInt *ele;
-  PetscScalar    dt=user->dt,hx,hy,hz;
+  PetscScalar    hx,hy,hz;
 
   PetscInt    idx[8];
   PetscScalar eM_0[8][8],eM_2[8][8];

File src/snes/examples/tutorials/gmakefile

+
+# make runexN   or make runexN UPDATEFILE=outputfileyouwantupdated
+#
+PETSCFEATURES="pastix,mumps,superlu,hypre,spai,superlu,superlu_dist,metis,parmetis,sundials,ml,real,complex,single,double,__float128,mpi_win_create,mpi_alltoallw,32bitindices,64bitindices"
+
+#CPPFLAGS	 = -I/PETSc3/geodynamics/PetscSimulationsViewers/src
+CFLAGS           =
+FFLAGS		 =
+CPPFLAGS         =
+FPPFLAGS         =
+LOCDIR		 = src/snes/examples/tutorials/
+MANSEC           = SNES
+EXAMPLESC	 := $(shell ls *.c)
+EXAMPLESF	 := $(shell ls *.F *.F90)
+EXAMPLESCH	 = ex43-44.h
+EXAMPLESFH       = ex5f.h
+EXAMPLESMATLAB   = ex5m.m  ex61genm.m ex61m.m
+DIRS		 = ex10d
+
+EXECUTABLES = $(EXAMPLESC:.c=)
+
+all: ${EXECUTABLES}
+include ${PETSC_DIR}/conf/variables
+include ${PETSC_DIR}/conf/rules
+include ${PETSC_DIR}/${PETSC_ARCH}/conf/gmakevariables
+
+ex%.o : ex%.c  chkopts
+	-@${PCC} -o $@ -c $< ${PCC_FLAGS} ${CFLAGS} ${CCPPFLAGS}
+
+ex31.h:
+	-${PETSC_DIR}/bin/pythonscripts/PetscGenerateFEMQuadrature.py 2 2 2 1 laplacian 2 1 1 1 gradient 2 1 1 1 identity ${PETSC_DIR}/src/snes/examples/tutorials/ex31.h
+ex31: ex31.h ex31.o chkopts
+	-@${CLINKER} -o $@ $< ${PETSC_SNES_LIB}
+
+ex%f.o : ex%f.F  chkopts
+	-@${FC} -o $@ -c $< ${FC_FLAGS} ${FFLAGS} ${FCPPFLAGS}
+
+ex%f90.o : ex%f90.F  chkopts
+	-@${FC} -o $@ -c $< ${FC_FLAGS} ${FFLAGS} ${FCPPFLAGS}
+
+ex% : ex%.o  chkopts
+	-@${CLINKER} -o $@ $< ${PETSC_SNES_LIB}
+
+ex%f : ex%f.o  chkopts
+	-@${FLINKER} -o $@ $< ${PETSC_SNES_LIB}
+	-@${RM} $<
+
+ex%f90 : ex%f.o  chkopts
+	-@${FLINKER} -o $@ $< ${PETSC_SNES_LIB}
+	-@${RM} $<
+
+runex%: ex%
+	@IFS=',' command read -a packages <<< "${PETSCFEATURES}";\
+        IFS=',' command read -a  installedpackages <<< "${PETSCINSTALLEDFEATURES}";\
+        a=`grep "Run Number Processes:" $<.c | sed "s/Run Number Processes://g"`; \
+        a=`echo "$${a}" | tr -d ' ' | tr '\n' '>'`;\
+        IFS='>' command read -a  sizes <<< "$${a}";\
+	inargs=`grep "Run Arguments:" $<.c | sed "s/Run Arguments://g"`; \
+        inargs=`echo "$${inargs}" | tr -s ' ' | tr '\n' '>'`;\
+        IFS='>' command read -a  args <<< "$${inargs}";\
+	inofile=`grep "Run Output File:" $<.c | sed "s/Run Output File://g"`; \
+        inofile=`echo "$${inofile}" | tr -d ' ' | tr '\n' '>'`;\
+        IFS='>' command read -a  ofile <<< "$${inofile}";\
+	orequirements=`grep "Run Requirements:" $<.c | sed "s/Run Requirements://g"`; \
+        orequirements=`echo "$${orequirements}" | tr -d ' ' | tr '\n' '>'`;\
+        IFS='>' command read -a requirements <<< "$${orequirements}";\
+        Len=$${#args[@]};\
+        for (( i=0; i<$${Len}; i++ )); do \
+           found="yes";\
+           command read -a  argarray <<< "$${args[$${i}]} $${requirements[$${i}]}";\
+           for p in "$${packages[@]}"; do \
+             if [[ " $${argarray[@]} " =~ " $$p " ]]; then \
+               if ! [[ " $${installedpackages[@]} " =~ " $$p " ]]; then \
+                  if [[ "${verbose}" == "yes" ]]; then echo Rejected due to $$p; fi;\
+                 found="no"; \
+                 continue ; \
+               fi; \
+             fi;\
+           done; \
+           if [[ "$${found}" == "no" ]]; then continue; fi; \
+           if [[ "${UPDATEFILE}" == $${ofile[$$i]}.out ]]; then \
+             ${MPIEXEC} -n $${sizes[$${i}]} ./$< $${args[$${i}]} > output/$${ofile[$$i]}.out ; \
+           elif [[ "${UPDATEFILE}" == "" ]]; then \
+             ${MPIEXEC} -n $${sizes[$${i}]} ./$< $${args[$${i}]} > tmpdata 2>&1; \
+	       if !(${PETSC_DIR}/bin/petscdiff output/$${ofile[$$i]}.out tmpdata) then  \
+	         printf "${PWD}\nPossible problem with -np $${sizes[$${i}]} $< $${args[$${i}]} :: $${ofile[$$i]}.out\n==========================================================================\n"; \
+               fi; \
+	     ${RM} tmpdata;\
+           fi; \
+         done
+
+include ${PETSC_DIR}/conf/test
+

File src/snes/examples/tutorials/makefile

 ex65: ex65.o  chkopts
 	-${CLINKER} -o ex65 ex65.o ${PETSC_SNES_LIB}
 	${RM} ex65.o
-ex653d: ex653D.o chkopts
+ex653d: ex653d.o chkopts
 	-${CLINKER} -o ex653d ex653D.o ${PETSC_SNES_LIB}
 	${RM} ex653d.o
 ex65dm: ex65dm.o  chkopts

File src/snes/examples/tutorials/output/ex19_13.out

     1 KSP Residual norm 1.07362e-05 
     2 KSP Residual norm 3.78935e-06 
     3 KSP Residual norm 1.43754e-06 
-    4 KSP Residual norm 6.54958e-07 
-    5 KSP Residual norm 5.1222e-07 
+    4 KSP Residual norm 6.54959e-07 
+    5 KSP Residual norm 5.12221e-07 
     6 KSP Residual norm 3.42561e-07 
     7 KSP Residual norm 1.45139e-07 
-    8 KSP Residual norm 7.40915e-08 
-    9 KSP Residual norm 3.7962e-08 
-   10 KSP Residual norm 1.50282e-08 
+    8 KSP Residual norm 7.40916e-08 
+    9 KSP Residual norm 3.79621e-08 
+   10 KSP Residual norm 1.50283e-08 
    11 KSP Residual norm 5.03342e-09 
-   12 KSP Residual norm 2.41714e-09 
+   12 KSP Residual norm 2.41715e-09 
    13 KSP Residual norm 1.38641e-09 
    14 KSP Residual norm 7.047e-10 
    15 KSP Residual norm 3.897e-10 
    16 KSP Residual norm 2.021e-10 
   2 SNES Function norm 2.020e-10 
 SNES Object: 3 MPI processes
-  type: ls
+  type: newtonls
   maximum iterations=50, maximum function evaluations=10000
   tolerances: relative=1e-08, absolute=1e-50, solution=1e-08
   total number of linear solver iterations=31
   total number of function evaluations=129
+  SNESLineSearch Object:   3 MPI processes
+    type: bt
+      interpolation: cubic
+      alpha=1.000000e-04
+    maxstep=1.000000e+08, minlambda=1.000000e-12
+    tolerances: relative=1.000000e-08, absolute=1.000000e-15, lambda=1.000000e-08
+    maximum iterations=40
   KSP Object:   3 MPI processes
     type: fgmres
       GMRES: restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement
             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift to prevent zero pivot [NONZERO]
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:
                   total number of mallocs used during MatSetValues calls =0
                     not using I-node routines
           linear system matrix = precond matrix:
-          Mat Object:           1 MPI processes
+          Mat Object:          (fieldsplit_x_velocity_)           1 MPI processes
             type: seqaij
             rows=21, cols=21
             total: nonzeros=85, allocated nonzeros=85
             total number of mallocs used during MatSetValues calls =0
               not using I-node routines
         linear system matrix = precond matrix:
-        Mat Object:         3 MPI processes
+        Mat Object:        (fieldsplit_x_velocity_)         3 MPI processes
           type: mpiaij
           rows=49, cols=49
           total: nonzeros=217, allocated nonzeros=217
             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift to prevent zero pivot [NONZERO]
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:
                   total number of mallocs used during MatSetValues calls =0
                     not using I-node routines
           linear system matrix = precond matrix:
-          Mat Object:           1 MPI processes
+          Mat Object:          (fieldsplit_y_velocity_)           1 MPI processes
             type: seqaij
             rows=21, cols=21
             total: nonzeros=85, allocated nonzeros=85
             total number of mallocs used during MatSetValues calls =0
               not using I-node routines
         linear system matrix = precond matrix:
-        Mat Object:         3 MPI processes
+        Mat Object:        (fieldsplit_y_velocity_)         3 MPI processes
           type: mpiaij
           rows=49, cols=49
           total: nonzeros=217, allocated nonzeros=217
             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift to prevent zero pivot [NONZERO]
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:
                   total number of mallocs used during MatSetValues calls =0
                     not using I-node routines
           linear system matrix = precond matrix:
-          Mat Object:           1 MPI processes
+          Mat Object:          (fieldsplit_Omega_)           1 MPI processes
             type: seqaij
             rows=21, cols=21
             total: nonzeros=85, allocated nonzeros=85
             total number of mallocs used during MatSetValues calls =0
               not using I-node routines
         linear system matrix = precond matrix:
-        Mat Object:         3 MPI processes
+        Mat Object:        (fieldsplit_Omega_)         3 MPI processes
           type: mpiaij
           rows=49, cols=49
           total: nonzeros=217, allocated nonzeros=217
             ILU: out-of-place factorization
             0 levels of fill
             tolerance for zero pivot 2.22045e-14
-            using diagonal shift to prevent zero pivot [NONZERO]
+            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]
             matrix ordering: natural
             factor fill ratio given 1, needed 1
               Factored matrix follows:
                   total number of mallocs used during MatSetValues calls =0
                     not using I-node routines
           linear system matrix = precond matrix:
-          Mat Object:           1 MPI processes
+          Mat Object:          (fieldsplit_temperature_)           1 MPI processes
             type: seqaij
             rows=21, cols=21
             total: nonzeros=85, allocated nonzeros=85
             total number of mallocs used during MatSetValues calls =0
               not using I-node routines
         linear system matrix = precond matrix:
-        Mat Object:         3 MPI processes
+        Mat Object:        (fieldsplit_temperature_)         3 MPI processes
           type: mpiaij
           rows=49, cols=49
           total: nonzeros=217, allocated nonzeros=217
       rows=196, cols=196, bs=4
       total: nonzeros=3472, allocated nonzeros=3472
       total number of mallocs used during MatSetValues calls =0
-  SNESLineSearch Object:   3 MPI processes
-    type: bt
-      interpolation: cubic
-      alpha=1.000000e-04
-    maxstep=1.000000e+08, minlambda=1.000000e-12
-    tolerances: relative=1.000000e-08, absolute=1.000000e-15, lambda=1.000000e-08
-    maximum iterations=40
 Number of SNES iterations = 2