[petsc-users] PCFieldSplitSetSchurPre in fortran

Klaij, Christiaan C.Klaij at marin.nl
Wed Sep 3 09:43:02 CDT 2014


I'm sorry, how do I do that?

Chris




MARIN news: Applied Hydrodynamics of Floating Offshore Structures course, Oct 8 - 10, Houston<http://www.marin.nl/web/News/News-items/Applied-Hydrodynamics-of-Floating-Offshore-Structures-course-Oct-8-10-Houston.htm>

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.



________________________________
From: Matthew Knepley <knepley at gmail.com>
Sent: Wednesday, September 03, 2014 4:38 PM
To: Klaij, Christiaan
Cc: petsc-users at mcs.anl.gov
Subject: Re: [petsc-users] PCFieldSplitSetSchurPre in fortran

On Wed, Sep 3, 2014 at 9:23 AM, Klaij, Christiaan <C.Klaij at marin.nl<mailto:C.Klaij at marin.nl>> wrote:
Matt,

Thanks, after applying the fix to my petsc-3.5.1 install, the
small Fortran program works as expected.

Now, I would like to change the fortran strategy to the
option "3) Using Fortran modules". So, in the small fortran
program I replace these seven lines

#include <finclude/petscsys.h>
#include <finclude/petscis.h>
#include <finclude/petscvec.h>
#include <finclude/petscmat.h>
#include <finclude/petscpc.h>
#include <finclude/petscksp.h>
#include <finclude/petscviewer.h>

by the two following lines

use petscksp
#include <finclude/petsckspdef.>

This still compiles but I get the two old problem back...

I have no idea why. Can you look at the values of those enumerations?

  Matt

Chris

________________________________
From: Matthew Knepley <knepley at gmail.com<mailto:knepley at gmail.com>>
Sent: Wednesday, September 03, 2014 2:12 PM
To: Klaij, Christiaan
Cc: petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] PCFieldSplitSetSchurPre in fortran

On Wed, Sep 3, 2014 at 7:00 AM, Klaij, Christiaan <C.Klaij at marin.nl<mailto:C.Klaij at marin.nl>> wrote:

Matt,

Thanks for the fix. If I understand correctly, in an existing
install of petsc-3.5.1, I would only need to replace the
file "finclude/petscpc.h" by the new file for the fix to
work? (instead of downloading dev, configuring, installing on
various machines).

Yes

   Matt

Chris




MARIN news: Bas Buchner speaker at Lowpex conference at SMM Hamburg<http://www.marin.nl/web/News/News-items/Bas-Buchner-speaker-at-Lowpex-conference-at-SMM-Hamburg.htm>

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.



________________________________
From: Matthew Knepley <knepley at gmail.com<mailto:knepley at gmail.com>>
Sent: Tuesday, September 02, 2014 5:42 PM
To: Klaij, Christiaan
Cc: petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] PCFieldSplitSetSchurPre in fortran

On Tue, Sep 2, 2014 at 2:08 AM, Klaij, Christiaan <C.Klaij at marin.nl<mailto:C.Klaij at marin.nl>> wrote:

Matt,

Attached is a small Fortran code that replicates the second problem.

This was a Fortran define problem. I fixed it on next

  https://bitbucket.org/petsc/petsc/branch/knepley/fix-pc-fieldsplit-fortran

and it will be in maint and master tomorrow.

  Thanks,

     Matt

Chris


[cid:image76463f.JPG at e74baedb.4a899186][cid:imageae8e3c.JPG at 1f0a6dd3.4e92756a]

dr. ir. Christiaan Klaij


CFD Researcher


Research & Development




MARIN




        2, Haagsteeg

E C.Klaij at marin.nl<mailto:C.Klaij at marin.nl>     P.O. Box 28     T +31 317 49 39 11<tel:%2B31%20317%2049%2039%2011>
        6700 AA Wageningen      F +31 317 49 32 45<tel:%2B31%20317%2049%2032%2045>
T  +31 317 49 33 44<tel:%2B31%20317%2049%2033%2044>     The Netherlands I  www.marin.nl<http://www.marin.nl>



MARIN news: MARIN at SMM, Hamburg, September 9-12<http://www.marin.nl/web/News/News-items/MARIN-at-SMM-Hamburg-September-912.htm>

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.



________________________________
From: Klaij, Christiaan
Sent: Friday, August 29, 2014 4:42 PM
To: Matthew Knepley
Cc: petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>
Subject: RE: [petsc-users] PCFieldSplitSetSchurPre in fortran

Matt,

The small test code (ex70) is in C and it works fine, the problem
happens in a big Fortran code. I will try to replicate the
problem in a small Fortran code, but that will take some time.

Chris

________________________________
From: Matthew Knepley <knepley at gmail.com<mailto:knepley at gmail.com>>
Sent: Friday, August 29, 2014 4:14 PM
To: Klaij, Christiaan
Cc: petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] PCFieldSplitSetSchurPre in fortran

On Fri, Aug 29, 2014 at 8:55 AM, Klaij, Christiaan <C.Klaij at marin.nl<mailto:C.Klaij at marin.nl>> wrote:
I'm trying PCFieldSplitSetSchurPre with
PC_FIELDSPLIT_SCHUR_PRE_SELFP in petsc-3.5.1 using fortran.

The first problem is that PC_FIELDSPLIT_SCHUR_PRE_SELFP seems to
be missing in fortran, I get the compile error:

This name does not have a type, and must have an explicit type.   [PC_FIELDSPLIT_SCHUR_PRE_SELFP]

while compilation works fine with _A11, _SELF and _USER.

Mark Adams has just fixed this.

The second problem is that the call doesn't seem to have any
effect. For example, I have

CALL PCFieldSplitSetSchurPre(pc,PC_FIELDSPLIT_SCHUR_PRE_USER,aa,ierr)
CALL PCFieldSplitSetSchurFactType(pc,PC_FIELDSPLIT_SCHUR_FACT_LOWER,ierr)

This compiles and runs, but ksp_view tells me

PC Object:(sys_) 3 MPI processes
  type: fieldsplit
    FieldSplit with Schur preconditioner, factorization LOWER
    Preconditioner for the Schur complement formed from A11

So changing the factorization from the default FULL to LOWER did
work, but changing the preconditioner from A11 to USER didn't.

I've also tried to run directly from the command line using

-sys_pc_fieldsplit_schur_precondition user -sys_ksp_view

This works in the sense that I don't get the "WARNING! There are
options you set that were not used!" message, but still ksp_view
reports A11 instead of user provided matrix.

Can you send a small test code, since I use this everyday here and it works.

  Thanks,

     Matt

Chris


dr. ir. Christiaan Klaij
CFD Researcher
Research & Development
E mailto:C.Klaij at marin.nl<mailto:C.Klaij at marin.nl>
T +31 317 49 33 44<tel:%2B31%20317%2049%2033%2044>


MARIN
2, Haagsteeg, P.O. Box 28, 6700 AA Wageningen, The Netherlands
T +31 317 49 39 11<tel:%2B31%20317%2049%2039%2011>, F +31 317 49 32 45<tel:%2B31%20317%2049%2032%2045>, I www.marin.nl<http://www.marin.nl>




--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener



--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener



--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener



--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140903/8a4b77a1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imageae8e3c.JPG
Type: image/jpeg
Size: 1622 bytes
Desc: imageae8e3c.JPG
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140903/8a4b77a1/attachment-0002.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image76463f.JPG
Type: image/jpeg
Size: 1069 bytes
Desc: image76463f.JPG
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140903/8a4b77a1/attachment-0003.jpe>


More information about the petsc-users mailing list