[petsc-dev] [petsc-users] Override PETSc compile options
Satish Balay
balay at mcs.anl.gov
Thu May 8 23:51:17 CDT 2014
On Thu, 8 May 2014, Jed Brown wrote:
> Satish Balay <balay at mcs.anl.gov> writes:
> >> >> Sorry, I mean during the compilation of my own codes using my own makefile.
> >> >>
> >> > $ grep Wall arch-linux2-c-debug/conf/petscvariables
> >> > FC_LINKER_FLAGS = -fPIC -Wall -Wno-unused-variable -Wno-unused-dummy-argument -g -O0
> >> > CC_FLAGS = -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -O0
> >> > FC_FLAGS = -fPIC -Wall -Wno-unused-variable -Wno-unused-dummy-argument -g -O0
> >> > CXX_FLAGS = -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g -O0 -fPIC
> >> > PCC_LINKER_FLAGS = -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -O0
> >> > PCC_FLAGS = -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -O0
> >> > balay at asterix /home/balay/petsc (master)
> >>
> >> Why does PETSc specify these redundantly using non-standard names as
> >> opposed to CFLAGS, CPPFLAGS, LDFLAGS, etc? I never remember which name
> >> is used where so I have to grep conf/variables and petscvariables every
> >> time. (I'd rather those be namespaced, but that's another issue.)
> >
> > The above are internal names.
> >
> > The user-interface provides a way to add flags [via CFLAGS,CPPFLAGS
> > etc..] the same way one can add flags to compilers - or mpicc [i.e not
> > replace the defaults]
> >
> > [previously we did use CFLAGS,CPPFLAGS internally - and when users
> > [unintentionally] also used the same flags in their makefiles - the
> > defaults were replaced - causing unwanted behavior. Hence the current
> > usage.
>
> That isn't justification for a redundant, overlapping set of variables,
> and generally no naming system. Why not PETSC_CFLAGS, PETSC_LDFLAGS,
> etc?
At that time - there was a percieved problem that got adressed.
If the naming schme was not consistant with a 'prefered' scheme - I guess it can be fixed.
No one [on the user side] used it or cared about it in past many years.
Satish
More information about the petsc-dev
mailing list