<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 17, 2014 at 9:46 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Barry Smith <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> writes:<br>
<br>
>    Yes, What if they just set a single flag having nothing to do with<br>
>    optimization. This will turn off PETSc’s attempt to provide any<br>
>    kind of optimization flag (even with —with-debugging=0). I think<br>
>    this is bad. *<br>
<br>
Is it really that bad?  Other packages usually don't try to do anything<br>
smart and I think there is a very real cost to second-guessing the user.<br>
Worse, the user has to wait minutes for configure to complete before<br>
reading the printout carefully to learn what PETSc decided to use.<br>
<br>
I think we still want warning flags because users are unlikely to guess<br>
decent ones.  And -fPIC needs to be automatic based on shared libs.<br>
<br>
>>>   Could we do the following?<br>
>>><br>
>>>   Look through any provided CFLAGS (FFLAGS, CXXFLAGS) if we detect<br>
>>>   something that looks like optimization then act as if COPTFLAGS was<br>
>>>   set and do not set our own optimization default flag? We can also<br>
>>>   keep support for the COPTFLAGS stuff<br>
>>><br>
>>>   We can look for -O%d , are there other things to look for?  This seems easy enough to add.<br>
>><br>
>> -ftree-vectorize, -fast, -qhot -qsimd=auto<br>
><br>
>    So if they pass -fast then we simply don’t set any optimization flags ourself? We could do that.<br>
<br>
My point was that there are *lots* of optimization flags, with new ones<br>
every release from every vendor.  We could test for a few, but can never<br>
be comprehensive.  Do we want to be in this business?<br>
</blockquote></div><br>I am a fan of our current organization, which is the right mix of flexibility and performance. I don't</div><div class="gmail_extra">think we can do much better, since we are stuck with the crap command line interface to compilers.</div>
<div class="gmail_extra">I hate compilers.</div><div class="gmail_extra"><br></div><div class="gmail_extra">   Matt<br clear="all"><div><br></div>-- <br>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>