> On Jan 2, 2023, at 9:27 AM, 김성익 <[email protected]> wrote:
>
> There are more questions.
>
> 1. Following your comments, but there is an error as below.
> <image.png>
> How can I fix this?
The previous value of PETSC_ARCH was not arch-main-debug do ls $PETSC_DIR
and locate the directory whose name begins with arch- that will tell you the
previous value used for PETSC_ARCH.
>
> 2. After changing the optimized build, then how can I set the debug mode
> again?
export PETSC_ARCH=arch- whatever the previous value was and then recompile
your code (note you do not need to recompile PETSc just your executable).
>
> 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
Best not to set these values in the makefile at all because they will affect
all compilers. Just set them with ./configure CCOPTFLAGS="-O3 -march=native"
>
>
> 4. I have no such processors. Where can I find benchmark information about
> STREAMS?
do make mpistreams in PETSC_DIR
>
>
> Thanks,
> Hyung Kim
>
>
>
>
>
>
>
>
> 2023년 1월 2일 (월) 오후 11:03, Matthew Knepley <[email protected]
> <mailto:[email protected]>>님이 작성:
>> On Mon, Jan 2, 2023 at 4:16 AM 김성익 <[email protected]
>> <mailto:[email protected]>> 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/>