[petsc-users] PetscViewerASCIISynchronizedPrintf

Konstantinos Kontzialis ckontzialis at lycos.com
Fri Feb 10 06:24:46 CST 2012


Dear all,

  I am trying to print data from all the processes in a single file and 
I use the following command

ierr = PetscViewerASCIIOpen(sys.comm, "cp.dat", &viewer1);
     CHKERRQ(ierr);

ierr = PetscViewerASCIISynchronizedAllow(viewer1, PETSC_TRUE);
CHKERRQ(ierr);

.
.

/* Some user operations */
.
.
.
ierr = PetscViewerASCIISynchronizedPrintf(viewer1,
                             "%le\t%le\t%le\n", cp, x[0], x[1]);
                     CHKERRQ(ierr);

ierr = PetscViewerFlush(viewer1);
                     CHKERRQ(ierr);

but at run time the code hangs. What should I do?

Kostas


More information about the petsc-users mailing list