On Jan 17, 2014, at 6:05 PM, Jed Brown <[email protected]> wrote: > Barry Smith <[email protected]> writes: > >> The problem is that CFLAGS can have all kind of flags having >> nothing to do with optimization. > > Right. Do we really need to classify and do things differently?
Yes, What if they just set a single flag having nothing to do with optimization. This will turn off PETSc’s attempt to provide any kind of optimization flag (even with —with-debugging=0). I think this is bad. * * yes we do a crummy job of selecting optimization flags, we should do better, but we shouldn’t leave no optimization just because they passed some CFLAG. > >> Could we do the following? >> >> Look through any provided CFLAGS (FFLAGS, CXXFLAGS) if we detect >> something that looks like optimization then act as if COPTFLAGS was >> set and do not set our own optimization default flag? We can also >> keep support for the COPTFLAGS stuff >> >> We can look for -O%d , are there other things to look for? This seems >> easy enough to add. > > -ftree-vectorize, -fast, -qhot -qsimd=auto So if they pass -fast then we simply don’t set any optimization flags ourself? We could do that. Barry
