<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Sep 3, 2014 at 9:23 AM, Klaij, Christiaan <span dir="ltr"><<a href="mailto:C.Klaij@marin.nl" target="_blank">C.Klaij@marin.nl</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">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:#000000;margin:0">
Matt,<br>
<br>
Thanks, after applying the fix to my petsc-3.5.1 install, the<br>
small Fortran program works as expected.<br>
<br>
Now, I would like to change the fortran strategy to the<br>
option "3) Using Fortran modules". So, in the small fortran<br>
program I replace these seven lines<br>
<br>
#include <finclude/petscsys.h><br>
#include <finclude/petscis.h><br>
#include <finclude/petscvec.h><br>
#include <finclude/petscmat.h><br>
#include <finclude/petscpc.h><br>
#include <finclude/petscksp.h><br>
#include <finclude/petscviewer.h><br>
<br>
by the two following lines<br>
<br>
use petscksp<br>
#include <finclude/petsckspdef.><br>
<br>
This still compiles but I get the two old problem back...<br></div></div></blockquote><div><br></div><div>I have no idea why. Can you look at the values of those enumerations?</div><div><br></div><div>  Matt</div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:#000000;margin:0">

Chris<br>
<br>
<div style="color:rgb(40,40,40)">
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>><br>
<b>Sent:</b> Wednesday, September 03, 2014 2:12 PM<br>
<b>To:</b> Klaij, Christiaan<br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a><br>
<b>Subject:</b> Re: [petsc-users] PCFieldSplitSetSchurPre in fortran</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Wed, Sep 3, 2014 at 7:00 AM, Klaij, Christiaan <span dir="ltr">
<<a href="mailto:C.Klaij@marin.nl" target="_blank">C.Klaij@marin.nl</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">
<p></p>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:#000000;margin:0">
Matt,<br>
<br>
Thanks for the fix. If I understand correctly, in an existing<br>
install of petsc-3.5.1, I would only need to replace the<br>
file "finclude/petscpc.h" by the new file for the fix to<br>
work? (instead of downloading dev, configuring, installing on<br>
various machines).<br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Yes</div>
<div><br>
</div>
<div>   Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:#000000;margin:0">
Chris<br>
<br>
<div style="color:rgb(40,40,40)"></div>
</div>
<p></p>
<p> </p>
<p><font color="#7d7d7d" face="Arial">MARIN news: </font><font style="font-family:Arial;font-size:10pt;color:#366092"><span style="font-family:Arial;font-size:10pt;color:#366092;text-decoration:underline"><a href="http://www.marin.nl/web/News/News-items/Bas-Buchner-speaker-at-Lowpex-conference-at-SMM-Hamburg.htm" title="" style="font-family:Arial;font-size:10pt;color:#366092;text-decoration:underline" target="_blank"><span style="font-family:Arial;font-size:10pt;color:#366092;text-decoration:underline">Bas
 Buchner speaker at Lowpex conference at SMM Hamburg</span></a></span><font style="font-family:Arial;font-size:10pt;color:#366092"><br>
</font></font></p>
<p><font color="#7d7d7d" face="Arial">This e-mail may be confidential, privileged and/or protected by copyright. If you are not the intended recipient, you should return it to the sender immediately and delete your copy from your system.</font></p>

<p> </p>
<p></p>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:#000000;margin:0">
<div style="color:rgb(40,40,40)">
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>><br>
<b>Sent:</b> Tuesday, September 02, 2014 5:42 PM<br>
<b>To:</b> Klaij, Christiaan<br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a><br>
<b>Subject:</b> Re: [petsc-users] PCFieldSplitSetSchurPre in fortran</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Tue, Sep 2, 2014 at 2:08 AM, Klaij, Christiaan <span dir="ltr">
<<a href="mailto:C.Klaij@marin.nl" target="_blank">C.Klaij@marin.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">
<p></p>
<p></p>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);margin:0px">
Matt,<br>
<br>
Attached is a small Fortran code that replicates the second problem.<br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>This was a Fortran define problem. I fixed it on next</div>
<div><br>
</div>
<div>  <a href="https://bitbucket.org/petsc/petsc/branch/knepley/fix-pc-fieldsplit-fortran" target="_blank">https://bitbucket.org/petsc/petsc/branch/knepley/fix-pc-fieldsplit-fortran</a></div>
<div><br>
</div>
<div>and it will be in maint and master tomorrow.</div>
<div><br>
</div>
<div>  Thanks,</div>
<div><br>
</div>
<div>     Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);margin:0px">
Chris<br>
<br>
<div dir="ltr" style="color:rgb(40,40,40)"></div>
</div>
<p></p>
<p></p>
<table cols="1" style="width:475px;border-collapse:collapse" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td colspan="2"><font color="#7d7d7d" face="Arial"><img title="Click to Resize" align="absMiddle" border="0" height="19" width="60" src="cid:image76463f.JPG@e74baedb.4a899186"><img align="bottom" border="0" height="26" width="410" src="cid:imageae8e3c.JPG@1f0a6dd3.4e92756a"></font></td>

