<div dir="ltr">Thanks a lot! <br><div><br></div><div>I have tried to let PETSc download my source code successfully.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">2022年11月25日(金) 22:42 Pierre Jolivet <<a href="mailto:pierre@joliv.et">pierre@joliv.et</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
> On 25 Nov 2022, at 10:04 AM, 袁煕 <<a href="mailto:yuanxi@advancesoft.jp" target="_blank">yuanxi@advancesoft.jp</a>> wrote:<br>
> <br>
> Dear PETSc developers,<br>
> <br>
> I have my own linear solver and am trying to put it with PETSc as an external solver.  I wish to know following  details<br>
> <br>
> 1.  How to let PETSc configure to download (from github) the source code and compile, install it afterwards.<br>
<br>
You can borrow code from one of the many files in config/BuildSystem/config/packages/*.py<br>
Put your file in there and then use --download-name-of-your-file when configuring PETSc.<br>
<br>
> 2.   How to let PETSc call the solver. I think it may be accomplished by calling PCFactorSetMatSolverPackage. Is this correct?<br>
<br>
You can borrow code from one src/mat/impls/aij/seq/{mkl_pardiso,umfpack,superlu} or src/mat/impls/aij/mpi/mumps to name a few.<br>
<br>
Thanks,<br>
Pierre<br>
<br>
> Many thanks,<br>
> <br>
> Yuan<br>
<br>
</blockquote></div>