<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 255); font-family: arial, sans-serif; font-size: 12.8px; background-color: rgb(255, 255, 255); display: inline !important">Zhuo,</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 255); font-family: arial, sans-serif; font-size: 12.8px; background-color: rgb(255, 255, 255); display: inline !important">Run your code with option '-ksp_gmres_modifiedgramschmidt'. For example, </span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 255); font-family: arial, sans-serif; font-size: 12.8px; background-color: rgb(255, 255, 255); display: inline !important">petsc/src/ksp/ksp/tutorials<br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 255); font-family: arial, sans-serif; font-size: 12.8px; background-color: rgb(255, 255, 255); display: inline !important">mpiexec -n 2 ./ex2 -ksp_view -ksp_gmres_modifiedgramschmidt
<div>KSP Object: 2 MPI processes</div>
<div>  type: gmres</div>
<div>    restart=30, using Modified Gram-Schmidt Orthogonalization</div>
<div>    happy breakdown tolerance 1e-30</div>
<div>  maximum iterations=10000, initial guess is zero</div>
<div>  tolerances:  relative=0.000138889, absolute=1e-50, divergence=10000.</div>
<div>  left preconditioning</div>
<div>  using PRECONDITIONED norm type for convergence test</div>
<div>PC Object: 2 MPI processes</div>
  type: bjacobi<br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 255); font-family: arial, sans-serif; font-size: 12.8px; background-color: rgb(255, 255, 255); display: inline !important">...</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 255); font-family: arial, sans-serif; font-size: 12.8px; background-color: rgb(255, 255, 255); display: inline !important"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 255); font-family: arial, sans-serif; font-size: 12.8px; background-color: rgb(255, 255, 255); display: inline !important">You can call KSPGMRESSetOrthogonalization(ksp,KSPGMRESModifiedGramSchmidtOrthogonalization) in your program.</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 255); font-family: arial, sans-serif; font-size: 12.8px; background-color: rgb(255, 255, 255); display: inline !important"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 255); font-family: arial, sans-serif; font-size: 12.8px; background-color: rgb(255, 255, 255); display: inline !important">Hong</span></div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> petsc-users <petsc-users-bounces@mcs.anl.gov> on behalf of Zhuo Chen <chenzhuotj@gmail.com><br>
<b>Sent:</b> Thursday, September 10, 2020 7:52 PM<br>
<b>To:</b> petsc-users@mcs.anl.gov <petsc-users@mcs.anl.gov><br>
<b>Subject:</b> [petsc-users] How to activate the modified Gram-Schmidt orthogonalization process in Fortran?</font>
<div> </div>
</div>
<div>
<div dir="ltr">Dear Petsc users,
<div><br>
</div>
<div>I found an ancient thread discussing this problem.</div>
<div><br>
</div>
<div><a href="https://lists.mcs.anl.gov/pipermail/petsc-users/2011-October/010607.html">https://lists.mcs.anl.gov/pipermail/petsc-users/2011-October/010607.html</a><br>
</div>
<div><br>
</div>
<div>However, when I add</div>
<div><br>
</div>
<div>call KSPSetType(ksp,KSPGMRES,ierr);CHKERRQ(ierr)</div>
<div>call PetscOptionsSetValue(PETSC_NULL_OPTIONS,'-ksp_gmres_modifiedgramschmidt','1',ierr);CHKERRQ(ierr)<br>
</div>
<div><br>
</div>
<div>the program will tell me</div>
<div><br>
</div>
<div>WARNING! There are options you set that were not used!<br>
WARNING! could be spelling mistake, etc!<br>
There is one unused database option. It is:<br>
Option left: name:-ksp_gmres_modifiedgramschmidt value: 1<br>
</div>
<div><br>
</div>
<div>I would like to know the most correct way to activate the modified Gram-Schmidt orthogonalization process in Fortran. Thank you very much!</div>
<div><br>
</div>
<div>Best regards. </div>
<div><br>
</div>
<div><br>
</div>
<div><br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="x_gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr"><font color="#0000ff" style="font-family:arial,sans-serif; font-size:12.8px">Zhuo Chen</font>
<div style="font-family:arial,sans-serif; font-size:12.8px"><font color="#0000ff">Department of Physics</font></div>
<div style="font-family:arial,sans-serif; font-size:12.8px"><font color="#0000ff">University of Alberta</font></div>
<div style="font-family:arial,sans-serif; font-size:12.8px"><font color="#0000ff">Edmonton Alberta, Canada T6G 2E1</font></div>
<div><font face="'comic sans ms', sans-serif"><a href="http://www.pas.rochester.edu/~zchen25/" target="_blank" style="background-color:rgb(255,255,255)"><font color="#000000">http://www.pas.rochester.edu/~zchen25/</font></a><br>
</font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>