> On Aug 4, 2017, at 4:40 AM, Lisandro Dalcin <[email protected]> wrote: > > On 4 August 2017 at 01:38, Jed Brown <[email protected]> wrote: >> Lisandro Dalcin <[email protected]> writes: >> >>> On 2 August 2017 at 17:49, Satish Balay <[email protected]> wrote: >>>> >>>> On Wed, 2 Aug 2017, Lisandro Dalcin wrote: >>>> >>>>> Is this intentional or just an oversight? >>>> >>>> Probably an oversight.. >>>> >>>>> Should it be fixed in maint? >>>> >>>> Sure - with the bug-fix branch off maint - with testing in next first.. >>>> >>> >>> Not sure about the proper way to add the include. I would say it >>> should go to petscvec.h, as SF is part of the Vec package and >>> libpetscvec. Do you agree? >> >> petscao.h is not included by any other headers in the Vec package. I'm >> not sure why petscsf.h would be different. Why not just include it in >> petsc.h? >> > > Well, maybe that's an oversight, too. Including petscvec.h should > include all what is available in the Vec package. Otherwise, why is > petscis.h included in petscvec.h (It seems petscistypes.h is all what > should be required for petscvec.h) ? I'm fine with doing things one > way or another, but we should have a rule and be consistent about it. > Is there a rule? If not, what should be the rule?
We use to have massive over inclusion; Jed pushed for minimal includes (which introduced things like petscXXXtypes.h) this improved compile times a good amount. So I think our rule is to balance not having excessive inclusions with simplicity for users. For example AO is not used by many people who use Vec so it is not included in petscvec.h but IS is used by most Vec users and hence is included by default. Similarly most people do not use SF so it is not included by default. Note: how we determine if something is used "by most users" is not defined. > > > -- > Lisandro Dalcin > ============ > Research Scientist > Computer, Electrical and Mathematical Sciences & Engineering (CEMSE) > Extreme Computing Research Center (ECRC) > King Abdullah University of Science and Technology (KAUST) > http://ecrc.kaust.edu.sa/ > > 4700 King Abdullah University of Science and Technology > al-Khawarizmi Bldg (Bldg 1), Office # 0109 > Thuwal 23955-6900, Kingdom of Saudi Arabia > http://www.kaust.edu.sa > > Office Phone: +966 12 808-0459
