<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 11 April 2017 at 17:31, Rodrigo Felicio <span dir="ltr"><<a href="mailto:Rodrigo.Felicio@iongeo.com" target="_blank">Rodrigo.Felicio@iongeo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks, Jed, but using color == 0 lead to the same error msg. Is there no way to set PETSc.COMM_WORLD to a subcomm instead of MPI.COMM_WORLD in python?<br>
<br></blockquote><div><br></div><div><br></div><div>You can do it, but it is a bit tricky, and related to the fact that PETSC_COMM_WORLD has to be set to subcomm before calling PetscInitialize(), which happens automatically the first time Python executes "from petsc4py import PETSc". The way to do it would be the following:</div><div><br></div><div>import sys, petsc4py</div><div>petsc4py.init(sys.argv, comm=subcomm)<br></div><div>from petsc4py import PETSc<br></div><div><br></div></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Lisandro Dalcin<br>============<br>Research Scientist<br>Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)<br>Extreme Computing Research Center (ECRC)<br>King Abdullah University of Science and Technology (KAUST)<br><a href="http://ecrc.kaust.edu.sa/" target="_blank">http://ecrc.kaust.edu.sa/</a><br><br>4700 King Abdullah University of Science and Technology<br>al-Khawarizmi Bldg (Bldg 1), Office # 0109<br>Thuwal 23955-6900, Kingdom of Saudi Arabia<br><a href="http://www.kaust.edu.sa" target="_blank">http://www.kaust.edu.sa</a><br><br>Office Phone: +966 12 808-0459</div>
</div></div>