One other quick note: Sometimes it appears that mpi4py for petsc4py do not always play nicely together. I think you want to do the petsc4py import first and then the mpi4py import. Then you can split the MPI.COMM_WORLD all you want and create any petsc4py objects on them. Or if that doesn't work, swap the import order. If I recall correctly, you could get a warning on exit that something in mpi4py wasn't cleaned up correctly.
Gaetan On Wed, Apr 12, 2017 at 7:30 AM, Rodrigo Felicio <[email protected] > wrote: > Thanks Jed and Gaetan. > I will try that approach of splitting PETSc.COMM_WORLD, but I still need > to load mpi4py (probably after PETSc), because PETSc.Comm is very limited, > i.e., it does not have the split function, for example. My goal is to be > able to set different matrices and vectors for each subcommunicator, and I > am guessing that I can create them using something like > PETSc.Mat().createAij(comm=subcomm) > > Kind regards > Rodrigo > > ________________________________ > > > This email and any files transmitted with it are confidential and are > intended solely for the use of the individual or entity to whom they are > addressed. If you are not the original recipient or the person responsible > for delivering the email to the intended recipient, be advised that you > have received this email in error, and that any use, dissemination, > forwarding, printing, or copying of this email is strictly prohibited. If > you received this email in error, please immediately notify the sender and > delete the original. > >