</tr>
<tr>
<td colspan="2" style="height:17px">
<p><font face="Arial"><font face="Arial"><font color="#7d7d7d">dr. ir. Christiaan Klaij</font></font></font></p>
</td>
</tr>
<tr>
<td style="width:222px;height:17px">
<p><span style="font-size:10pt"><font face="Arial"><font color="#7d7d7d">CFD Researcher</font></font></span></p>
</td>
<td style="width:252px"><font face="Arial"><font color="#7d7d7d"></font></font></td>
</tr>
<tr>
<td><span style="font-size:10pt"><font color="#7d7d7d" face="Arial">Research & Development</font></span></td>
<td><font face="Arial"></font></td>
</tr>
</tbody>
</table>
<p></p>
<p></p>
<table cols="3" style="width:475px;border-collapse:collapse" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="width:217px">
<p><font color="#7d7d7d" face="Arial"></font> </p>
</td>
<td style="width:139px">
<p><font color="#7d7d7d" face="Arial"><strong>MARIN</strong></font></p>
</td>
<td style="width:117px">
<p><font color="#7d7d7d" face="Arial"></font> </p>
</td>
</tr>
<tr>
<td style="height:17px"><font color="#7d7d7d" face="Arial"></font></td>
<td><font color="#7d7d7d" face="Arial">2, Haagsteeg</font></td>
<td><font color="#7d7d7d" face="Arial"></font></td>
</tr>
<tr>
<td style="height:17px"><font face="Arial"><font face="Arial"><font color="#366092"><font color="#7d7d7d">E</font>
<a href="mailto:C.Klaij@marin.nl" title="Click to send email to Klaij, Christiaan" target="_blank">
C.Klaij@marin.nl</a></font></font></font></td>
<td><font color="#7d7d7d" face="Arial">P.O. Box 28</font></td>
<td><font color="#7d7d7d" face="Arial">T <a href="tel:%2B31%20317%2049%2039%2011" value="+31317493911" target="_blank">
+31 317 49 39 11</a></font></td>
</tr>
<tr>
<td style="height:17px"><font face="Arial"><font color="#7d7d7d"></font></font></td>
<td><font color="#7d7d7d" face="Arial">6700 AA Wageningen</font></td>
<td><font face="Arial"><font color="#7d7d7d">F <a href="tel:%2B31%20317%2049%2032%2045" value="+31317493245" target="_blank">
+31 317 49 32 45</a></font></font></td>
</tr>
<tr>
<td><font face="Arial"><font color="#7d7d7d">T  <a href="tel:%2B31%20317%2049%2033%2044" value="+31317493344" target="_blank">+31 317 49 33 44</a></font></font></td>
<td><font color="#7d7d7d" face="Arial">The Netherlands</font></td>
<td><font color="#7d7d7d" face="Arial">I  </font><a href="http://www.marin.nl" target="_blank"><font color="#366092" face="Arial">www.marin.nl</font></a></td>
</tr>
</tbody>
</table>
<p></p>
<p></p>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);margin:0px">
<div dir="ltr" style="color:rgb(40,40,40)"></div>
</div>
<p></p>
<p></p>
<p> </p>
<p><font color="#7d7d7d" face="Arial">MARIN news: </font><font style="font-family:Arial;font-size:10pt;color:rgb(54,96,146)"><span style="font-family:Arial;font-size:10pt;color:rgb(54,96,146);text-decoration:underline"><a href="http://www.marin.nl/web/News/News-items/MARIN-at-SMM-Hamburg-September-912.htm" title="" style="font-family:Arial;font-size:10pt;color:rgb(54,96,146);text-decoration:underline" target="_blank"><span style="font-family:Arial;font-size:10pt;color:rgb(54,96,146);text-decoration:underline">MARIN
 at SMM, Hamburg, September 9-12</span></a></span><font style="font-family:Arial;font-size:10pt;color:rgb(54,96,146)"><br>
</font></font></p>
<p><font color="#7d7d7d" face="Arial">This e-mail may be confidential, privileged and/or protected by copyright. If you are not the intended recipient, you should return it to the sender immediately and delete your copy from your system.</font></p>

