Commits

BarryFSmith committed 0b71c13 Merge

Merge branch 'barry/fix-more-examples' into next

  • Participants
  • Parent commits 02feeec, f086f45
  • Branches jed/next-seaice, knepley/fix-quadrature-order 2
    1. madams/sr1
    2. next-oct-2014

Comments (0)

Files changed (8)

File src/ksp/ksp/examples/tutorials/makefile

                                  ex31.PETSc ex31.rm ex32.PETSc runex32 ex32.rm ex34.PETSc runex34 ex34.rm ex38.PETSc runex38 ex38.rm \
                                  ex43.PETSc runex43 runex43_2 runex43_3 runex43_bjacobi runex43_bjacobi_baij ex43.rm \
                                  ex45.PETSc runex45 runex45_2 ex45.rm \
-                                 ex49.PETSc runex49 runex49_2 runex49_3 runex49_5 ex49.rm ex53.PETSc runex53 ex53.rm ex55.PETSc runex55_SA runex55_Classical ex55.rm\
+                                 ex49.PETSc runex49 runex49_2 runex49_3 runex49_5 ex49.rm ex53.PETSc runex53 ex53.rm ex55.PETSc runex55_Classical ex55.rm\
                                  ex56.PETSc runex56_nns runex56 ex56.rm \
                                  ex58.PETSc runex58 runex58_baij runex58_sbaij ex58.rm
 TESTEXAMPLES_C_X	       = ex2.PETSc runex2_5 ex2.rm ex5.PETSc runex5_5 ex5.rm ex8.PETSc ex8.rm ex28.PETSc runex28 ex28.rm

File src/mat/color/impls/natural/natural.c

   }
 
   ierr = MatGetSize(mat_seq,&n,NULL);CHKERRQ(ierr);
-  ierr = MatView(mat_seq,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr);
   ierr = MatGetOwnershipRange(mat_seq,&start,&end);CHKERRQ(ierr);
   n    = n/bs;
   if (n > IS_COLORING_MAX-1) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"Maximum color size exceeded");

File src/sys/examples/tests/ex1f.F

       return
       end
 
-      subroutine MyErrHandler(line,fun,file,n,p,mess,ctx,ierr)
+      subroutine MyErrHandler(comm,line,fun,file,n,p,mess,ctx,ierr)
 #include <finclude/petscsys.h>
       integer line,n,p
       PetscInt ctx
       PetscErrorCode ierr
+      MPI_Comm comm
       character*(*) fun,file,mess
 
       print*,'My error handler ',mess

File src/sys/examples/tests/makefile

 	${RM} -f ex25.o
 #----------------------------------------------------------------------------
 runex1:
-	-@${MPIEXEC} -n 1 ./ex1
-	-@echo "This is a contrived error to test error handling."
+	-@${MPIEXEC} -n 1 ./ex1 > ex1.tmp1 2>&1; egrep "(main|CreateError|Error Created)" ex1.tmp1 | cut -f1,2,3,4,5 -d" " > ex1.tmp;\
+	if (${DIFF} output/ex1_1.out ex1.tmp) then true; \
+	   else echo ${PWD} ; echo "Possible problem with with ex1_1, diffs above \n========================================="; fi; \
+	   ${RM} -f ex1.tmp1 ex1.tmp
 
 runex1f:
-	-@${MPIEXEC} -n 1 ./ex1f
-	-@echo "This is a contrived error to test error handling."
+	-@${MPIEXEC} -n 1 ./ex1f  > ex1f.tmp1 2>&1; egrep "(PETSC ERROR)" ex1f.tmp1  > ex1f.tmp;\
+	if (${DIFF} output/ex1f_1.out ex1f.tmp) then true; \
+	   else echo ${PWD} ; echo "Possible problem with with ex1_1, diffs above \n========================================="; fi; \
+	   ${RM} -f ex1f.tmp1 ex1f.tmp
 
 runex2:
-	-@${MPIEXEC} -n 1 ./ex2
-	-@echo "This is a contrived error to test error handling."
+	-@${MPIEXEC} -n 1 ./ex2 > ex2.tmp1 2>&1; egrep "(Caught signal number 11 SEGV)" ex2.tmp1  > ex2.tmp;\
+	if (${DIFF} output/ex2_1.out ex2.tmp) then true; \
+	   else echo ${PWD} ; echo "Possible problem with with ex2_1, diffs above \n========================================="; fi; \
+	   ${RM} -f ex2.tmp1 ex2.tmp
 
 runex3:
-	-@${MPIEXEC} -n 1 ./ex3 -fp_trap
-	-@echo "This is a contrived error to test error handling of floating point exceptions."
+	-@${MPIEXEC} -n 1 ./ex3 -fp_trap > ex3.tmp1 2>&1; egrep "(PetscDefaultFPTrap|CreateError)" ex3.tmp1 | cut -f1,2,3,4 -d" " > ex3.tmp;\
+	if (${DIFF} output/ex3_1.out ex3.tmp) then true; \
+	   else echo ${PWD} ; echo "Possible problem with with ex3_1, diffs above \n========================================="; fi; \
+	   ${RM} -f ex3.tmp1 ex3.tmp
 
 runex7:
 	-@${MPIEXEC} -n 1 ./ex7 > ex7.tmp 2>&1;\

File src/sys/examples/tests/output/ex1_1.out

+[0]PETSC ERROR: Error Created!
+[0]PETSC ERROR: CreateError() line 11
+[0]PETSC ERROR: CreateError() line 12
+[0]PETSC ERROR: CreateError() line 12
+[0]PETSC ERROR: CreateError() line 12
+[0]PETSC ERROR: CreateError() line 12
+[0]PETSC ERROR: CreateError() line 12
+[0]PETSC ERROR: main() line 25

File src/sys/examples/tests/output/ex1f_1.out

+[0]PETSC ERROR: User provided function() line 36 in User file
+[0]PETSC ERROR: User provided function() line 46 in User file Error message

File src/sys/examples/tests/output/ex2_1.out

+[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range

File src/sys/examples/tests/output/ex3_1.out

+[0]PETSC ERROR: [0] PetscDefaultFPTrap
+[0]PETSC ERROR: [0] CreateError