[petsc-users] Implementing checkpoints in matrix construction

Matthew Knepley knepley at gmail.com
Fri Aug 17 15:16:09 CDT 2018


On Fri, Aug 17, 2018 at 4:02 PM Smith, Barry F. <bsmith at mcs.anl.gov> wrote:

>
>    I assume the matrix is relatively sparse?
>
>    It is not even close to being amenable to this type of thing.
>
>    I would simply have your program save the matrix entries to disk in
> some simple binary format and write another simple program that reads them
> in and sets them into a SeqAIJ matrix,


It might be that his matrix is too large for the memory of one node. Is it?
If so, you could use Jed's scheme for decomposing it.
If that is not easy, you could do that following:

  1) Preallocate the matrix

  2) Fill it with zeros

  3) Start calculating entries and adding them

  4) At any time you can MatView() the matrix in binary format

  5) You can always restart your calculations from the last MatView() just
by MatLoad()ing that file

  Thanks,

     MAtt


> then VecView that matrix to a binary viewer, finally have your eigenvalue
> code simply use VecLoad to load the matrix and start the eigen computations.
>
>    Barry
>
>
> > On Aug 17, 2018, at 2:45 PM, Pham, Dung Ngoc <dnpham at wpi.edu> wrote:
> >
> > Dear Petsc developers and Users,
> >
> > I am constructing a very large matrices (~5,000,000*5,000,000) for a
> generalized eigenvalue problem in MPIAIJ format across multiple nodes. The
> program is to be run on a shared HPC cluster using Slurm workload manager.
> Due to multiple loops and calculations needed, the matrix construction time
> is long (may span for more than a week).
> >
> > Hence, I am trying to see if I can implement checkpoints into the codes,
> so that the matrix can be constructed partially through multiple job
> submissions, each job picking up from where the previous one left until the
> matrix is fully built and we can write the global matrix into a binary file
> for further eigenvalue analysis. My questions are:
> > Does Petsc MPIAIJ format is amenable to such check points?
> > If so, are there any subroutines/functions that I can start with?
> >
> > I appreciate any comments/suggestions.
> >
> > Thank you,
> > D. N. Pham
>
>

-- 
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

https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180817/9c76a5d4/attachment.html>


More information about the petsc-users mailing list