[gmx-developers] hidden compiler flags in 4.6?

Roland Schulz roland at utk.edu
Sun Feb 3 01:53:41 CET 2013

On Sat, Feb 2, 2013 at 5:42 PM, Szilárd Páll <szilard.pall at cbr.su.se> wrote:

>  Hi,
>  With the compiler flag handling changed between beta3 and final, now it
> is completely impossible to check or modify compiler flags we generate.
>  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 "-version" output.
>  Not only that this is a rather annoying, making it impossible to change
> the default compiler options is a very naive behavior.
You need to set GMX_SKIP_DEFAULT_CFLAGS. This lets you overwrite and see
what would be appended.

 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.

O3 is set by cmake not by us - and it behaves as cmake developers think it
should behave. Look at the redmine issues for the details.

I think the above issues need fixing asap, preferably by 4.6.1, but I'm not
> familiar with the code, so I can't suggest a concrete solution.
I disagree. Everything works the way as has been discussed in redmine. We
shoudn't change the behaviour after a release.


>  Cheers,
>  --
> Szilárd

ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
865-241-1537, ORNL PO BOX 2008 MS6309
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20130202/e34bbe61/attachment.html>

More information about the gromacs.org_gmx-developers mailing list