[petsc-users] Question - about the 'Hint for performance tuning'

Matthew Knepley knepley at gmail.com
Mon Jan 2 08:03:31 CST 2023


On Mon, Jan 2, 2023 at 4:16 AM 김성익 <ksi2443 at gmail.com> wrote:

> Hello,
>
> Happy new year!!
>
>
>
> I have some questions about “Hint for performance tuning” in user guide of
> petsc.
>
>
>
> 1.     In the “Performance Pitfalls and Advice” section, there are 2
> modes “debug” and “optimized builds. My current setup is debug mode. So I
> want to change for test the performance the optimized build mode. However,
> if I configure again, does the existing debug mode disappear? Is there any
> way to coexist the 2 modes and use them in the run the application?
>
Suppose your current arch is named "arch-main-debug". Then you can make an
optimized version using

  cd $PETSC_DIR
  ./arch-main-debug/lib/petsc/conf/reconfigure-arch-main-debug.py
--with-debugging=0 --PETSC_ARCH=arch-main-opt


> 2.     In the guide, there are some paragraphs about optimization level
> of compiler. To control the optimization level of compiler, I put the ‘-O3’
> as below. Is this right??
>
> CFLAGS       = -O3
>
> FFLAGS       =
>
> CPPFLAGS         =
>
> FPPFLAGS         =
>
>
>
> app : a1.o a2.o a3.o a4.o
>
>    $(LINK.C) -o $@ $^ $(LDLIBS)
>
>
>
> include ${PETSC_DIR}/lib/petsc/conf/rules
>
> include ${PETSC_DIR}/lib/petsc/conf/test
>

You could dp this, but that only changes it for that directory. It is best
to do it by reconfiguring.


> 3.     In the guide, user should put ‘-march=native’ for using AVX2 or
> AVX-512. Where should I put the ‘-march=native’ for using AVX?
>
You can add --COPTFLAGS="<user flags>" with any flags you want to the
configure.

4.     After read the “Hint for performance tuning” I understood that for
> good performance and scalability user should use the multiple node and
> multiple socket . However, before composing cluster system, many users just
> can use desktop system.
> In that case, between intel 13th i9 and amd ryzen 7950x, can the 7950x,
> which has an arichitecture similar to the server processor, be more
> suitable for petsc? (Because the architecture of intel desktop cpu is
> big.little.)
>

A good guide is to run the STREAMS benchmark on the processor. PETSc
performance closely tracks that.

  Thanks,

     Matt


>
>
> Thanks,
>
> Hyung Kim
>


-- 
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/20230102/b6bbc4d2/attachment-0001.html>


More information about the petsc-users mailing list