<div dir="ltr"><div>Hi Hong,<br></div><div><br></div><div>Thanks for your reply. When I use standalone MUMPS for a symmetric matrix, I pass a upper/lower triangular part to MUMPS. To do this, I use <span style="color:rgb(80,0,80);font-size:12.8px">id.sym=2. Under PETSC environment, </span></div><div><span style="color:rgb(80,0,80);font-size:12.8px"><br></span></div><div><div><span style="white-space:pre-wrap"> </span>KSPCreate(PETSC_COMM_WORLD, &ksp);</div><div><span style="white-space:pre-wrap"> </span>KSPSetOperators(ksp, A, A);<span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span>KSPSetType (ksp, KSPPREONLY);</div><div><span style="white-space:pre-wrap"> </span>KSPGetPC(ksp, &pc);</div><div><span style="white-space:pre-wrap"> </span>MatSetOption(A,<span style="white-space:pre-wrap"> </span>MAT_SYMMETRIC, PETSC_TRUE);</div><div><span style="white-space:pre-wrap"> </span>PCSetType(pc, PCLU);</div><div><span style="white-space:pre-wrap"> </span>PCFactorSetMatSolverPackage(<wbr>pc, MATSOLVERMUMPS);</div><div><span style="white-space:pre-wrap"> </span>PCFactorSetUpMatSolverPackage(<wbr>pc);</div></div><div><br></div><div>Can the 5th line be an alternative to id.sym=2?</div><div><br></div><div>Best,</div><div>Evan</div><div><br></div><div> </div><div><span style="font-size:12.8px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 13, 2017 at 4:16 PM, Hong <span dir="ltr"><<a href="mailto:hzhang@mcs.anl.gov" target="_blank">hzhang@mcs.anl.gov</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 class="gmail_extra"><div class="gmail_quote">Evan:<span class=""><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear PETSC-users,<div><br></div><div>I use parallel direct solver MUMPS inside PETSC and need to control some MUMPS parameters inside PETSC. For example, I want to set up MUMPS parameters as shown below.</div><div><br></div><div> ZMUMPS_STRUC_C id;</div><div><div> id.job=-1; /* Initialize mumps instance*/ </div></div></div></blockquote></span><div>This is set in petsc/mumps interface. See line 1197, mumps.c</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div> id.par=1; /* 0: host is not involved in solution processes */</div></div></div></blockquote></span><div> id.par=1; is used in the interface. See line 1198, id.par=1;</div><span class=""><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div> id.sym=2; /* 0:unsysm, 2:general symmetric matrix */</div></div></div></blockquote></span><div>id.sym is set in the interface based on the input matrix type, see line 2154-2171</div><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>How can I access structure similar to id in PETSC?</div></div></blockquote></span><div>Why do you want access id? </div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>For example, I control my icntl parameters like this. </div><div><br></div><div>PCFactorGetMatrix(pc, &F);<span style="white-space:pre-wrap"> </span><br></div><div>MatMumpsSetIcntl(F, icntl[i], ival[i]);<br></div><div><br></div><div>However, it is not clear about how to control id.par and id.sym. If you have any experience in controlling id.par and id.sym inside PETSC, I request your help. In advance, thank you very much for your help.</div></div></blockquote><div> </div></span><div>Petsc/mumps interface is developed for petsc users to call mumps direct solvers under petsc environment. The parameters id.par, id.sym ... are set in the interface according to the user's matrix and solver type, thus user does not need to know about them.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Hong</div></font></span></div><br></div></div>
</blockquote></div><br></div>