Commit 7b3169b7 authored by D'azevedo, Ed's avatar D'azevedo, Ed
Browse files

print gflop rate

parent 4852f828
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -249,8 +249,8 @@ int main(int argc, char *argv[])
    };


 {
 double total_gflops = 0;
 {
 double gmemA = 0;
 double gmemB = 0;
 double gmemBX = 0;
@@ -326,7 +326,9 @@ int main(int argc, char *argv[])
 int itimes = 0;
 const int ntimes = 3;

 double total_time = -dmrg_get_wtime();
 for(itimes=1; itimes <= ntimes; itimes++) {
   double ttime = -dmrg_get_wtime();
   if (use_sparse) {

     apply_Htarget_sparse( noperator, npatches,
@@ -341,7 +343,13 @@ int main(int argc, char *argv[])
                       Abatch_, ld_Abatch, Bbatch_,  ld_Bbatch, X_, Y_ );
   
    };
   ttime += dmrg_get_wtime();
   printf("itimes=%d, time=%lf, gflops=%lf\n", 
           itimes,    ttime,       total_gflops/ttime );
  };
 total_time += dmrg_get_wtime();
 printf("total_time = %lf sec, ntimes = %d, averaged gflops = %lf\n", 
         total_time,   ntimes,  ntimes * total_gflops / total_time );
 }

#ifdef USE_GETSET