[petsc-users] Error with PETSc logging

TAY wee-beng zonexo at gmail.com
Mon Oct 8 09:19:04 CDT 2012


Hi,

I am trying to log my PETSc performance in stages.

I initially used:

/PetscLogStage  stages(2)//
//
//do time = 1,n//
////
//    ...//
//
//    call PetscLogStageRegister("momentum_eqn",stages(1),ierr)//
//
//    call PetscLogStagePush(stages(1),ierr)//
//
//    stage 1 logging//
//
//    call PetscLogStagePop(ierr)//
//
//    ...//
//
//    call PetscLogStageRegister("poisson_eqn",stages(2),ierr)//
//
//    call PetscLogStagePush(stages(2),ierr)//
//
//    stage 2 logging//
//
//    call PetscLogStagePop(ierr)//
//
//end do/


The log_summary shows that results in stages 1 and 2, but I also get the 
error:

Invalid argument!
[1]PETSC ERROR: Duplicate stage name given: poisson_eqn!

I changed my code to only call PetscLogStageRegister once:

/PetscLogStage  stages(2)//
//
//call PetscLogStageRegister("momentum_eqn",stages(1),ierr)//
//
//call PetscLogStageRegister("poisson_eqn",stages(2),ierr)//
/ /
//do time = 1,n//
////
//    ...//
/ /
//    call PetscLogStagePush(stages(1),ierr)//
/ /
//    stage 1 logging//
/ /
//    call PetscLogStagePop(ierr)//
/ /
////...//
/ /
//    call PetscLogStagePush(stages(2),ierr)//
/ /
//    stage 2 logging//
/ /
//    call PetscLogStagePop(ierr)//
/ /
//end do/

Now there's no error but all logging are now grouped together into just 
1 main stage.

How can I correct it to have separate logging? Tks!

-- 
Yours sincerely,

TAY wee-beng

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20121008/67461d0c/attachment.html>


More information about the petsc-users mailing list