[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: saving parallel vectors



Thansk for all the replies.

I always thought that binary format would be best, but I couldn't find any description of the binary format. Could you point me to a relevant piece of the docs? Can I load the PETSC binary files into MatLab or DataExplorer for further processing and visualization?

Matteo

On Thu, 23 Nov 2006, Barry Smith wrote:

 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




-- -- Matteo Semplice Dip. di Matematica - Universita` degli Studi di Milano Via Saldini, 50 - 20133 MILANO. Tel: +39 02 50316170