On Fri, Aug 21, 2020 at 9:51 AM Nikhil Vaidya <nikhilvaidy...@gmail.com>
wrote:

> Hello,
>
> I need to print the sparse matrices (Petsc) and vectors involved in my
> calculations to file using print_matlab(). I have observed that the
> matrices and vectors that are written to the matlab scripts in serial and
> parallel runs are not identical. Is this actually the case or am I missing
> something?
>

By "not identical" I guess you mean that they don't match in all digits,
but are they at least "close"? It's normal to have floating point
differences between serial and parallel runs, but they should be due to
different orders of operations and therefore of order 10-100 * machine
epsilon.


Furthermore, is there another function to write matrices and vectors to
> file which is independent of whether the execution is serial or parallel?
>

print_matlab() uses all the standard PetscViewer interfaces so it's going
to be your best bet. I would suggest printing a test matrix that you know
to be identical in serial and parallel first before trying to print a
matrix from a "production" run.

-- 
John

_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to