<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div>Hi Jorge.</div><div><br></div>On Oct 19, 2023, at 18:35, Jorge Nin <jorgenin@mit.edu> wrote:<br><div><blockquote type="cite"><br class="Apple-interchange-newline"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hi Mathew,<div><br></div><div><div style="orphans: 2; widows: 2;">Thanks for the response. It actually seems like the matrix is very sparse (<font color="#363636"><span style="white-space: pre;">0.99% sparsity from what I’m measuring). It’s an FEA solver so it would make sense.</span></font></div><div style="orphans: 2; widows: 2;"><font color="#363636"><span style="white-space: pre;">My current guess is the optimization flags are making a large difference for the M1 Mac, but I am also surprised it makes such a huge difference.</span></font></div><div style="orphans: 2; widows: 2;"><font color="#363636"><span style="white-space: pre;"><br></span></font></div><div style="orphans: 2; widows: 2;"><font color="#363636"><span style="white-space: pre;">It’s why I was asking if there was a resource or another to use my own version of PETSc with Conda.</span></font></div></div></div></div></blockquote><div><br></div><div>If you are using PETSc from conda-forge, then you can go look at <a href="https://github.com/conda-forge/petsc-feedstock">https://github.com/conda-forge/petsc-feedstock</a> repo. That is where the conda recipe (i.e. the description of how to build the conda package) is located. Under the `recipe` directory, you will see `build.sh` script which has the configure line, etc. included. You can adapt the recipe to your needs and then deploy your own version to your own conda channel (it would be hosted on <a href="http://anaconda.org">anaconda.org</a> - you will need an account there). The whole process is quite complex and beyond the scope of this email. conda has a lot of documentation for this, though. This could be a good starting point in case you want to dive into this: https://docs.conda.io/projects/conda-build/en/stable/concepts/recipe.html</div><div><br></div><div>--</div><div>David</div><br><blockquote type="cite"><div><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><div style="orphans: 2; widows: 2;"><font color="#363636"><span style="white-space: pre;"><br></span></font></div><div style="orphans: 2; widows: 2;"><font color="#363636"><span style="caret-color: rgb(54, 54, 54); white-space: pre;">I believe a 2-3 x speed up is worth the hassle. </span></font></div><div style="orphans: 2; widows: 2;"><font color="#363636"><span style="caret-color: rgb(54, 54, 54); white-space: pre;"><br></span></font></div><div style="orphans: 2; widows: 2;"><font color="#363636"><span style="caret-color: rgb(54, 54, 54); white-space: pre;"><br></span></font></div><div style="orphans: 2; widows: 2;"><font color="#363636"><span style="white-space: pre;">Best,</span></font></div><div style="orphans: 2; widows: 2;"><font color="#363636"><span style="white-space: pre;">Jorge</span></font></div><div style="orphans: 2; widows: 2;"><font color="#363636" face="Menlo, Monaco, Courier New, monospace"><span style="white-space: pre;"><br></span></font></div><div style="orphans: 2; widows: 2;"><font color="#363636" face="Menlo, Monaco, Courier New, monospace"><span style="white-space: pre;"><br></span></font></div><div style="orphans: 2; widows: 2;"><font color="#363636" face="Menlo, Monaco, Courier New, monospace"><span style="white-space: pre;"><br></span></font></div><div><blockquote type="cite"><div>On Oct 19, 2023, at 4:00 PM, Matthew Knepley <knepley@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div dir="ltr">On Thu, Oct 19, 2023 at 3:54 PM Jorge Nin <<a href="mailto:jorgenin@mit.edu">jorgenin@mit.edu</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
I was playing around with a self compiled version and, and a the Conda binary of Petsc on the same problem, on my M1 Mac.<br>
Interestingly I found that the Conda binary solves the problem 2-3 times slower vs the self compiled version. (For context I’m using the petsc4py python interface) <br>
<br>
I’ve attached two log views to show the comparison.<br>
<br>
I was mostly curious about the possible cause for this.<br></blockquote><div><br></div><div>All the time is in the LU numeric factorization. I don't know if your matrix is sparse or dense. I am guessing it is dense and different LAPACK implementations are linked. If it is sparse, then the compiler options are different between builds, but I would be surprised if it made this much difference.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I was also curious how I could use my own compiled version of PETSc in my Conda install? <br>
<br>
<br>
Best,<br>
Jorge<br>
<br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</div></blockquote></div><br></div></div></div></blockquote></div><br></body></html>