<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 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.EmailStyle18
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:2024554038;
mso-list-type:hybrid;
mso-list-template-ids:1981820020 206371662 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:24.75pt;
text-indent:-.25in;
font-family:Symbol;
mso-fareast-font-family:Calibri;
mso-bidi-font-family:"Times New Roman";}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:60.75pt;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:96.75pt;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:132.75pt;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:168.75pt;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:204.75pt;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:240.75pt;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:276.75pt;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:312.75pt;
text-indent:-.25in;
font-family:Wingdings;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></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-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Sorry, that last question should read<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">• Is it a good idea to turn -O2 off generally for --enable-debug, and -CB off generally for production builds?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">——<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> I was recently building QE 5.4.0. FWIW,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">[cchang@n1011 ~]$ uname -a<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Linux n1011 2.6.32-504.8.1.el6.x86_64 #1 SMP Wed Jan 28 21:11:36 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">[cchang@n1011 ~]$ cat /etc/redhat-release
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">CentOS release 6.6 (Final)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">[cchang@n1011 ~]$ mpif90 -v<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">mpif90 for the Intel(R) MPI Library 5.1.3 for Linux*<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Copyright(C) 2003-2015, Intel Corporation. All rights reserved.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">ifort version 16.0.2<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">[cchang@n1011 ~]$ mpif77 -v<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">mpif77 for the Intel(R) MPI Library 5.1.3 for Linux*<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Copyright(C) 2003-2015, Intel Corporation. All rights reserved.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Using built-in specs.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">COLLECT_GCC=gfortran<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">COLLECT_LTO_WRAPPER=/nopt/nrel/apps/gcc/5.2.0/libexec/gcc/x86_64-unknown-linux-gnu/5.2.0/lto-wrapper<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Target: x86_64-unknown-linux-gnu<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Configured with: ./configure --prefix=/nopt/nrel/apps/gcc/5.2.0 --enable-bootstrap --disable-multilib<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Thread model: posix<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">gcc version 5.2.0 (GCC)</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Configuration was with<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">configure --prefix=/scratch/cchang/qespresso --enable-openmp --enable-parallel --enable-debug --enable-signals --with-scalapack=intel LDFLAGS="-mkl"<o:p></o:p></span></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Anyway, I noticed that the space_group.f90 build step seemed to hang, although CPU usage was pegged at 100%.<o:p></o:p></p>
<p class="MsoNormal"> After some diagnostic work, I nailed the long build time down to the array bounds checking. If -CB is left off, the file builds in about 2 minutes. I didn’t wait long enough to see how long the standard build would take, but it was more
than 11 minutes, possibly much more.<o:p></o:p></p>
<p class="MsoNormal"> The reason I write, is that the Intel ifort man page points out that array bounds checking won’t work as expected anyway, if optimizations are turned on. Specifically,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">“<o:p></o:p></p>
<p class="MsoNormal">It is recommended that you do bounds checking on unoptimized code. If you use option check bounds on optimized code, it may produce misleading mes-<o:p></o:p></p>
<p class="MsoNormal"> sages because registers (not memory locations) are used for bounds values.<o:p></o:p></p>
<p class="MsoNormal">“<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoListParagraph" style="margin-left:24.75pt;text-indent:-.25in;mso-list:l0 level1 lfo2">
<![if !supportLists]><span style="font-family:Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]>Is this a reasonable thing to do for this file?<o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:24.75pt;text-indent:-.25in;mso-list:l0 level1 lfo2">
<![if !supportLists]><span style="font-family:Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]>Is it a good idea to turn it off generally for --enable-debug?<o:p></o:p></p>
<p class="MsoNormal">
<o:p></o:p></p>
<p class="MsoNormal">Thanks for any pointers you can provide,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Chris<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-autospace:none">-- <o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none">Christopher H. Chang, Ph.D.<o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"> Computational Chemist | NREL Computational Science Center<o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"> Research Associate | University of Colorado/RASEI<o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none">15013 Denver West Parkway, MS ESIF301 | Golden, CO 80401<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>