Commits

Hong Zhang committed 26be727

PetscGetTime -> PetscTime

Comments (0)

Files changed (2)

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

 #include <../src/mat/utils/petscheap.h>
 #include <petscbt.h>
 #include <../src/mat/impls/dense/seq/dense.h>
+#include <petsctime.h>
 
 static PetscErrorCode MatMatMultSymbolic_SeqAIJ_SeqAIJ_LLCondensed(Mat,Mat,PetscReal,Mat*);
 
     PetscLogDouble       t0,t1,t2,t3,Bt_den,C_den,C_sp;
 
     /* Get Bt_dense by Apply MatTransposeColoring to B */
-    ierr = PetscGetTime(&t0);CHKERRQ(ierr);
+    ierr = PetscTime(&t0);CHKERRQ(ierr);
     Bt_dense = multtrans->Bt_den;
     ierr = MatTransColoringApplySpToDen(matcoloring,B,Bt_dense);CHKERRQ(ierr);
-    ierr = PetscGetTime(&t1);CHKERRQ(ierr);
+    ierr = PetscTime(&t1);CHKERRQ(ierr);
     Bt_den = t1 - t0;
 
     /* C_dense = A*Bt_dense */
     ierr = MatMatMultNumeric_SeqAIJ_SeqDense(A,Bt_dense,C_dense);CHKERRQ(ierr);
-    ierr = PetscGetTime(&t2);CHKERRQ(ierr);
+    ierr = PetscTime(&t2);CHKERRQ(ierr);
     C_den = t2 - t1;
 
     /* Recover C from C_dense */
     ierr = MatTransColoringApplyDenToSp(matcoloring,C_dense,C);CHKERRQ(ierr);
-    ierr = PetscGetTime(&t3);CHKERRQ(ierr);
+    ierr = PetscTime(&t3);CHKERRQ(ierr);
     C_sp = t3 - t2;
 #if defined(PETSC_USE_INFO)
     ierr = PetscInfo4(C,"Coloring A*B^T = Bt_den %g + C_den %g + C_sp %g = %g;\n",Bt_den,C_den,C_sp,Bt_den+C_den+C_sp);CHKERRQ(ierr);

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

       Mat AB_den;
       ierr = MatMatMultSymbolic_SeqAIJ_SeqDense(A,B,0.0,&AB_den);CHKERRQ(ierr);
 
-      ierr = PetscGetTime(&t0);CHKERRQ(ierr);
+      ierr = PetscTime(&t0);CHKERRQ(ierr);
       ierr = MatMatMultNumeric_SeqAIJ_SeqDense(A,B,AB_den);CHKERRQ(ierr);
-      ierr  = PetscGetTime(&tf);CHKERRQ(ierr);
+      ierr  = PetscTime(&tf);CHKERRQ(ierr);
       Mult_sp_den1 += tf - t0;
-      ierr = PetscGetTime(&t0);CHKERRQ(ierr);
+      ierr = PetscTime(&t0);CHKERRQ(ierr);
       ierr = MatMatMultNumeric_SeqAIJ_SeqDense(R,AB_den,RAB);CHKERRQ(ierr);
-      ierr  = PetscGetTime(&tf);CHKERRQ(ierr);
+      ierr  = PetscTime(&tf);CHKERRQ(ierr);
       Mult_sp_den2 += tf - t0;
       printf(" MatMatMatMultNumeric_SeqAIJ_SeqAIJ_SeqDense...time = %g + %g = %g; ncolor: %d\n",Mult_sp_den1, Mult_sp_den2, Mult_sp_den1+ Mult_sp_den2,B->cmap->n);
       ierr = MatDestroy(&AB_den);CHKERRQ(ierr);
       ierr = PetscLogEventEnd(MAT_RARtSymbolic,A,R,0,0);CHKERRQ(ierr);
     } 
     ierr = PetscLogEventBegin(MAT_RARtNumeric,A,R,0,0);CHKERRQ(ierr);
-    ierr = PetscGetTime(&t0);CHKERRQ(ierr);
+    ierr = PetscTime(&t0);CHKERRQ(ierr);
     ierr = MatMatTransposeMultNumeric_SeqAIJ_SeqAIJ(A,R,ARt);CHKERRQ(ierr); /* dominate! */
-    ierr = PetscGetTime(&t1);CHKERRQ(ierr);
+    ierr = PetscTime(&t1);CHKERRQ(ierr);
     ierr = MatMatMultNumeric_SeqAIJ_SeqAIJ(R,ARt,RARt);CHKERRQ(ierr);
-    ierr = PetscGetTime(&t2);CHKERRQ(ierr);
+    ierr = PetscTime(&t2);CHKERRQ(ierr);
     printf(" matrart_color_art_num = %g + %g = %g\n",t1-t0,t2-t1,t2-t0);
     *C = RARt;
     ierr = PetscLogEventEnd(MAT_RARtNumeric,A,R,0,0);CHKERRQ(ierr);