VecView and MPI IO

Matthew Knepley knepley at
Thu Feb 5 20:32:29 CST 2009

On Thu, Feb 5, 2009 at 7:48 PM, Shao-Ching Huang <schuang at> wrote:
> Hi,
> I am trying to create restart/check-pointing files for a time-stepping
> simulation (by writing out vectors to files).
> 1. Does VecView always use the MPI collective I/O?
>   The HTML documentation of PetscViewerBinaryOpen says: "For writing
>   files it only opens the file on processor 0 in the communicator."

You must run with -viewer_binary_mpiio. However, I recommend very very
strongly that you profile this first. We have not need to use MPI/IO below
several thousand processors.

> 2. Do I have to set anything to enable MPI I/O when configuring PETSc?
>   (My MPI library has MPI I/O.)

This should happen automatically.


> Thank you.
> Shao-Ching
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

More information about the petsc-users mailing list