<p> </p>
<p></p>
<p></p>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);margin:0px">
<div dir="ltr" style="color:rgb(40,40,40)">
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> Klaij, Christiaan<br>
<b>Sent:</b> Friday, August 29, 2014 4:42 PM<br>
<b>To:</b> Matthew Knepley<br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a><br>
<b>Subject:</b> RE: [petsc-users] PCFieldSplitSetSchurPre in fortran</font>
<div> </div>
</div>
<div>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);margin:0px">
Matt,<br>
<br>
The small test code (ex70) is in C and it works fine, the problem<br>
happens in a big Fortran code. I will try to replicate the<br>
problem in a small Fortran code, but that will take some time.<br>
<br>
Chris<br>
<br>
<div style="color:rgb(40,40,40)">
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>><br>
<b>Sent:</b> Friday, August 29, 2014 4:14 PM<br>
<b>To:</b> Klaij, Christiaan<br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a><br>
<b>Subject:</b> Re: [petsc-users] PCFieldSplitSetSchurPre in fortran</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Fri, Aug 29, 2014 at 8:55 AM, Klaij, Christiaan <span dir="ltr">
<<a href="mailto:C.Klaij@marin.nl" target="_blank">C.Klaij@marin.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I'm trying PCFieldSplitSetSchurPre with<br>
PC_FIELDSPLIT_SCHUR_PRE_SELFP in petsc-3.5.1 using fortran.<br>
<br>
The first problem is that PC_FIELDSPLIT_SCHUR_PRE_SELFP seems to<br>
be missing in fortran, I get the compile error:<br>
<br>
This name does not have a type, and must have an explicit type.   [PC_FIELDSPLIT_SCHUR_PRE_SELFP]<br>
<br>
while compilation works fine with _A11, _SELF and _USER.<br>
</blockquote>
<div><br>
</div>
<div>Mark Adams has just fixed this.</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
The second problem is that the call doesn't seem to have any<br>
effect. For example, I have<br>
<br>
CALL PCFieldSplitSetSchurPre(pc,PC_FIELDSPLIT_SCHUR_PRE_USER,aa,ierr)<br>
CALL PCFieldSplitSetSchurFactType(pc,PC_FIELDSPLIT_SCHUR_FACT_LOWER,ierr)<br>
<br>
This compiles and runs, but ksp_view tells me<br>
<br>
PC Object:(sys_) 3 MPI processes<br>
  type: fieldsplit<br>
    FieldSplit with Schur preconditioner, factorization LOWER<br>
    Preconditioner for the Schur complement formed from A11<br>
<br>
So changing the factorization from the default FULL to LOWER did<br>
work, but changing the preconditioner from A11 to USER didn't.<br>
<br>
I've also tried to run directly from the command line using<br>
<br>
-sys_pc_fieldsplit_schur_precondition user -sys_ksp_view<br>
<br>
This works in the sense that I don't get the "WARNING! There are<br>
options you set that were not used!" message, but still ksp_view<br>
reports A11 instead of user provided matrix.<br>
</blockquote>
<div><br>
</div>
<div>Can you send a small test code, since I use this everyday here and it works.</div>
<div><br>
</div>
<div>  Thanks,</div>
<div><br>
</div>
<div>     Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Chris<br>
<br>
<br>
dr. ir. Christiaan Klaij<br>
CFD Researcher<br>
Research & Development<br>
E mailto:<a href="mailto:C.Klaij@marin.nl" target="_blank">C.Klaij@marin.nl</a><br>
T <a href="tel:%2B31%20317%2049%2033%2044" value="+31317493344" target="_blank">+31 317 49 33 44</a><br>
<br>
<br>
MARIN<br>
2, Haagsteeg, P.O. Box 28, 6700 AA Wageningen, The Netherlands<br>
T <a href="tel:%2B31%20317%2049%2039%2011" value="+31317493911" target="_blank">+31 317 49 39 11</a>, F
<a href="tel:%2B31%20317%2049%2032%2045" value="+31317493245" target="_blank">+31 317 49 32 45</a>, I
<a href="http://www.marin.nl" target="_blank">www.marin.nl</a><br>
<br>
<span><font color="#888888"></font></span></blockquote>
<span><font color="#888888"></font></span></div>
<span><font color="#888888"><br>
<br clear="all">
<span><font color="#888888">
<div><br>
</div>
-- <br>
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener </font></span></font></span></div>
<span><font color="#888888"></font></span></div>
<span><font color="#888888"></font></span></div>
<span><font color="#888888"></font></span></div>
<span><font color="#888888"></font></span></div>
<span><font color="#888888"></font></span></div>
<span><font color="#888888"></font></span></div>
<span><font color="#888888"></font></span></div>
<span><font color="#888888"><u></u>
<p></p>
<u></u><u></u><u></u>
<p></p>
</font></span></div>
<span><font color="#888888"></font></span></blockquote>
<span><font color="#888888"></font></span></div>
<span><font color="#888888"><br>
<br clear="all"><span class="HOEnZb"><font color="#888888">
<div><br>
</div>
-- <br>
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener </font></span></font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
<p></p>
</font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
<br>
<br clear="all">
<div><br>
</div>
-- <br>
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener </font></span></div>
</div>
</div>
</div>
</div>
</div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener
</div></div>