saving parallel vectors
Barry Smith
bsmith at mcs.anl.gov
Thu Nov 23 19:34:05 CST 2006
NEVER use ascii for large data sets. Use the binary viewer to save
them. See PetscViewerBinaryOpen().
Barry
On Thu, 23 Nov 2006, Matteo Semplice wrote:
> This is really a newbie question but I am struggling to solve out of memory
> troubles on my first processor.
>
> I have a parallel global vector, say v, that I obtain with a call to
> DAGetGlobalVector. I save it to disk opening an ASCII standard viewer on
> PETSC_COMM_WORLD and calling VecView. As I understand from the manual, this
> causes all processors to send their data to the first one and this one writes
> them to disk. This works fine for small computational grids, but hangs my
> program if the grid is bigger.
>
> I am thinking to get each processor to write its own file and reassemble the
> data at the end of the program. I tried to create the viewer with the
> communicator PETSC_COMM_SELF and issue VecView. I get as many files as
> processors, but the first one contains all the data and the others are empty!
>
> Why? And, more importantly, what's the best way to achieve my goal?
>
> Thanks a lot.
>
> Matteo
>
>
More information about the petsc-users
mailing list