[petsc-users] PETSc read binary matrix row by row
Junchao Zhang
junchao.zhang at gmail.com
Thu May 22 09:51:51 CDT 2025
Did you run in MPI parallel? If not, using MPI and running with multiple
compute nodes could solve the problem.
Are all these matrices already on disk? Then you have to pay the I/O cost
for reading the matrices.
--Junchao Zhang
On Thu, May 22, 2025 at 8:21 AM Donald Duck <superdduck88 at gmail.com> wrote:
> Hello everyone
>
> A piece of c++ code writes PETSc AIJ matrices to binary files. My task is
> to compute an average matrix of these AIJ matrices. Therefore I read the
> first matrix with petsc4py and then start to add the other matrices to it.
> All matrixes always have the same size, shape, nnz etc.
>
> However in some cases these matrices are large and only one of it fits
> into memory and the reading/writing takes a significant amout of time. Is
> there a way to read it row by row to prevent memory overflow?
>
> I'm also open for other suggestions, thanks in advance!
>
> Raphael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250522/f61da184/attachment.html>
More information about the petsc-users
mailing list