[petsc-users] Slepc reading distributed matrix from files

errabii sohaib errabiisohaib at gmail.com
Tue Jul 4 12:19:38 CDT 2017


This is an awesome tip thank you so much. I have written an embarassingly
parallel reader (since i am reading from several files) but i was worried
that my main program won't be able to use more processors than the number
of files, but this tip should save me so much trouble. Thank you.

2017-07-04 19:08 GMT+02:00 Barry Smith <bsmith at mcs.anl.gov>:

>
>     We recommend writing a utility program that runs on one process and
> reads in the files putting the values into a matrix then using MatView()
> with a binary viewer to save the matrix to a file.
>
>      Then in your parallel program you simply call MatLoad() and it
> efficiently loads up the matrix into your program in parallel.
>
>      This means you don't need to write a parallel reader, you only need
> to write a sequential one which is easier.
>
>    Barry
>
> > On Jul 4, 2017, at 4:22 AM, errabii sohaib <errabiisohaib at gmail.com>
> wrote:
> >
> > Hi,
> >
> > I am trying to use petsc4py and slepc4py to read a matrix that is
> distributed on several files, In which i save the non zero elements by
> specifiying three arrays (A, I, J) for Coeffs, rows and columns indices.
> > I am currently using MUMPS and i simply read a file and pass the A,I,J
> arrays to MUMPS with each process. I am trying to do the same, however i am
> still confused how matrices are structured in PETSc and if its even
> possible to read n files and pass the matrix to PETsc to solve with
> slepc4py using atleast n processes.
> >
> > Thank you very much for your time,
> > Sohaib.
> >
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170704/f506a305/attachment.html>


More information about the petsc-users mailing list