[petsc-dev] BuildSystem help needed
Barry Smith
bsmith at mcs.anl.gov
Fri Jul 22 20:26:18 CDT 2011
Thanks, seems to work.
Barry
On Jul 22, 2011, at 8:10 PM, Matthew Knepley wrote:
> On Sat, Jul 23, 2011 at 3:03 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> Matt,
>
> When a user provides --download-packagename for any package that does not support --download- configure silently ignores their request leading the user to think that it actually did download the package.
>
> This is because in package.py there is the code
>
> def checkDownload(self, requireDownload = 1):
> '''Check if we should download the package, returning the install directory or the empty string indicating installation'''
> if not self.download:
> return ''
>
> I naively thought I could simple add a check if the user provided --download-package but self.download was not supported it would error out with a useful error message. That proved impossible.
>
> Impossible!!! This is ridiculous. Either I have no idea what you want, or this is a serious case of Not Invented Here syndrome (also I did not even write these lines of code).
>
> @@ -480,6 +480,8 @@
> raise RuntimeError('External package '+self.name+' does not work on Microsoft Windows')
> if self.download and self.framework.argDB.has_key('download-'+self.downloadname.lower()) and self.framework.argDB['download-'+self.downloadname.lower()] and not self.downloadonWindows and self.setCompilers.isCygwin():
> raise RuntimeError('External package '+self.name+' does not support --download-'+self.downloadname.lower()+' on Microsoft Windows')
> + if not self.download and self.framework.argDB.has_key('download-'+self.downloadname.lower()) and self.framework.argDB['download-'+self.downloadname.lower()]:
> + raise RuntimeError('External package '+self.name+' does not support --download-'+self.downloadname.lower())
> return
>
>
> Matt
>
> Could you please add something to BuildSystem so that if a user requests --download-packagename but that functionality is not supported it generates a nice error message, in particular this needs to work for --download-thrust --download-cusp and --download-cuda but there are many others as well.
>
> Thanks
>
> 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
More information about the petsc-dev
mailing list