<div dir="ltr">Hello all, <br><br>Another question in a fairly long line of questions from me. Thank you to this community for all the help I've gotten.<div><br></div><div>I have a Fortran/PETSc-based code that, with the help of f2py and some of you, I have compiled into a python module (we'll call it pc_fort_mod). So I can now successfully execute my code with<br><br><font color="#666666">import pc_fort_mod<br>pc_fort_mod.execute()</font><br><br>I am now hoping to use this analysis module in a large optimization problem being solved with <a href="http://openmdao.org/">OpenMDAO</a>. OpenMDAO also makes use of PETSc/petsc4py, which, unsurprisingly, does not play well with my PETSc-based module. So doing<br><br><font color="#666666">from petsc4py import PETSc</font></div><div><font color="#666666">import pc_fort_mod<br>pc_fort_mod.execute()</font><br><br>causes the pc_fort_mod execution to fail (in particular, preallocation fails with an exit code of 63, "input argument out of range." I assume the matrix is invalid or something along those lines).<br><br>So my question is, is there any way to make this work? Or is this pretty much out of the realm of what should be possible at this point?<br><br>Thank you,<br>Austin<br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div dir="ltr" style="color:rgb(136,136,136);font-size:12.8px"><b style="font-size:12.8px"><font color="#666666">Austin Herrema</font></b><br></div><div dir="ltr" style="color:rgb(136,136,136);font-size:12.8px"><div><font color="#999999">PhD Student | Graduate Research Assistant | Iowa State University</font></div><div><font color="#999999">Wind Energy Science, Engineering, and Policy | Mechanical Engineering</font></div></div></div></div></div></div>