[petsc-dev] improvement to ./configure

Barry Smith bsmith at mcs.anl.gov
Fri Jan 8 16:40:59 CST 2010


     Matt also checks the 0th argument (the name of the file) for _. I  
have pushed a fix so it does not check the zeroth argument.


    Barry

On Jan 8, 2010, at 4:28 PM, Richard Tran Mills wrote:

> Hi Barry,
>
> I'm one of those folks who likes to call configure from a Python  
> script.  Here it is:
>
> -----
> #!/usr/bin/env python
>
> configure_options = [
>  '--with-cc=gcc',
>  '--with-fc=gfortran',
>  '--with-cxx=g++',
>  'COPTFLAGS=-g',
>  'FOPTFLAGS=-g',
>  'CXXOPTFLAGS=-g'
> #  '--with-mpi-include=/home/petsc/soft/linux-rh73/mpich-1.2.4/ 
> include',
> # '--with-mpi-lib=[/home/petsc/soft/linux-rh73/mpich-1.2.4/lib/ 
> libpmpich.a,libmpich.a,libpmpich.a]',
>  ]
>
> if __name__ == '__main__':
>  import sys,os
>  sys.path.insert(0,os.path.abspath('config'))
>  import configure
>  configure.petsc_configure(configure_options)
> -----
>
> The name of the script is 'ubuntu-gnu_g.py'.  Changing it to 'ubuntu- 
> gnu-g.py' makes this problem go away.
>
> --Richard
>
> Barry Smith wrote:
>>  Please cut and paste exactly what command you run. The commands  
>> to ./configure usually have --xxxx they don't usually consist of a  
>> filename.
>>   Barry
>> On Jan 8, 2010, at 4:13 PM, Richard Tran Mills wrote:
>>> Matt,
>>>
>>> I now get something like the following when executing a  
>>> configuration script with a '_' in it:
>>>
>>> Traceback (most recent call last):
>>> File "config/ubuntu-gnu_g.py", line 18, in <module>
>>>   configure.petsc_configure(configure_options)
>>> File "/home/rmills/proj/petsc-dev/config/configure.py", line 150,  
>>> in petsc_configure
>>>   check_for_option_mistakes(sys.argv)
>>> File "/home/rmills/proj/petsc-dev/config/configure.py", line 33,  
>>> in check_for_option_mistakes
>>>   raise ValueError('The option '+name+' should probably be  
>>> '+name.replace('_', '-'));
>>> ValueError: The option config/ubuntu-gnu_g.py should probably be  
>>> config/ubuntu-gnu-g.py
>>>
>>> It seems like not allowing '_' characters in these filenames is an  
>>> unintended consequence.
>>>
>>> --Richard
>>>
>>> Matthew Knepley wrote:
>>>> Pushed something. Let me know if this is what you had in mind.
>>>> Matt
>>>> On Mon, Jan 4, 2010 at 7:52 AM, Barry Smith <bsmith at mcs.anl.gov <mailto:bsmith at mcs.anl.gov 
>>>> >> wrote:
>>>>    Matt,
>>>>     Thanks!
>>>>      Barry
>>>>   On Jan 4, 2010, at 12:20 AM, Matthew Knepley wrote:
>>>>       I can try to put something in.
>>>>        Matt
>>>>       On Sun, Jan 3, 2010 at 7:16 PM, Barry Smith <bsmith at mcs.anl.gov
>>>>       <mailto:bsmith at mcs.anl.gov>> wrote:
>>>>        Matt,
>>>>        It would be nice when some user types --xxxx-yyyyyy_zzzz and
>>>>       they meant --xxxx-yyyyyy-zzzz it would give them a nice error
>>>>       message. This is made difficult by the fact that superlu_dist
>>>>       name as an underscore in it. Are there other special cases?
>>>>        Could we have BuildSystem barf with helpful error message
>>>>       whenever someone puts an _ instead of - except when allowed  
>>>> like
>>>>       superlu_dist?
>>>>        We semi-regularly waste time with petsc-maint messages of
>>>>       people who cannot distinguish _ from -
>>>>         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
>>>> -- 
>>>> 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
>>>
>>>
>>> -- 
>>> Richard Tran Mills, Ph.D.            |   E-mail: rmills at climate.ornl.gov
>>> Computational Scientist              |   Phone:  (865) 241-3198
>>> Computational Earth Sciences Group   |   Fax:    (865) 574-0405
>>> Oak Ridge National Laboratory        |   http://climate.ornl.gov/~rmills
>
>
> -- 
> Richard Tran Mills, Ph.D.            |   E-mail: rmills at climate.ornl.gov
> Computational Scientist              |   Phone:  (865) 241-3198
> Computational Earth Sciences Group   |   Fax:    (865) 574-0405
> Oak Ridge National Laboratory        |   http://climate.ornl.gov/~rmills




More information about the petsc-dev mailing list