<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
span.EmailStyle21
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi all<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am currently building a large software stack using Spack with PETSc 3.19 as part of the dependency library.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Spotted the following message during the build process<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas;color:#1F2328;border:none windowtext 1.0pt;padding:0cm;mso-fareast-language:EN-GB">Using default optimization C flags “-g -O”. You might consider manually setting optimal optimization flags
 for your system with<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas;color:#1F2328;border:none windowtext 1.0pt;padding:0cm;mso-fareast-language:EN-GB">COPTFLAGS="optimization flags" see config/examples/arch-*-opt.py for examples</span><span style="font-size:9.0pt;font-family:Consolas;color:#1F2328;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Previously when we install PETSc manually, optimisation flags are enforced via configure script e.g.
<o:p></o:p></p>
<p class="MsoNormal">COPTFLAGS=”-g -O3 -march=native”<o:p></o:p></p>
<p class="MsoNormal">CXXOPTFLAGS=”-g -O3 -march=native”    <o:p></o:p></p>
<p class="MsoNormal">…<o:p></o:p></p>
<p class="MsoNormal">(or “-g -O3 -xhost” for intel compiler)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Whilst spack spec syntax allows compiler parameters via cflags/cxxflags/fflags  <o:p></o:p></p>
<p class="MsoNormal"><a href="https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/petsc/package.py#L400">https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/petsc/package.py</a><o:p></o:p></p>
<p class="MsoNormal">the requirement is not obvious, especially in a long build process.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The question is should optimisation be amended at spack recipe stage or should PETSc configure enforce some compiler optimisation (if –with-debugging=0 is set) ?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#00747B;mso-fareast-language:EN-GB">Dr Wei Liu<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#768693;mso-fareast-language:EN-GB">High Performance Computing
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#00747B;mso-fareast-language:EN-GB">To chat with me on Teams
</span><a href="https://teams.microsoft.com/l/chat/0/0?users=wei.liu@awe.co.uk"><span style="mso-fareast-language:EN-GB">click here</span></a><span style="color:#00747B;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#00747B;mso-fareast-language:EN-GB">T: +44 01189 856209<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#00747B;mso-fareast-language:EN-GB">M: </span>
<a href="mailto:wei.liu@awe.co.uk"><span style="mso-fareast-language:EN-GB">wei.liu@awe.co.uk</span></a><span style="color:#00747B;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#768693;mso-fareast-language:EN-GB">AWE Aldermaston,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#768693;mso-fareast-language:EN-GB">Reading, Berkshire, RG7 4PR<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
The information in this email and in any attachment(s) is commercial in confidence. If you are not the named addressee(s) or if you receive this email in error then any distribution, copying or use of this communication or the information in it is strictly
 prohibited. Please notify us immediately by email at admin.internet(at)awe.co.uk, and then delete this message from your computer. While attachments are virus checked, AWE plc does not accept any liability in respect of any virus which is not detected. AWE
 Plc Registered in England and Wales Registration No 02763902 AWE, Aldermaston, Reading, RG7 4PR
</body>
</html>