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 <[email protected]> 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.
> 
> 
> 

Reply via email to