[petsc-users] parallel matmult flop measure

France Boillod-Cerneux boillod.france at gmail.com
Fri Aug 30 13:20:13 CDT 2013


thank you very much to both of you!



On Fri, Aug 30, 2013 at 8:13 PM, Matthew Knepley <knepley at gmail.com> wrote:

> On Fri, Aug 30, 2013 at 1:04 PM, France Boillod-Cerneux <
> boillod.france at gmail.com> 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:
>>
>> global loop
>>      //begin to measure flop rate
>>      inner loop
>>            MatMult(A,x,y)
>>      end inner loop
>>      //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.
>>
>
> You can do what Barry suggests, however there might be intervening work,
> so you can be more precise using:
>
>   PetscStageLog      stageLog;
>   PetscEventPerfLog  eventLog;
>   PetscInt           stage = 0;
>   PetscLogEvent      event;
>   PetscEventPerfInfo eventInfo;
>
>   PetscLogGetStageLog(&stageLog);
>   PetscStageLogGetEventPerfLog(stageLog, stage, &eventLog);
>   eventInfo = eventLog->eventInfo[MAT_Mult];
>   <Use eventInfo.flops/eventInfo.time>
>
>   Thanks,
>
>       Matt
>
> 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*
>>
>> France.Boillod-Cerneux at cea.fr
>> 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 <http://www-centre-saclay.cea.fr/en>
>>
>>
>
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>



-- 
Bien cordialement - Best regards - Mit freundlichen Grüßen,

*France BOILLOD-CERNEUX *
*PhD Student, Laboratoire d'Informatique Fondamentale de Lille *
*(LIFL), CNRS*

France.Boillod-Cerneux at cea.fr
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 <http://www-centre-saclay.cea.fr/en>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130830/3c633cbc/attachment-0001.html>


More information about the petsc-users mailing list