[petsc-dev] CFLAGS and COPTFLAGS

Barry Smith bsmith at mcs.anl.gov
Sat Jan 18 13:19:33 CST 2014


   If mpicc is providing a -On flag and the PETSc ./configure user provides a -Om flag should we generate a very useful error message telling them of the conflict? 

   Even generate an error?

   Barry


On Jan 18, 2014, at 11:09 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:

> 
> On Jan 18, 2014, at 10:43 AM, Jed Brown <jed at jedbrown.org> wrote:
> 
>> Barry Smith <bsmith at mcs.anl.gov> writes:
>>>  Do people really set some of the above and not set the -O%d one at the same time?
>> 
>> I don't know.  Sometimes the MPI wrapper adds the -O flag itself.  The
>> user might know that and thus not bother adding it themselves.  I think
>> it would be surprising for some special flags to cause such changes in
>> behavior.  I don't have a strong opinion on this point, but I think we
>> should do something better than we have now.
> 
>   Summary
> 
>   The reason for the current model is that in the original plan —with-debugging=0 would providing good compiler optimization flags (for each system) without the user having to set them; if the user set them via COPTFLAGS then we did set them ourselves.
> 
>   Observations
> 
>    1)   The “standard” for passing optimization flags to ./configure is CFLAGS=“-O3 crap” we don’t support this and this confuses users
> 
>    2) If we followed the standard and the user only set non-optimization flags with CFLAGS we would not turn on optimization when user might expect it (does this ever happen?)
> 
>    3) We provide a different, “better" way of providing optimization flags and other CFLAGS, but know one knows about it.
> 
>    4) Our —with-debugging=0 optimization flags are pretty bad, we should improve them
> 
>    So choices are
> 
>     A) follow standard
> 
>     B) Continue our way
> 
>      C) Hybrid that does not use our own flags if user provides optimization flag.
> 
> Request-assigned: Satish,  if CLAGS contains a -O    CXXFLAGS contains a -O FFLAGS contains a -O then turn off PETSc generation of optimization flags for that compiler
> 
> Request-assigned: Satish,  if mpicc, mpicxx, mpifc provide -O flags then turn off PETSc generation of optimization flags
> 
>    Won’t completely satisfy anyone but me.
> 
>   Barry
> 
> 
> 
> 




More information about the petsc-dev mailing list