[petsc-users] direct access of seqcusp Vec

Barry Smith bsmith at mcs.anl.gov
Thu Sep 29 16:51:29 CDT 2011


  For VecNorm_MPICUSP() it called VecNorm_SeqCUSP() which logged the flops but then VecNorm_MPICUSP() logged it again. Hence they were double counted. I will push an update to petsc-dev in a few minutes that fixes this.

  MatMult_SeqAIJ() attempts to be more careful in the count by taking into account that each completely empty row contributes one less flop then expected which the CUSP cannot easily do that since we don't know how the CUSP actually implements the product for empty rows and are too lazy to check.

   I cannot explain why the VecMDot are slightly different. Since PETSc is all open source and we value improvements by our users you are free to look more closely to see if you can determine why the mdot values are slighly different.

   Thanks for reporting the bug,

    Barry



On Sep 29, 2011, at 4:36 PM, Shiyuan wrote:

> 
> > Also, i notice that, the flops count from --log_summary are different if we switch on/off -vec_type seqcusp and -mat_type seqaijcusp?
> 
>   Are you sure the exact same solver is being used and the exact same number of iterations. Check the -log_summary table for the number of times
> each operation (vecdot, matmult etc etc) is done for the cusp and non-cusp case, if they are different then you will get different counts.
> 
>  I have two runs of ex19, exactly same options except -da_vec_type seqcusp and -da_mat_type are switch on/off.  The count of each operation are the same but the flops count for some operations are different. 
> 
> 
> VecMDot           2024 1.0 4.1337e+00 1.0 2.50e+09 1.0 0.0e+00 0.0e+00 0.0e+00 17 29  0  0  0  19 29  0  0  0   605
> VecNorm           2096 1.0 9.4352e-01  1.0 1.68e+08 1.0 0.0e+00 0.0e+00 0.0e+00  4    2  0  0  0   4  2  0  0  0   178
> MatMult             2092 1.0 1.2145e+01 1.0 3.24e+09 1.0 0.0e+00 0.0e+00 0.0e+00 50 37  0  0  0  56 37  0  0  0   267
> 
> vs.
> VecMDot             2024 1.0 1.0873e+00 1.0 2.54e+09 1.0 0.0e+00 0.0e+00 0.0e+00 17 28  0  0  0  28 28  0  0  0  2340
> VecNorm             2096 1.0 1.2240e-01 1.0 3.35e+08 1.0 0.0e+00 0.0e+00 0.0e+00  2  4  0  0  0   3  4  0  0  0  2740
> MatMult             2092 1.0 1.7572e+00 1.0 3.32e+09 1.0 0.0e+00 0.0e+00 0.0e+00 28 37  0  0  0  46 37  0  0  0  1890
> 
> #PETSc Option Table entries:
> -cusp_synchronize
> -da_grid_x 100
> -da_grid_y 100
> -da_mat_type mpiaijcusp
> -da_vec_type mpicusp
> -dmmg_nlevels 1
> -log_summary
> -mat_no_inode
> -pc_type none
> -preload off
> #End of PETSc Option Table entries
> 
> The whole -log_summary is attached. 
> Thanks. 
> <Perf_ex19_cusp_0><Perf_ex19>



More information about the petsc-users mailing list