[petsc-users] Understanding MatCreate bsize parameter
Jed Brown
jed at jedbrown.org
Thu Mar 26 08:34:27 CDT 2015
Florian Lindner <mailinglists at xgm.de> writes:
> Hello,
>
> I'm using petsc with petsc4py.
>
> A matrix is created like that
>
> MPIrank = MPI.COMM_WORLD.Get_rank()
> MPIsize = MPI.COMM_WORLD.Get_size()
> print("MPI Rank = ", MPIrank)
> print("MPI Size = ", MPIsize)
> parts = partitions()
>
> print("Dimension= ", nSupport + dimension, "bsize = ", len(parts[MPIrank]))
>
> MPI.COMM_WORLD.Barrier() # Just to keep the output together
> A = PETSc.Mat(); A.createDense( (nSupport + dimension, nSupport + dimension), bsize = len(parts[MPIrank]) ) # <-- crash here
bsize is collective (must be the same on all processes). It is used for
vector-valued problems (like elasticity -- bs=3 in 3 dimensions).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150326/a429b023/attachment.pgp>
More information about the petsc-users
mailing list