[petsc-users] problem in divide the matrix between processes for MatCreateMPIAIJWithArrays()

Jed Brown jed at jedbrown.org
Mon Aug 18 17:30:41 CDT 2014


Priyank Patel <ppate024 at odu.edu> writes:

> Hello,
> I am trying to divide the rows between the processes for MatCreateMPIAIJWithArrays() but I am unable to create a fully functional code for that.
> Is there any easy way to do it or is there anybody who have any ready code that I can use to divide the rows to use in MatCreateMPIAIJWithArrays().

You should really use MatSetValues.  It is unconditionally better for
memory usage and flexibility.  MatCreateMPIAIJWithArrays exists for
people that already made a mistake in their software by manually
building these useless arrays (you can't compute with them directly),
refuse to update their code, but insist on passing them to PETSc.  If
you don't already have exactly the right arrays, you definitely
shouldn't use the function.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140818/e52aaf0b/attachment-0001.pgp>


More information about the petsc-users mailing list