<div dir="ltr">When I was having this issue, I was using Homebrew-based PETSc. After switching to my using my own build, I no longer have the issues described above.<br><br>Thanks again,<div>Austin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 4, 2017 at 1:30 PM, Gaetan Kenway <span dir="ltr"><<a href="mailto:gaetank@gmail.com" target="_blank">gaetank@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">There shouldn't be any additional issue with the petsc4py wrapper. We do this all the time. In fact, it's generally best to use the petsc4py to do the initialization of petsc at the very top of your highest level python script. You'll need to do this anyway if you want to use command line arguments to change the petsc arch. <div>Again, its probably some 4/8 byte issue or maybe a real/complex issue that is caused by the petsc4py import initializing something different from what you expect. </div><span class="HOEnZb"><font color="#888888"><div><br>Gaetan</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 4, 2017 at 11:24 AM, Austin Herrema <span dir="ltr"><<a href="mailto:aherrema@iastate.edu" target="_blank">aherrema@iastate.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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/" target="_blank">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<span class="m_-4012020791148657845HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_-4012020791148657845m_-1108373125931251992gmail_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></font></span></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="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>