On Aug 30, 2013, at 1:04 PM, France Boillod-Cerneux <[email protected]> 
wrote:

> Dear PETSc user,
> 
> I am using MatMult() function in a C++ program.
> 
> Currently, my matrix is MATMPIAIJ format type, and I load the matrix from a 
> binary file at petsc format. let's call the matrix A:
> 
> I know before the execution the global rows, columns and nnz.
> 
> my program is doing something like:
> 
  PetscLogDouble prevflops,myflops;

> global loop
>      //begin to measure flop rate
       PetscGetFlops(&prevFlops);
>      inner loop
>            MatMult(A,x,y)
>      end inner loop
       PetscGetFlops(&myflops);
       my flops -= prevFlops;   /* each MPI process has how many flops IT has 
done


>      //want to know Flop rate of Matmult at this point
> end global loop
> 
> I am looking for a function to know at runtime the flop rate for each process 
> regarding matmult function.
> 
> I had a look at pdf of Loic Gouarin (introduction to pertsc, performance May 
> 2013) but it does not correspond to what i want, or i missunderstood?
> 
> My other solution is using the matmpiaijsetpreallocation and therefore know 
> the complete parallel distribution of A, but this implies a pre-treatment on 
> my matrix A.
> 
> I was wondering if i can create my matrix A without knowing in advance the 
> parallel distribution and then collect the information about parallel 
> distribution?
> 
> Or more easier, if a function like PetscGetFlops could solve my problem? 
> so far i understood that this function measure the flop since the begining of 
> program, but this is not what i want to use, i want to have the flop ratio 
> right after ending the inner loop, and this, for each global iteration
> 
> Any ideas/suggestions would help,
> 
> Thank you very much,
> 
> France
> 
> 
> -- 
> Bien cordialement - Best regards - Mit freundlichen Grüßen, 
>  
> France BOILLOD-CERNEUX
> PhD Student, Laboratoire d'Informatique Fondamentale de Lille
> (LIFL), CNRS
>  
> [email protected]
> Tel. : +33 (0) 1 6908 - 9527
> Tel. : +33 (0) 6 4781 - 3059
>  
> DEN/DANS/DM2S
> CEA Saclay
> 91191 Gif-sur-Yvette
> FRANCE
>  
> http://www.lifl.fr/
> www-centre-saclay.cea.fr
>  

Reply via email to