Commits

BarryFSmith  committed 1ee5a33

have alltests run the new gmake source file based tests to see if they work portably

  • Participants
  • Parent commits 61c3311
  • Branches barry/new-test-makefiles, knepley/fix-quadrature-order 1
    1. next-oct-2014

Comments (0)

Files changed (4)

 	-@${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 src/snes/examples/tutorials/ex19.c

    Run Number Processes: 1
    Run Output File:      ex19_superlu_equil
    Run Requirements:
-   Run Arguments:         -da_grid_x 20 -da_grid_y 20 -{snes,ksp}_monitor_short -pc_type lu -pc_factor_mat_solver_package superlu -mat_superlu_equil
+   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 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_gs_sweeps 3 -fas_levels_snes_gs_rtol 1e-15 -fas_levels_snes_gs_atol 0.0 -fas_levels_snes_gs_stol 0.0  -grashof 4e4 -snes_fas_smoothup 6 -snes_fas_smoothdown 6 -lidvelocity 100
+   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_gs_sweeps 3 -fas_levels_snes_gs_rtol 1e-15 -fas_levels_snes_gs_atol 0.0 -fas_levels_snes_gs_stol 0.0 -grashof 4e4 -snes_fas_smoothup 6 -snes_fas_smoothdown 6 -lidvelocity 100
+   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_gs_sweeps 3 -npc_fas_levels_snes_gs_rtol 1e-15 -npc_fas_levels_snes_gs_atol 0.0 -npc_fas_levels_snes_gs_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 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_gs_secant -npc_fas_levels_snes_gs_max_it 1 -npc_fas_coarse_snes_max_it 1 -lidvelocity 100 -grashof 4e4
+   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

File src/snes/examples/tutorials/gmakefile

 
-# This directory contains SNES example programs for solving systems of
-# nonlinear equations.
-
+# 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
              fi;\
            done; \
            if [[ "$${found}" == "no" ]]; then continue; fi; \
-           ${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"; \
+           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; \
-	   ${RM} tmpdata;\
          done
 
 include ${PETSC_DIR}/conf/test

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