[petsc-dev] provider stuff in package.py

Matthew Knepley knepley at gmail.com
Tue Sep 30 16:09:23 CDT 2014


On Tue, Sep 30, 2014 at 4:00 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
>   Matt,
>
>     Can all the “provider” stuff in package.py like
>
>   def getDefaultPrecision(self):
>     '''The precision of the library'''
>     if hasattr(self, 'precisionProvider'):
>       if hasattr(self.precisionProvider, 'precision'):
>         return self.precisionProvider.precision
>     return self._defaultPrecision
>   def setDefaultPrecision(self, defaultPrecision):
>     '''The precision of the library'''
>     self._defaultPrecision = defaultPrecision
>     return
>   defaultPrecision = property(getDefaultPrecision, setDefaultPrecision,
> doc = 'The precision of the library’)
>
> be cleaned up/simplified/removed with the new BuildSystem model?
>
> What was the original need for the provider stuff and is there still a
> need? If there is still a need can it be satisfied some other way. Is there
> every a need for a different provide for different packages? For example
> hypre gets one xxx provider and some other package gets a different xxxx
> provider.


The provider stuff is intended to support out-of-package ways to say
something about the configuration. So we have an object
that can come from anywhere. The stuff around it just access the object
automatically, instead of making the user pull it out and
reference it. I thought that was easier.

Do you want to just set a flag? I thought that was limiting, and duplicated
information.

You can get rid of all this boilerplate code in newer version of Python. We
have been
outlawing newer versions. If we reopen that discussion, I vote for
autoinstalling Python
2.7.

  Thanks,

    Matt


>   Barry
>
-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20140930/d5749806/attachment.html>


More information about the petsc-dev mailing list