VecView and MPI IO
Shao-Ching Huang
schuang at ats.ucla.edu
Fri Feb 6 18:27:49 CST 2009
Hi
I am getting a zero-sized file "foo.info" when I write a vector, say
"my_vec", to disk file "foo":
MPI_Comm comm;
PetscViewer viewer;
Vec my_vec;
...
PetscViewerBinaryOpen(comm, "foo", FILE_MODE_WRITE, &viewer);
VecView(my_vec, viewer);
PetscViewerDestroy(viewer);
My questions are:
1. Can I safely ignore the .info file? (Is it useful?)
2. How can I prevent the .info file from being generated?
Thanks,
Shao-Ching
Matthew Knepley wrote:
> On Thu, Feb 5, 2009 at 7:48 PM, Shao-Ching Huang <schuang at ats.ucla.edu> 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.
>
> Matt
>
>> Thank you.
>>
>> Shao-Ching
More information about the petsc-users
mailing list