<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Hi,</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">With the compiler flag handling changed between beta3 and final, now it is completely impossible to check or modify compiler flags we generate.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I might have missed the discussion on this during code review, but I simply consider this a bug. It is pretty much impossible to know what compiler flags are being used - at least not at build time, not even by looking at the cache, and not without first compiling a binary and checking the &quot;-version&quot; output.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Not only that this is a rather annoying, making it impossible to change the default compiler options is a very naive behavior. We can not assume that whatever flags we use will be optimal and will not potentially conflict with something the user adds. Here&#39;s the example:</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">CC=icc cmake $PATH_TO_SRC -DGMX_GPU=OFF -DGMX_CPU_ACCELERATION=SSE4.1 -DCMAKE_C_FAGLS_RELEASE=&quot;-xHOST&quot;</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">This should be a perfectly reasonable setup, but icc does not like the combination of -msse4.1 and -xHOST and will issue a warning for each compiler invocation. Removing -msse4.1 and keeping -xHOST only would be an easy cosmetic fix, but it is currently impossible to do. Of course, this is a mostly harmless case, but it illustrates the issue and I&#39;m pretty certain that such a limitation will cause trouble to not only developers, but advanced users, sysadmins, etc.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Additionally, there is another issue with the bove example: manually passing CMAKE_C_FAGLS_RELEASE will overwrite the default release flags (-O3 -DNDEBUG). This leads to another issue: passing any additional release flag will lead to -O2 being used as this is the default with most compilers (and -O3 get overridden). Consequently, if one wants to *append* and optimization flag, this can only be done post-configure by modifying the cache, but not during configure which goes against the principle we tried to adhere to that users should be able to flexibly configure GROMACS by using a single command.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I think the above issues need fixing asap, preferably by 4.6.1, but I&#39;m not familiar with the code, so I can&#39;t suggest a concrete solution.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Cheers,</div><div><div>--<br>Szilárd</div>
</div>
</div>