[petsc-users] Performance of Conda Binary vs Self Compiled Version

Barry Smith bsmith at petsc.dev
Fri Oct 20 09:11:43 CDT 2023



> On Oct 20, 2023, at 7:12 AM, Matthew Knepley <knepley at gmail.com> wrote:
> 
> On Thu, Oct 19, 2023 at 8:35 PM Jorge Nin <jorgenin at mit.edu <mailto:jorgenin at mit.edu>> wrote:
>> Hi Mathew,
>> 
>> Thanks for the response. It actually seems like the matrix is very sparse (0.99% sparsity from what I’m measuring). It’s an FEA solver so it would make sense.
>> 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.
>> 
>> It’s why I was asking if there was a resource or another to use my own version of PETSc with Conda.

  What do you mean by "with Conda"? You can entire the Conda environment, configure and compile PETSc, and then link your code against this PETSc library (instead of the one provided by Conda).  By being in the Conda environment it means it is using the Conda Python, the Conda compilers etc. 

   Barry

Some users have difficulty configuring PETSc inside the Conda environment; if your ./configure or make of PETSc fails just send configure.log (and make.log) to petsc-maint at mcs.anl.gov and we'll figure out how to get it compiled.


> 
> We do not know how Conda works unfortunately.
> 
>   Thanks,
> 
>      Matt
>  
>> I believe a 2-3 x speed up is worth the hassle. 
>> 
>> 
>> Best,
>> Jorge
>> 
>> 
>> 
>>> On Oct 19, 2023, at 4:00 PM, Matthew Knepley <knepley at gmail.com <mailto:knepley at gmail.com>> wrote:
>>> 
>>> On Thu, Oct 19, 2023 at 3:54 PM Jorge Nin <jorgenin at mit.edu <mailto:jorgenin at mit.edu>> wrote:
>>>> Hi,
>>>> 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.
>>>> 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) 
>>>> 
>>>> I’ve attached two log views to show the comparison.
>>>> 
>>>> I was mostly curious about the possible cause for this.
>>> 
>>> 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.
>>> 
>>>   Thanks,
>>> 
>>>      Matt
>>>  
>>>>  I was also curious how I could use my own compiled version of PETSc in my Conda install? 
>>>> 
>>>> 
>>>> Best,
>>>> Jorge
>>>> 
>>> 
>>> 
>>> --
>>> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
>>> -- Norbert Wiener
>>> 
>>> https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
>> 
> 
> 
> --
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
> -- Norbert Wiener
> 
> https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20231020/fdd78caa/attachment.html>


More information about the petsc-users mailing list