[petsc-users] How to activate the modified Gram-Schmidt orthogonalization process in Fortran?

Klaij, Christiaan C.Klaij at marin.nl
Fri Sep 11 10:00:51 CDT 2020


Sure, that was the advise 9 years ago in the ancient thread. It's not a big problem.


Chris

dr. ir. Christiaan Klaij | Senior Researcher | Research & Development
MARIN | T +31 317 49 33 44 | C.Klaij at marin.nl<mailto:C.Klaij at marin.nl> | www.marin.nl<http://www.marin.nl>

[LinkedIn]<https://www.linkedin.com/company/marin> [YouTube] <http://www.youtube.com/marinmultimedia>  [Twitter] <https://twitter.com/MARIN_nieuws>  [Facebook] <https://www.facebook.com/marin.wageningen>
MARIN news: New publication on noise measurements of a cavitating propeller<https://www.marin.nl/news/new-publication-on-noise-measurements-on-a-cavitating-propeller>

________________________________
From: Zhang, Hong <hzhang at mcs.anl.gov>
Sent: Friday, September 11, 2020 4:57 PM
To: Klaij, Christiaan; petsc-users at mcs.anl.gov
Subject: Re: [petsc-users] How to activate the modified Gram-Schmidt orthogonalization process in Fortran?

Sorry, we have not done it. Can you use

PetscOptionsSetValue("-ksp_gmres_modifiedgramschmidt", "1")

for now? We'll try to add the fortran binding later.

Hong

________________________________
From: petsc-users <petsc-users-bounces at mcs.anl.gov> on behalf of Klaij, Christiaan <C.Klaij at marin.nl>
Sent: Friday, September 11, 2020 7:50 AM
To: petsc-users at mcs.anl.gov <petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] How to activate the modified Gram-Schmidt orthogonalization process in Fortran?


Make me feel ancient. Would be nice to have the fortran binding though...

Chris

> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 10 Sep 2020 19:41:30 -0600
> From: Zhuo Chen <chenzhuotj at gmail.com>
> To: "Zhang, Hong" <hzhang at mcs.anl.gov>
> Cc: "petsc-users at mcs.anl.gov" <petsc-users at mcs.anl.gov>
> Subject: Re: [petsc-users] How to activate the modified Gram-Schmidt
>         orthogonalization process in Fortran?
> Message-ID:
>         <CAHjeDn8HmgxttujK6YP0qfgPcmQMbVNa0UTFN4Wd_Au-0UjDAg at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Hong,
>
> According to that very old thread, KSPGMRESSetOrthogonalization was not
> implemented in Fortran. I did as you suggested and the compiler will tell
> me
>
> undefined reference to `kspgmressetorthogonalization_'
>
> I think I will use the -ksp_gmres_modifiedgramschmidt method. Thank you so
> much!
>

dr. ir. Christiaan Klaij  | Senior Researcher | Research & Development
MARIN | T +31 317 49 33 44 | mailto:C.Klaij at marin.nl | http://www.marin.nl


> On Thu, Sep 10, 2020 at 7:32 PM Zhang, Hong <hzhang at mcs.anl.gov> wrote:
>
> > Zhuo,
> > Call
> > KSPSetType(ksp,KSPGMRES);
> >
> > KSPGMRESSetOrthogonalization(ksp,KSPGMRESModifiedGramSchmidtOrthogonalization);
> > Hong
> >
> > ------------------------------
> > *From:* Zhuo Chen <chenzhuotj at gmail.com>
> > *Sent:* Thursday, September 10, 2020 8:17 PM
> > *To:* Zhang, Hong <hzhang at mcs.anl.gov>
> > *Cc:* petsc-users at mcs.anl.gov <petsc-users at mcs.anl.gov>
> > *Subject:* Re: [petsc-users] How to activate the modified Gram-Schmidt
> > orthogonalization process in Fortran?
> >
> > Hi Hong,
> >
> > Thank you very much for your help.
> >
> > It seems that if I simply append -ksp_gmres_modifiedgramschmidt the
> > warning goes away. However
> > KSPGMRESSetOrthogonalization(ksp,KSPGMRESModifiedGramSchmidtOrthogonalization,ierr)
> > has another issue.
> >
> > Error: Symbol ?kspgmresmodifiedgramschmidtorthogonalization? at (1) has no
> > IMPLICIT type
> >
> > Is it because the argument is too long? I am using gcc 8.4.0 instead of
> > ifort
> >
> > On Thu, Sep 10, 2020 at 7:08 PM Zhang, Hong <hzhang at mcs.anl.gov> wrote:
> >
> > Zhuo,
> > Run your code with option '-ksp_gmres_modifiedgramschmidt'. For example,
> > petsc/src/ksp/ksp/tutorials
> > mpiexec -n 2 ./ex2 -ksp_view -ksp_gmres_modifiedgramschmidt
> > KSP Object: 2 MPI processes
> >   type: gmres
> >     restart=30, using Modified Gram-Schmidt Orthogonalization
> >     happy breakdown tolerance 1e-30
> >   maximum iterations=10000, initial guess is zero
> >   tolerances:  relative=0.000138889, absolute=1e-50, divergence=10000.
> >   left preconditioning
> >   using PRECONDITIONED norm type for convergence test
> > PC Object: 2 MPI processes
> >   type: bjacobi
> > ...
> >
> > You can
> > call KSPGMRESSetOrthogonalization(ksp,KSPGMRESModifiedGramSchmidtOrthogonalization)
> > in your program.
> >
> > Hong
> >
> > ------------------------------
> > *From:* petsc-users <petsc-users-bounces at mcs.anl.gov> on behalf of Zhuo
> > Chen <chenzhuotj at gmail.com>
> > *Sent:* Thursday, September 10, 2020 7:52 PM
> > *To:* petsc-users at mcs.anl.gov <petsc-users at mcs.anl.gov>
> > *Subject:* [petsc-users] How to activate the modified Gram-Schmidt
> > orthogonalization process in Fortran?
> >
> > Dear Petsc users,
> >
> > I found an ancient thread discussing this problem.
> >
> > https://lists.mcs.anl.gov/pipermail/petsc-users/2011-October/010607.html
> >
> > However, when I add
> >
> > call KSPSetType(ksp,KSPGMRES,ierr);CHKERRQ(ierr)
> > call
> > PetscOptionsSetValue(PETSC_NULL_OPTIONS,'-ksp_gmres_modifiedgramschmidt','1',ierr);CHKERRQ(ierr)
> >
> > the program will tell me
> >
> > WARNING! There are options you set that were not used!
> > WARNING! could be spelling mistake, etc!
> > There is one unused database option. It is:
> > Option left: name:-ksp_gmres_modifiedgramschmidt value: 1
> >
> > I would like to know the most correct way to activate the modified
> > Gram-Schmidt orthogonalization process in Fortran. Thank you very much!
> >
> > Best regards.
> >
> >



Help us improve the spam filter. If this message contains SPAM, click here<https://www.mailcontrol.com/sr/k4QvsNfY0JbGX2PQPOmvUmuFhuAgpUQ2aIYGFgBh1XE-_-bwIG1ztLM6HR4_1LKTfIrk20xxkqZfcZxYauAECA==> to report. Thank you, MARIN Support Group


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200911/0e760802/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagefd46c4.PNG
Type: image/png
Size: 293 bytes
Desc: imagefd46c4.PNG
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200911/0e760802/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image97655b.PNG
Type: image/png
Size: 331 bytes
Desc: image97655b.PNG
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200911/0e760802/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagedce627.PNG
Type: image/png
Size: 333 bytes
Desc: imagedce627.PNG
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200911/0e760802/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagef2324a.PNG
Type: image/png
Size: 253 bytes
Desc: imagef2324a.PNG
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200911/0e760802/attachment-0007.png>


More information about the petsc-users mailing list