Commits

Hong Zhang committed 598e8b1

update tests: -matptap_sparseaxpy has been replace with -matptap_scalable

  • Participants
  • Parent commits d696997

Comments (0)

Files changed (2)

src/mat/examples/tests/makefile

 	   if (${DIFF} output/ex94_1.out ex94_1.tmp) then true; \
 	   else echo ${PWD} ; echo "Possible problem with ex94_scalable1, diffs above \n========================================="; fi; \
 	   ${RM} -f ex94_1.tmp
-runex94_2:
-	-@${MPIEXEC} -n 3 ./ex94 -f0 ${DATAFILESPATH}/matrices/medium -f1 ${DATAFILESPATH}/matrices/medium -matptap_sparseaxpy 0> ex94_2.tmp 2>&1; \
-	   if (${DIFF} output/ex94_1.out ex94_2.tmp) then true; \
-	   else echo ${PWD} ; echo "Possible problem with ex94_2, diffs above \n========================================="; fi; \
-	   ${RM} -f ex94_2.tmp
-runex94_2_spaxpy1:
-	-@${MPIEXEC} -n 3 ./ex94 -f0 ${DATAFILESPATH}/matrices/medium -f1 ${DATAFILESPATH}/matrices/medium -matptap_sparseaxpy 1> ex94_2.tmp 2>&1; \
-	   if (${DIFF} output/ex94_1.out ex94_2.tmp) then true; \
-	   else echo ${PWD} ; echo "Possible problem with ex94_2, diffs above \n========================================="; fi; \
-	   ${RM} -f ex94_2.tmp
-runex94_2_spaxpy2:
-	-@${MPIEXEC} -n 3 ./ex94 -f0 ${DATAFILESPATH}/matrices/medium -f1 ${DATAFILESPATH}/matrices/medium -matptap_sparseaxpy 2> ex94_2.tmp 2>&1; \
-	   if (${DIFF} output/ex94_1.out ex94_2.tmp) then true; \
-	   else echo ${PWD} ; echo "Possible problem with ex94_2, diffs above \n========================================="; fi; \
-	   ${RM} -f ex94_2.tmp
 runex94_2_matmatmult:
-	-@${MPIEXEC} -n 3 ./ex94 -f0 ${DATAFILESPATH}/matrices/medium -f1 ${DATAFILESPATH}/matrices/medium -matptap_sparseaxpy 0 -matmatmult_scalable> ex94_2.tmp 2>&1; \
+	-@${MPIEXEC} -n 3 ./ex94 -f0 ${DATAFILESPATH}/matrices/medium -f1 ${DATAFILESPATH}/matrices/medium -matptap_scalable 0 -matmatmult_scalable> ex94_2.tmp 2>&1; \
 	   if (${DIFF} output/ex94_1.out ex94_2.tmp) then true; \
 	   else echo ${PWD} ; echo "Possible problem with ex94_2_matmatmult, diffs above \n========================================="; fi; \
 	   ${RM} -f ex94_2.tmp
 TESTEXAMPLES_DATAFILESPATH     = ex40.PETSc runex40 ex40.rm ex42.PETSc runex42 \
                                  ex42.rm  ex41.PETSc ex41.rm ex47.PETSc ex47.rm ex53.PETSc runex53 ex53.rm \
                                  ex94.PETSc runex94_matmatmult runex94_matmatmult_2 runex94_scalable0 runex94_scalable1 \
-                                 runex94_2 runex94_2_spaxpy1 runex94_2_spaxpy2 runex94_2_matmatmult runex94_2_mattransposematmult ex94.rm \
+                                 runex94_2_matmatmult runex94_2_mattransposematmult ex94.rm \
                                  ex136.PETSc runex136 runex136_2 runex136_3 \
                                  runex136_4 runex136_5 runex136_6 ex136.rm  ex140.PETSc runex140 runex140_2 runex140_3 runex140_4 ex140.rm \
                                  ex100.PETSc runex100 ex100.rm ex125.PETSc runex125 ex125.rm

src/mat/impls/aij/seq/matptap.c

   MatScalar      *ca;
   Mat_PtAP       *ptap;
   Mat            Pt,AP;
-  PetscBool      sparse_axpy=PETSC_TRUE;
+  PetscBool      scalable=PETSC_TRUE;
 
   PetscFunctionBegin;
   ierr = PetscObjectOptionsBegin((PetscObject)A);CHKERRQ(ierr);
-  /* flag 'sparse_axpy' determines which implementations to be used:
+  /* flag 'scalable' determines which implementations to be used:
        0: do dense axpy in MatPtAPNumeric() - fastest, but requires storage of struct A*P;
-       1: do two sparse axpy in MatPtAPNumeric() - slowest, does not store structure of A*P. */
-  ierr = PetscOptionsBool("-matptap_scalable","Use sparse axpy but slower MatPtAPNumeric()","",sparse_axpy,&sparse_axpy,NULL);CHKERRQ(ierr);
+       1: do two sparse axpy in MatPtAPNumeric() - might slow, does not store structure of A*P. */
+  ierr = PetscOptionsBool("-matptap_scalable","Use sparse axpy but might slower MatPtAPNumeric()","",scalable,&scalable,NULL);CHKERRQ(ierr);
   ierr = PetscOptionsEnd();CHKERRQ(ierr);
-  if (sparse_axpy) {
+  if (scalable) {
     ierr = MatPtAPSymbolic_SeqAIJ_SeqAIJ_SparseAxpy(A,P,fill,C);CHKERRQ(ierr);
     PetscFunctionReturn(0);
   }
   ierr = MatDestroy(&Pt);CHKERRQ(ierr);
   ierr = MatDestroy(&AP);CHKERRQ(ierr);
 #if defined(PETSC_USE_INFO)
-  ierr = PetscInfo2((*C),"given fill %G, use scalable %d\n",fill,sparse_axpy);CHKERRQ(ierr);
+  ierr = PetscInfo2((*C),"given fill %G, use scalable %d\n",fill,scalable);CHKERRQ(ierr);
 #endif
   PetscFunctionReturn(0);
 }