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

김성익 ksi2443 at gmail.com
Mon Jan 2 08:27:38 CST 2023


There are more questions.

1. Following your comments, but there is an error as below.
[image: image.png]
How can I fix this?

2. After changing the optimized build, then how can I set the debug mode
again?

3.Following your comments, the new makefile is as below. Is it right?

CFLAGS       = -O3

FFLAGS       =

CPPFLAGS         =

FPPFLAGS         =

COPTFLAGS        = -march=native



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


4. I have no such processors. Where can I find benchmark information about
STREAMS?


Thanks,
Hyung Kim








2023년 1월 2일 (월) 오후 11:03, Matthew Knepley <knepley at gmail.com>님이 작성:

> 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/7086c0c5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 90630 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230102/7086c0c5/attachment-0001.png>


More information about the petsc-users mailing list