[petsc-dev] BuildSystem clean-up

Satish Balay balay at mcs.anl.gov
Thu Feb 23 20:28:09 CST 2012


On Thu, 23 Feb 2012, Barry Smith wrote:

> 
> On Feb 23, 2012, at 4:33 PM, Sean Farley wrote:
> 
> > So, apparently, BuildSystem creates a working directory for external packages specified with the --download-package option. This seems like a perfect place to do scratch work for the external package but this folder is not cleaned out when the configure options change. Example:
> > 
> > $ export PETSC_ARCH=arch-test
> > $ ./configure --download-metis
> > $ ls externalpackages/metis-5.0.2/arch-test/
> > 
> > FILE1 FILE2 FILE3
> > 
> > Now, I would expect BuildSystem to clean this directory, at the very least, when options change:

BTW: externalpackages/package/PETSC_ARCH is more like a default prefix
for the package. Ideally if the package supported prefix - we would
use it and put the stuff directly in PETSC_DIR/PETSC_ARCH - and
externalpackages/package/PETSC_ARCH won't have any stuff in it.

Perhaps some package.py files are doing things manually and using
externalpackages/package/PETSC_ARCH as temporary location - and later
coping things over to PETSC_DIR/PETSC_ARCH - and not cleaning things
up. [in externalpackages/package/PETSC_ARCH].

Satish

> > $ ./configure --download-metis --with-precision=single
> > $ ls externalpackages/metis-5.0.2/arch-test/
> > FILE1 FILE2 FILE3
> 
>    The assumption was that each external package had an appropriate clean that would be called by the XXXX.py BEFORE doing a build to clean it up; this did require each XXXX.py knowing how to call the clean and doing this.  Clearly this assumption was wilding optimistic. 
> 
>    The draw back to having buildsystem (note the lack of caps) doing the clean AFTER doing the building is important generated stuff useful for debugging may be lost. So what about doing the clean out of that directory at the beginning, not at the end?
> 
> > 
> > The same files exist which could spell trouble in this case. Does every package *have* to implement its own clean-up (this sounds crazy!!) or can I safely put this into BuildSystem without the Tower of Babel crumbling around my feet? If this change is "good" then how does BuildSystem determine that the options changed (self.installNeeded?)? Or should it just blow away this directory every time?
> 
>    How buildsystem knowns if the package should be rebuilt is NOT stored in that directory so making your change should not affect the current somewhat "smart" build again only if needed logic.
> 
>    Barry
> 
> 
> 




More information about the petsc-dev mailing list