<div dir="ltr"><div dir="ltr">On Mon, Jan 2, 2023 at 4:16 AM 김성익 <<a href="mailto:ksi2443@gmail.com">ksi2443@gmail.com</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"><div dir="ltr"><p class="MsoNormal" style="margin:0cm 0cm 8pt;text-align:justify;line-height:107%;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US">Hello, </span></p>

<p class="MsoNormal" style="margin:0cm 0cm 8pt;text-align:justify;line-height:107%;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US">Happy new year!!</span></p>

<p class="MsoNormal" style="margin:0cm 0cm 8pt;text-align:justify;line-height:107%;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US"> </span></p>

<p class="MsoNormal" style="margin:0cm 0cm 8pt;text-align:justify;line-height:107%;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US">I have some questions about “Hint for
performance tuning” in user guide of petsc.</span></p>

<p class="MsoNormal" style="margin:0cm 0cm 8pt;text-align:justify;line-height:107%;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US"> </span></p>

<p style="margin:0cm 0cm 8pt 38pt;text-align:justify;line-height:107%;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US">1.<span style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"Times New Roman"">    
</span></span><span lang="EN-US">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?</span></p></div></blockquote><div>Suppose your current arch is named "arch-main-debug". Then you can make an optimized version using</div><div><br></div><div>  cd $PETSC_DIR</div><div>  ./arch-main-debug/lib/petsc/conf/reconfigure-arch-main-debug.py --with-debugging=0 --PETSC_ARCH=arch-main-opt</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"><div dir="ltr">

<p style="margin:0cm 0cm 8pt 38pt;text-align:justify;line-height:107%;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US">2.<span style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"Times New Roman"">    
</span></span><span lang="EN-US">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??</span></p>

<table border="1" cellspacing="0" cellpadding="0" style="margin-left:38pt;border-collapse:collapse;border:none">
 <tbody><tr>
  <td width="601" valign="top" style="width:450.8pt;border:1pt solid windowtext;padding:0cm 5.4pt">
  <p style="margin:0cm 0cm 0.0001pt 38pt;line-height:normal;text-align:justify;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US">CFLAGS       = -O3</span></p>
  <p style="margin:0cm 0cm 0.0001pt 38pt;line-height:normal;text-align:justify;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US">FFLAGS       =</span></p>
  <p style="margin:0cm 0cm 0.0001pt 38pt;line-height:normal;text-align:justify;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US">CPPFLAGS         =</span></p>
  <p style="margin:0cm 0cm 0.0001pt 38pt;line-height:normal;text-align:justify;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US">FPPFLAGS         =</span></p>
  <p style="margin:0cm 0cm 0.0001pt 38pt;line-height:normal;text-align:justify;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US"> </span></p>
  <p style="margin:0cm 0cm 0.0001pt 38pt;line-height:normal;text-align:justify;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US">app :
  a1.o a2.o a3.o a4.o</span></p>
  <p style="margin:0cm 0cm 0.0001pt 38pt;line-height:normal;text-align:justify;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US">   $(LINK.C) -o $@ $^ $(LDLIBS)</span></p>
  <p style="margin:0cm 0cm 0.0001pt 38pt;line-height:normal;text-align:justify;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US"> </span></p>
  <p style="margin:0cm 0cm 0.0001pt 38pt;line-height:normal;text-align:justify;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US">include
  ${PETSC_DIR}/lib/petsc/conf/rules</span></p>
  <p style="margin:0cm 0cm 0.0001pt 38pt;line-height:normal;text-align:justify;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US">include
  ${PETSC_DIR}/lib/petsc/conf/test</span></p></td></tr></tbody></table></div></blockquote><div><br></div><div>You could dp this, but that only changes it for that directory. It is best to do it by reconfiguring.</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"><div dir="ltr">

<p style="margin:0cm 0cm 8pt 38pt;text-align:justify;line-height:107%;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US">3.<span style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"Times New Roman"">    
</span></span><span lang="EN-US">In the guide, user should put ‘-march=native’
for using AVX2 or AVX-512. Where should I put the ‘-march=native’ for using AVX?</span></p></div></blockquote><div>You can add --COPTFLAGS="<user flags>" with any flags you want to the configure.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">

<p style="margin:0cm 0cm 8pt 38pt;text-align:justify;line-height:107%;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US">4.<span style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"Times New Roman"">    
</span></span><span lang="EN-US">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. <br>
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.)</span></p></div></blockquote><div><br></div><div>A good guide is to run the STREAMS benchmark on the processor. PETSc performance closely tracks that.</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"><div dir="ltr"><p style="margin:0cm 0cm 8pt 38pt;text-align:justify;line-height:107%;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span style="font-size:10pt"> </span></p>

<p class="MsoNormal" style="margin:0cm 0cm 8pt;text-align:justify;line-height:107%;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US">Thanks,</span></p>

<p class="MsoNormal" style="margin:0cm 0cm 8pt;text-align:justify;line-height:107%;font-size:10pt;font-family:"\00b9d1\00c740  \00ace0\00b515""><span lang="EN-US">Hyung Kim</span></p></div>
</blockquote></div><br clear="all"><div><br></div>-- <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>