[petsc-dev] Do not use PetscSequentialPhaseBegin/End to attempt to control stdout
Smith, Barry F.
bsmith at mcs.anl.gov
Thu Sep 19 21:37:12 CDT 2019
It does not work! Use PetscViewerASCIISyncronizedPrintf() and PetscViewerGetSubviewer() as needed
These codes break the automated testing because once in a great while the output is in a different order.
ierr = PetscSequentialPhaseBegin(PETSC_COMM_WORLD,1);CHKERRQ(ierr);
ierr = PetscViewerASCIIPrintf(PETSC_VIEWER_STDOUT_SELF, "[%d] ==========================\n",rank);CHKERRQ(ierr);
for (d=depth-1; d>=0; d--) {
ierr = PetscViewerASCIIPrintf(PETSC_VIEWER_STDOUT_SELF, "depth %D ---------------\n",d);CHKERRQ(ierr);
ierr = PetscSectionView(sects[d], PETSC_VIEWER_STDOUT_SELF);CHKERRQ(ierr);
ierr = ISView(iss[d], PETSC_VIEWER_STDOUT_SELF);CHKERRQ(ierr);
}
ierr = PetscSequentialPhaseEnd(PETSC_COMM_WORLD,1);CHKERRQ(ierr);
Thanks
More information about the petsc-dev
mailing list