script to query PETSc makefile variables?

2009-01-23 Thread Matthew Knepley
There is a problem with this. I don't really use 'script', but I do
use ArgDB, so we
still need BuildSystem.

  Matt

On Thu, Jan 22, 2009 at 6:34 PM, Matthew Knepley  wrote:
> I will split it into two pieces. One with a nice interface, that only
> works in the
> source directories OR if you install BuildSystem, and one that does nothing
> but return a variable value.
>
>  Matt
>
> On Thu, Jan 22, 2009 at 6:30 PM, Barry Smith  wrote:
>>
>>  Matt,
>>
>>I don't understand. If PETSc is --prefix installed then configVars.py
>> will not work?
>> So what good is it's nice help system if it don't work? Either
>>
>> 1) configVars.py should not be recommend as a way to get PETSc values or
>> 2) configVars.py should be fixed so that it can get PETSc values by
>>a) either removing its dependencies on things that are not there when
>> someone
>> wants to use it (that is its dependency on script)
>>b) anything that configVars.py needs to work must be --prefix installed
>> when PETSc
>> is installed (I don't like the idea of needing the entire
>> BuildSystem shoved in when
>> PETSc is --prefix installed, this is why I suggested a). Maybe only
>> script stuff needs
>> to be --prefix installed with PETSc).
>>
>>
>>   Barry
>>
>> On Jan 22, 2009, at 6:20 PM, Matthew Knepley wrote:
>>
>>> On Thu, Jan 22, 2009 at 6:18 PM, Barry Smith  wrote:

 On Jan 22, 2009, at 6:17 PM, Matthew Knepley wrote:

>>
>
> I meant something slightly different. I mean that the 'script' module
> is really doing very
> little work in this example. It is only processing command line
> options. Retreiving the
> variables will work with only standard Python.
>
  So take out the dependency.
>>>
>>> I like it for this example. It allows a nice help system and will
>>> always work since this
>>> code is in PETSc. If you want to take the code out, then its your
>>> responsibility to
>>> take out 'script' as well.
>>>
>>>  Matt
>>>
  Barry

> Matt
>
>> Boyana
>>
>>> Matt
>>>
>>>

 Boyana

 Matthew Knepley wrote:

>
> On Thu, Jan 22, 2009 at 5:15 PM, Boyana Norris 
> wrote:
>
>
>>
>> Thank you both -- I'd prefer to use configVars.py, but it seems to
>> depend
>> on
>> the script module, which is not standard in at least Python 2.5.
>> Googling
>> for "python script module" is a joke, as you can imagine. Is this a
>> PETSc
>> thing or a general module I can get somewhere?
>>
>>
>
> That module is in PETSc,
>
> $PETSC_DIR/config/BuildSystem
>
> Matt
>
>
>
>>
>> Thanks!
>> Boyana
>>
>> Matthew Knepley wrote:
>>
>>
>>>
>>> Check out $PETSC_DIR/bin/configVars.py
>>>
>>> Matt
>>>
>>> On Thu, Jan 22, 2009 at 4:38 PM, Satish Balay 
>>> wrote:
>>>
>>>
>>>

 On Thu, 22 Jan 2009, Boyana Norris wrote:




>
> Is there a script that can be used to query the values of
> various
> variables
> defined in petscvariables makefile snippets (similar to lots of
> linux
> tools'
> pkg-config scripts)?
>
>
>

 [don't have canned code for this but] I've previously recommended
 doing the following in the packages configure.. [facets now has
 this
 in their configure to detect petsc]


 - petsc_arch and petsc_dir are inputs to configure
 - Create a dummy makefile on the fly
 - run this makefile to echo relavent stuff..


 For eg:
 asterix:/home/balay/download-pine>cat configpetsc.sh
 #!/bin/sh

 PETSC_ARCH=asterix64
 PETSC_DIR=/home/balay/spetsc

 cat < petscmake
 PETSC_ARCH = ${PETSC_ARCH}
 PETSC_DIR  = ${PETSC_DIR}
 include ${PETSC_DIR}/conf/base
 EOF

 PETSC_INC=`make -f petscmake getincludedirs`
 PETSC_LIB=`make -f petscmake getlinklibs`

 echo ' PETSC_INC ***'
 echo ${PETSC_INC}
 echo ' PETSC_LIB ***'
 echo ${PETSC_LIB}


 Satish




>>>
>>>
>>
>> --
>> Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
>> Argonne National Laboratory  |   Phon

script to query PETSc makefile variables?

2009-01-22 Thread Boyana Norris
That would be great -- thank you!
Boyana

Matthew Knepley wrote:
> I will split it into two pieces. One with a nice interface, that only
> works in the
> source directories OR if you install BuildSystem, and one that does nothing
> but return a variable value.
>
>   Matt
>
> On Thu, Jan 22, 2009 at 6:30 PM, Barry Smith  wrote:
>   
>>  Matt,
>>
>>I don't understand. If PETSc is --prefix installed then configVars.py
>> will not work?
>> So what good is it's nice help system if it don't work? Either
>>
>> 1) configVars.py should not be recommend as a way to get PETSc values or
>> 2) configVars.py should be fixed so that it can get PETSc values by
>>a) either removing its dependencies on things that are not there when
>> someone
>> wants to use it (that is its dependency on script)
>>b) anything that configVars.py needs to work must be --prefix installed
>> when PETSc
>> is installed (I don't like the idea of needing the entire
>> BuildSystem shoved in when
>> PETSc is --prefix installed, this is why I suggested a). Maybe only
>> script stuff needs
>> to be --prefix installed with PETSc).
>>
>>
>>   Barry
>>
>> On Jan 22, 2009, at 6:20 PM, Matthew Knepley wrote:
>>
>> 
>>> On Thu, Jan 22, 2009 at 6:18 PM, Barry Smith  wrote:
>>>   
 On Jan 22, 2009, at 6:17 PM, Matthew Knepley wrote:

 
> I meant something slightly different. I mean that the 'script' module
> is really doing very
> little work in this example. It is only processing command line
> options. Retreiving the
> variables will work with only standard Python.
>
>   
  So take out the dependency.
 
>>> I like it for this example. It allows a nice help system and will
>>> always work since this
>>> code is in PETSc. If you want to take the code out, then its your
>>> responsibility to
>>> take out 'script' as well.
>>>
>>>  Matt
>>>
>>>   
  Barry

 
> Matt
>
>   
>> Boyana
>>
>> 
>>> Matt
>>>
>>>
>>>   
 Boyana

 Matthew Knepley wrote:

 
> On Thu, Jan 22, 2009 at 5:15 PM, Boyana Norris 
> wrote:
>
>
>   
>> Thank you both -- I'd prefer to use configVars.py, but it seems to
>> depend
>> on
>> the script module, which is not standard in at least Python 2.5.
>> Googling
>> for "python script module" is a joke, as you can imagine. Is this a
>> PETSc
>> thing or a general module I can get somewhere?
>>
>>
>> 
> That module is in PETSc,
>
> $PETSC_DIR/config/BuildSystem
>
> Matt
>
>
>
>   
>> Thanks!
>> Boyana
>>
>> Matthew Knepley wrote:
>>
>>
>> 
>>> Check out $PETSC_DIR/bin/configVars.py
>>>
>>> Matt
>>>
>>> On Thu, Jan 22, 2009 at 4:38 PM, Satish Balay 
>>> wrote:
>>>
>>>
>>>
>>>   
 On Thu, 22 Jan 2009, Boyana Norris wrote:




 
> Is there a script that can be used to query the values of
> various
> variables
> defined in petscvariables makefile snippets (similar to lots of
> linux
> tools'
> pkg-config scripts)?
>
>
>
>   
 [don't have canned code for this but] I've previously recommended
 doing the following in the packages configure.. [facets now has
 this
 in their configure to detect petsc]


 - petsc_arch and petsc_dir are inputs to configure
 - Create a dummy makefile on the fly
 - run this makefile to echo relavent stuff..


 For eg:
 asterix:/home/balay/download-pine>cat configpetsc.sh
 #!/bin/sh

 PETSC_ARCH=asterix64
 PETSC_DIR=/home/balay/spetsc

 cat < petscmake
 PETSC_ARCH = ${PETSC_ARCH}
 PETSC_DIR  = ${PETSC_DIR}
 include ${PETSC_DIR}/conf/base
 EOF

 PETSC_INC=`make -f petscmake getincludedirs`
 PETSC_LIB=`make -f petscmake getlinklibs`

 echo ' PETSC_INC ***'
 echo ${PETSC_INC}
 echo ' PETSC_LIB ***'
 echo ${PETSC_LIB}


 Satish




>>>

script to query PETSc makefile variables?

2009-01-22 Thread Matthew Knepley
I will split it into two pieces. One with a nice interface, that only
works in the
source directories OR if you install BuildSystem, and one that does nothing
but return a variable value.

  Matt

On Thu, Jan 22, 2009 at 6:30 PM, Barry Smith  wrote:
>
>  Matt,
>
>I don't understand. If PETSc is --prefix installed then configVars.py
> will not work?
> So what good is it's nice help system if it don't work? Either
>
> 1) configVars.py should not be recommend as a way to get PETSc values or
> 2) configVars.py should be fixed so that it can get PETSc values by
>a) either removing its dependencies on things that are not there when
> someone
> wants to use it (that is its dependency on script)
>b) anything that configVars.py needs to work must be --prefix installed
> when PETSc
> is installed (I don't like the idea of needing the entire
> BuildSystem shoved in when
> PETSc is --prefix installed, this is why I suggested a). Maybe only
> script stuff needs
> to be --prefix installed with PETSc).
>
>
>   Barry
>
> On Jan 22, 2009, at 6:20 PM, Matthew Knepley wrote:
>
>> On Thu, Jan 22, 2009 at 6:18 PM, Barry Smith  wrote:
>>>
>>> On Jan 22, 2009, at 6:17 PM, Matthew Knepley wrote:
>>>
>

 I meant something slightly different. I mean that the 'script' module
 is really doing very
 little work in this example. It is only processing command line
 options. Retreiving the
 variables will work with only standard Python.

>>>  So take out the dependency.
>>
>> I like it for this example. It allows a nice help system and will
>> always work since this
>> code is in PETSc. If you want to take the code out, then its your
>> responsibility to
>> take out 'script' as well.
>>
>>  Matt
>>
>>>  Barry
>>>
 Matt

> Boyana
>
>> Matt
>>
>>
>>>
>>> Boyana
>>>
>>> Matthew Knepley wrote:
>>>

 On Thu, Jan 22, 2009 at 5:15 PM, Boyana Norris 
 wrote:


>
> Thank you both -- I'd prefer to use configVars.py, but it seems to
> depend
> on
> the script module, which is not standard in at least Python 2.5.
> Googling
> for "python script module" is a joke, as you can imagine. Is this a
> PETSc
> thing or a general module I can get somewhere?
>
>

 That module is in PETSc,

 $PETSC_DIR/config/BuildSystem

 Matt



>
> Thanks!
> Boyana
>
> Matthew Knepley wrote:
>
>
>>
>> Check out $PETSC_DIR/bin/configVars.py
>>
>> Matt
>>
>> On Thu, Jan 22, 2009 at 4:38 PM, Satish Balay 
>> wrote:
>>
>>
>>
>>>
>>> On Thu, 22 Jan 2009, Boyana Norris wrote:
>>>
>>>
>>>
>>>

 Is there a script that can be used to query the values of
 various
 variables
 defined in petscvariables makefile snippets (similar to lots of
 linux
 tools'
 pkg-config scripts)?



>>>
>>> [don't have canned code for this but] I've previously recommended
>>> doing the following in the packages configure.. [facets now has
>>> this
>>> in their configure to detect petsc]
>>>
>>>
>>> - petsc_arch and petsc_dir are inputs to configure
>>> - Create a dummy makefile on the fly
>>> - run this makefile to echo relavent stuff..
>>>
>>>
>>> For eg:
>>> asterix:/home/balay/download-pine>cat configpetsc.sh
>>> #!/bin/sh
>>>
>>> PETSC_ARCH=asterix64
>>> PETSC_DIR=/home/balay/spetsc
>>>
>>> cat < petscmake
>>> PETSC_ARCH = ${PETSC_ARCH}
>>> PETSC_DIR  = ${PETSC_DIR}
>>> include ${PETSC_DIR}/conf/base
>>> EOF
>>>
>>> PETSC_INC=`make -f petscmake getincludedirs`
>>> PETSC_LIB=`make -f petscmake getlinklibs`
>>>
>>> echo ' PETSC_INC ***'
>>> echo ${PETSC_INC}
>>> echo ' PETSC_LIB ***'
>>> echo ${PETSC_LIB}
>>>
>>>
>>> Satish
>>>
>>>
>>>
>>>
>>
>>
>
> --
> Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
> http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986
>
>
>



>>>
>>> --
>>> Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
>>> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
>>> http://www.mcs.anl.g

script to query PETSc makefile variables?

2009-01-22 Thread Barry Smith

   Matt,

 I don't understand. If PETSc is --prefix installed then  
configVars.py will not work?
So what good is it's nice help system if it don't work? Either

1) configVars.py should not be recommend as a way to get PETSc values or
2) configVars.py should be fixed so that it can get PETSc values by
 a) either removing its dependencies on things that are not there  
when someone
  wants to use it (that is its dependency on script)
 b) anything that configVars.py needs to work must be --prefix  
installed when PETSc
  is installed (I don't like the idea of needing the entire  
BuildSystem shoved in when
  PETSc is --prefix installed, this is why I suggested a).  
Maybe only script stuff needs
  to be --prefix installed with PETSc).


Barry

On Jan 22, 2009, at 6:20 PM, Matthew Knepley wrote:

> On Thu, Jan 22, 2009 at 6:18 PM, Barry Smith   
> wrote:
>>
>> On Jan 22, 2009, at 6:17 PM, Matthew Knepley wrote:
>>

>>>
>>> I meant something slightly different. I mean that the 'script'  
>>> module
>>> is really doing very
>>> little work in this example. It is only processing command line
>>> options. Retreiving the
>>> variables will work with only standard Python.
>>>
>>  So take out the dependency.
>
> I like it for this example. It allows a nice help system and will
> always work since this
> code is in PETSc. If you want to take the code out, then its your
> responsibility to
> take out 'script' as well.
>
>  Matt
>
>>  Barry
>>
>>> Matt
>>>
 Boyana

> Matt
>
>
>>
>> Boyana
>>
>> Matthew Knepley wrote:
>>
>>>
>>> On Thu, Jan 22, 2009 at 5:15 PM, Boyana Norris >> >
>>> wrote:
>>>
>>>

 Thank you both -- I'd prefer to use configVars.py, but it  
 seems to
 depend
 on
 the script module, which is not standard in at least Python  
 2.5.
 Googling
 for "python script module" is a joke, as you can imagine. Is  
 this a
 PETSc
 thing or a general module I can get somewhere?


>>>
>>> That module is in PETSc,
>>>
>>> $PETSC_DIR/config/BuildSystem
>>>
>>> Matt
>>>
>>>
>>>

 Thanks!
 Boyana

 Matthew Knepley wrote:


>
> Check out $PETSC_DIR/bin/configVars.py
>
> Matt
>
> On Thu, Jan 22, 2009 at 4:38 PM, Satish Balay  >
> wrote:
>
>
>
>>
>> On Thu, 22 Jan 2009, Boyana Norris wrote:
>>
>>
>>
>>
>>>
>>> Is there a script that can be used to query the values of  
>>> various
>>> variables
>>> defined in petscvariables makefile snippets (similar to  
>>> lots of
>>> linux
>>> tools'
>>> pkg-config scripts)?
>>>
>>>
>>>
>>
>> [don't have canned code for this but] I've previously  
>> recommended
>> doing the following in the packages configure.. [facets now  
>> has
>> this
>> in their configure to detect petsc]
>>
>>
>> - petsc_arch and petsc_dir are inputs to configure
>> - Create a dummy makefile on the fly
>> - run this makefile to echo relavent stuff..
>>
>>
>> For eg:
>> asterix:/home/balay/download-pine>cat configpetsc.sh
>> #!/bin/sh
>>
>> PETSC_ARCH=asterix64
>> PETSC_DIR=/home/balay/spetsc
>>
>> cat < petscmake
>> PETSC_ARCH = ${PETSC_ARCH}
>> PETSC_DIR  = ${PETSC_DIR}
>> include ${PETSC_DIR}/conf/base
>> EOF
>>
>> PETSC_INC=`make -f petscmake getincludedirs`
>> PETSC_LIB=`make -f petscmake getlinklibs`
>>
>> echo ' PETSC_INC ***'
>> echo ${PETSC_INC}
>> echo ' PETSC_LIB ***'
>> echo ${PETSC_LIB}
>>
>>
>> Satish
>>
>>
>>
>>
>
>

 --
 Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
 Argonne National Laboratory  |   Phone: +1 (630) 252  
 7908
 http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252  
 5986



>>>
>>>
>>>
>>
>> --
>> Boyana Norris, Computer Scientist|   Email:  
>> norris at mcs.anl.gov
>> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
>> http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986
>>
>>
>
>
>
>

 --
 Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
 Argonne National Laboratory  |   Phone: +1 (630) 252 7908
 http://www.mcs.anl.gov/~norris/

script to query PETSc makefile variables?

2009-01-22 Thread Matthew Knepley
On Thu, Jan 22, 2009 at 6:18 PM, Barry Smith  wrote:
>
> On Jan 22, 2009, at 6:17 PM, Matthew Knepley wrote:
>
>>>
>>
>> I meant something slightly different. I mean that the 'script' module
>> is really doing very
>> little work in this example. It is only processing command line
>> options. Retreiving the
>> variables will work with only standard Python.
>>
>   So take out the dependency.

I like it for this example. It allows a nice help system and will
always work since this
code is in PETSc. If you want to take the code out, then its your
responsibility to
take out 'script' as well.

  Matt

>   Barry
>
>>  Matt
>>
>>> Boyana
>>>
  Matt


>
> Boyana
>
> Matthew Knepley wrote:
>
>>
>> On Thu, Jan 22, 2009 at 5:15 PM, Boyana Norris 
>> wrote:
>>
>>
>>>
>>> Thank you both -- I'd prefer to use configVars.py, but it seems to
>>> depend
>>> on
>>> the script module, which is not standard in at least Python 2.5.
>>> Googling
>>> for "python script module" is a joke, as you can imagine. Is this a
>>> PETSc
>>> thing or a general module I can get somewhere?
>>>
>>>
>>
>> That module is in PETSc,
>>
>> $PETSC_DIR/config/BuildSystem
>>
>>  Matt
>>
>>
>>
>>>
>>> Thanks!
>>> Boyana
>>>
>>> Matthew Knepley wrote:
>>>
>>>

 Check out $PETSC_DIR/bin/configVars.py

 Matt

 On Thu, Jan 22, 2009 at 4:38 PM, Satish Balay 
 wrote:



>
> On Thu, 22 Jan 2009, Boyana Norris wrote:
>
>
>
>
>>
>> Is there a script that can be used to query the values of various
>> variables
>> defined in petscvariables makefile snippets (similar to lots of
>> linux
>> tools'
>> pkg-config scripts)?
>>
>>
>>
>
> [don't have canned code for this but] I've previously recommended
> doing the following in the packages configure.. [facets now has
> this
> in their configure to detect petsc]
>
>
> - petsc_arch and petsc_dir are inputs to configure
> - Create a dummy makefile on the fly
> - run this makefile to echo relavent stuff..
>
>
> For eg:
> asterix:/home/balay/download-pine>cat configpetsc.sh
> #!/bin/sh
>
> PETSC_ARCH=asterix64
> PETSC_DIR=/home/balay/spetsc
>
> cat < petscmake
> PETSC_ARCH = ${PETSC_ARCH}
> PETSC_DIR  = ${PETSC_DIR}
> include ${PETSC_DIR}/conf/base
> EOF
>
> PETSC_INC=`make -f petscmake getincludedirs`
> PETSC_LIB=`make -f petscmake getlinklibs`
>
> echo ' PETSC_INC ***'
> echo ${PETSC_INC}
> echo ' PETSC_LIB ***'
> echo ${PETSC_LIB}
>
>
> Satish
>
>
>
>


>>>
>>> --
>>> Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
>>> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
>>> http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986
>>>
>>>
>>>
>>
>>
>>
>
> --
> Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
> http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986
>
>




>>>
>>> --
>>> Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
>>> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
>>> http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986
>>>
>>
>>
>>
>> --
>> 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



script to query PETSc makefile variables?

2009-01-22 Thread Barry Smith

On Jan 22, 2009, at 6:17 PM, Matthew Knepley wrote:

>>
>
> I meant something slightly different. I mean that the 'script' module
> is really doing very
> little work in this example. It is only processing command line
> options. Retreiving the
> variables will work with only standard Python.
>
So take out the dependency.

Barry

>  Matt
>
>> Boyana
>>
>>>  Matt
>>>
>>>

 Boyana

 Matthew Knepley wrote:

>
> On Thu, Jan 22, 2009 at 5:15 PM, Boyana Norris  
> 
> wrote:
>
>
>>
>> Thank you both -- I'd prefer to use configVars.py, but it seems  
>> to
>> depend
>> on
>> the script module, which is not standard in at least Python 2.5.
>> Googling
>> for "python script module" is a joke, as you can imagine. Is  
>> this a
>> PETSc
>> thing or a general module I can get somewhere?
>>
>>
>
> That module is in PETSc,
>
> $PETSC_DIR/config/BuildSystem
>
>  Matt
>
>
>
>>
>> Thanks!
>> Boyana
>>
>> Matthew Knepley wrote:
>>
>>
>>>
>>> Check out $PETSC_DIR/bin/configVars.py
>>>
>>> Matt
>>>
>>> On Thu, Jan 22, 2009 at 4:38 PM, Satish Balay  
>>> 
>>> wrote:
>>>
>>>
>>>

 On Thu, 22 Jan 2009, Boyana Norris wrote:




>
> Is there a script that can be used to query the values of  
> various
> variables
> defined in petscvariables makefile snippets (similar to lots  
> of
> linux
> tools'
> pkg-config scripts)?
>
>
>

 [don't have canned code for this but] I've previously  
 recommended
 doing the following in the packages configure.. [facets now  
 has this
 in their configure to detect petsc]


 - petsc_arch and petsc_dir are inputs to configure
 - Create a dummy makefile on the fly
 - run this makefile to echo relavent stuff..


 For eg:
 asterix:/home/balay/download-pine>cat configpetsc.sh
 #!/bin/sh

 PETSC_ARCH=asterix64
 PETSC_DIR=/home/balay/spetsc

 cat < petscmake
 PETSC_ARCH = ${PETSC_ARCH}
 PETSC_DIR  = ${PETSC_DIR}
 include ${PETSC_DIR}/conf/base
 EOF

 PETSC_INC=`make -f petscmake getincludedirs`
 PETSC_LIB=`make -f petscmake getlinklibs`

 echo ' PETSC_INC ***'
 echo ${PETSC_INC}
 echo ' PETSC_LIB ***'
 echo ${PETSC_LIB}


 Satish




>>>
>>>
>>
>> --
>> Boyana Norris, Computer Scientist|   Email:  
>> norris at mcs.anl.gov
>> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
>> http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986
>>
>>
>>
>
>
>

 --
 Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
 Argonne National Laboratory  |   Phone: +1 (630) 252 7908
 http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986


>>>
>>>
>>>
>>>
>>
>> --
>> Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
>> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
>> http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986
>>
>
>
>
> -- 
> 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




script to query PETSc makefile variables?

2009-01-22 Thread Matthew Knepley
On Thu, Jan 22, 2009 at 6:06 PM, Boyana Norris  wrote:
>
>
> Matthew Knepley wrote:
>>
>> On Thu, Jan 22, 2009 at 5:31 PM, Boyana Norris  wrote:
>>
>>>
>>> Ah, ok, that explains it -- it's not in the installed version (the one
>>> after
>>> make install). Should it be? I really would like to avoid depending on
>>> the
>>> PETSc source directories.
>>>
>>
>> Technically,
>>
>>  1) BuildSystem is a separate project. It has its own repository
>>
>
> And a nice one it is. Can it be installed in its own prefix? Sorry, I never
> have, so I don't know the proper incantations -- I don't see a setup.py, but
> I haven't investigated further.

I didn't put it in the Python install system since I think that
package is crap. One of
the few crappy things in Python.

>>
>>  2) script is superfluous for getting the variables
>>
>
> Yes, we could all write in assembly, too. Not to be too whiny, but expecting
> everyone to do interesting things with sed in their makefiles as a matter of
> course is not very reasonable. Some users don't even know how to write a
> makefile. And very few know how to extract a few values from a file from
> within a makefile without relying on an external script. I do, but I'm
> thinking about others who'd have to do similar things in the future (e.g.,
> have a pile of code in which petsc is one of many external dependencies).

I meant something slightly different. I mean that the 'script' module
is really doing very
little work in this example. It is only processing command line
options. Retreiving the
variables will work with only standard Python.

  Matt

> Boyana
>
>>   Matt
>>
>>
>>>
>>> Boyana
>>>
>>> Matthew Knepley wrote:
>>>

 On Thu, Jan 22, 2009 at 5:15 PM, Boyana Norris 
 wrote:


>
> Thank you both -- I'd prefer to use configVars.py, but it seems to
> depend
> on
> the script module, which is not standard in at least Python 2.5.
> Googling
> for "python script module" is a joke, as you can imagine. Is this a
> PETSc
> thing or a general module I can get somewhere?
>
>

 That module is in PETSc,

  $PETSC_DIR/config/BuildSystem

   Matt



>
> Thanks!
> Boyana
>
> Matthew Knepley wrote:
>
>
>>
>> Check out $PETSC_DIR/bin/configVars.py
>>
>>  Matt
>>
>> On Thu, Jan 22, 2009 at 4:38 PM, Satish Balay 
>> wrote:
>>
>>
>>
>>>
>>> On Thu, 22 Jan 2009, Boyana Norris wrote:
>>>
>>>
>>>
>>>

 Is there a script that can be used to query the values of various
 variables
 defined in petscvariables makefile snippets (similar to lots of
 linux
 tools'
 pkg-config scripts)?



>>>
>>> [don't have canned code for this but] I've previously recommended
>>> doing the following in the packages configure.. [facets now has this
>>> in their configure to detect petsc]
>>>
>>>
>>> - petsc_arch and petsc_dir are inputs to configure
>>> - Create a dummy makefile on the fly
>>> - run this makefile to echo relavent stuff..
>>>
>>>
>>> For eg:
>>> asterix:/home/balay/download-pine>cat configpetsc.sh
>>> #!/bin/sh
>>>
>>> PETSC_ARCH=asterix64
>>> PETSC_DIR=/home/balay/spetsc
>>>
>>> cat < petscmake
>>> PETSC_ARCH = ${PETSC_ARCH}
>>> PETSC_DIR  = ${PETSC_DIR}
>>> include ${PETSC_DIR}/conf/base
>>> EOF
>>>
>>> PETSC_INC=`make -f petscmake getincludedirs`
>>> PETSC_LIB=`make -f petscmake getlinklibs`
>>>
>>> echo ' PETSC_INC ***'
>>> echo ${PETSC_INC}
>>> echo ' PETSC_LIB ***'
>>> echo ${PETSC_LIB}
>>>
>>>
>>> Satish
>>>
>>>
>>>
>>>
>>
>>
>
> --
> Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
> http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986
>
>
>



>>>
>>> --
>>> Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
>>> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
>>> http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986
>>>
>>>
>>
>>
>>
>>
>
> --
> Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
> http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986
>



-- 
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



script to query PETSc makefile variables?

2009-01-22 Thread Boyana Norris


Matthew Knepley wrote:
> On Thu, Jan 22, 2009 at 5:31 PM, Boyana Norris  wrote:
>   
>> Ah, ok, that explains it -- it's not in the installed version (the one after
>> make install). Should it be? I really would like to avoid depending on the
>> PETSc source directories.
>> 
>
> Technically,
>
>   1) BuildSystem is a separate project. It has its own repository
>   

And a nice one it is. Can it be installed in its own prefix? Sorry, I 
never have, so I don't know the proper incantations -- I don't see a 
setup.py, but I haven't investigated further.
>   2) script is superfluous for getting the variables
>   

Yes, we could all write in assembly, too. Not to be too whiny, but 
expecting everyone to do interesting things with sed in their makefiles 
as a matter of course is not very reasonable. Some users don't even know 
how to write a makefile. And very few know how to extract a few values 
from a file from within a makefile without relying on an external 
script. I do, but I'm thinking about others who'd have to do similar 
things in the future (e.g., have a pile of code in which petsc is one of 
many external dependencies).

Boyana

>Matt
>
>   
>> Boyana
>>
>> Matthew Knepley wrote:
>> 
>>> On Thu, Jan 22, 2009 at 5:15 PM, Boyana Norris  
>>> wrote:
>>>
>>>   
 Thank you both -- I'd prefer to use configVars.py, but it seems to depend
 on
 the script module, which is not standard in at least Python 2.5. Googling
 for "python script module" is a joke, as you can imagine. Is this a PETSc
 thing or a general module I can get somewhere?

 
>>> That module is in PETSc,
>>>
>>>  $PETSC_DIR/config/BuildSystem
>>>
>>>Matt
>>>
>>>
>>>   
 Thanks!
 Boyana

 Matthew Knepley wrote:

 
> Check out $PETSC_DIR/bin/configVars.py
>
>  Matt
>
> On Thu, Jan 22, 2009 at 4:38 PM, Satish Balay  
> wrote:
>
>
>   
>> On Thu, 22 Jan 2009, Boyana Norris wrote:
>>
>>
>>
>> 
>>> Is there a script that can be used to query the values of various
>>> variables
>>> defined in petscvariables makefile snippets (similar to lots of linux
>>> tools'
>>> pkg-config scripts)?
>>>
>>>
>>>   
>> [don't have canned code for this but] I've previously recommended
>> doing the following in the packages configure.. [facets now has this
>> in their configure to detect petsc]
>>
>>
>> - petsc_arch and petsc_dir are inputs to configure
>> - Create a dummy makefile on the fly
>> - run this makefile to echo relavent stuff..
>>
>>
>> For eg:
>> asterix:/home/balay/download-pine>cat configpetsc.sh
>> #!/bin/sh
>>
>> PETSC_ARCH=asterix64
>> PETSC_DIR=/home/balay/spetsc
>>
>> cat < petscmake
>> PETSC_ARCH = ${PETSC_ARCH}
>> PETSC_DIR  = ${PETSC_DIR}
>> include ${PETSC_DIR}/conf/base
>> EOF
>>
>> PETSC_INC=`make -f petscmake getincludedirs`
>> PETSC_LIB=`make -f petscmake getlinklibs`
>>
>> echo ' PETSC_INC ***'
>> echo ${PETSC_INC}
>> echo ' PETSC_LIB ***'
>> echo ${PETSC_LIB}
>>
>>
>> Satish
>>
>>
>>
>> 
>
>   
 --
 Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
 Argonne National Laboratory  |   Phone: +1 (630) 252 7908
 http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986


 
>>>
>>>
>>>   
>> --
>> Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
>> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
>> http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986
>>
>> 
>
>
>
>   

-- 
Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov 

Argonne National Laboratory  |   Phone: +1 (630) 252 7908 

http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986 




script to query PETSc makefile variables?

2009-01-22 Thread Matthew Knepley
On Thu, Jan 22, 2009 at 5:31 PM, Boyana Norris  wrote:
> Ah, ok, that explains it -- it's not in the installed version (the one after
> make install). Should it be? I really would like to avoid depending on the
> PETSc source directories.

Technically,

  1) BuildSystem is a separate project. It has its own repository

  2) script is superfluous for getting the variables

   Matt

> Boyana
>
> Matthew Knepley wrote:
>>
>> On Thu, Jan 22, 2009 at 5:15 PM, Boyana Norris  wrote:
>>
>>>
>>> Thank you both -- I'd prefer to use configVars.py, but it seems to depend
>>> on
>>> the script module, which is not standard in at least Python 2.5. Googling
>>> for "python script module" is a joke, as you can imagine. Is this a PETSc
>>> thing or a general module I can get somewhere?
>>>
>>
>> That module is in PETSc,
>>
>>  $PETSC_DIR/config/BuildSystem
>>
>>Matt
>>
>>
>>>
>>> Thanks!
>>> Boyana
>>>
>>> Matthew Knepley wrote:
>>>

 Check out $PETSC_DIR/bin/configVars.py

  Matt

 On Thu, Jan 22, 2009 at 4:38 PM, Satish Balay  wrote:


>
> On Thu, 22 Jan 2009, Boyana Norris wrote:
>
>
>
>>
>> Is there a script that can be used to query the values of various
>> variables
>> defined in petscvariables makefile snippets (similar to lots of linux
>> tools'
>> pkg-config scripts)?
>>
>>
>
> [don't have canned code for this but] I've previously recommended
> doing the following in the packages configure.. [facets now has this
> in their configure to detect petsc]
>
>
> - petsc_arch and petsc_dir are inputs to configure
> - Create a dummy makefile on the fly
> - run this makefile to echo relavent stuff..
>
>
> For eg:
> asterix:/home/balay/download-pine>cat configpetsc.sh
> #!/bin/sh
>
> PETSC_ARCH=asterix64
> PETSC_DIR=/home/balay/spetsc
>
> cat < petscmake
> PETSC_ARCH = ${PETSC_ARCH}
> PETSC_DIR  = ${PETSC_DIR}
> include ${PETSC_DIR}/conf/base
> EOF
>
> PETSC_INC=`make -f petscmake getincludedirs`
> PETSC_LIB=`make -f petscmake getlinklibs`
>
> echo ' PETSC_INC ***'
> echo ${PETSC_INC}
> echo ' PETSC_LIB ***'
> echo ${PETSC_LIB}
>
>
> Satish
>
>
>



>>>
>>> --
>>> Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
>>> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
>>> http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986
>>>
>>>
>>
>>
>>
>>
>
> --
> Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
> http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986
>



-- 
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



script to query PETSc makefile variables?

2009-01-22 Thread Barry Smith

On Jan 22, 2009, at 5:34 PM, Boyana Norris wrote:

>
>
> Barry Smith wrote:
>>
>>The danger is that the PETSc conf/variables makefile defines its  
>> own variables based on various variables that
>> are defined in PETSC_ARCH/conf/petscvariables hence the "raw"  
>> variable values from running config/configure.py may not
>> always be what you need.
>
> Actually that is exactly the reason I wanted the script. I don't  
> want *all* the variables, just a couple. If I just include the  
> petscvariables file in my makefile, all hell breaks lose since there  
> are lots of conflicts in variable names (the curse of everybody  
> being "good" and following the gnu model).

I understand this and yes we need to make it painless to get just  
a few variables. I am not advocating that you include all of the  
petscvariables.
  My concern is that the python script may not be able to give you the  
variables that you actually need (like complete link library  
listings), since they
are not figured out until after the python config/configure.py system  
is done.

Barry

>
>>
>>   Yes, this situation has to be fixed. There are too many levels of  
>> complexity and how can anyone keep track of things, what a mess.
>> Satish doesn't agree but I think the logic and defines in conf/ 
>> variables needs to be removed into the config/configure.py system
>>
>
> Having both would make everyone happy, if it can be done without  
> duplicating information.
>
> Boyana
>>
>>   Barry
>>
>>
>> On Jan 22, 2009, at 5:15 PM, Boyana Norris wrote:
>>
>>> Thank you both -- I'd prefer to use configVars.py, but it seems to  
>>> depend on the script module, which is not standard in at least  
>>> Python 2.5. Googling for "python script module" is a joke, as you  
>>> can imagine. Is this a PETSc thing or a general module I can get  
>>> somewhere?
>>>
>>> Thanks!
>>> Boyana
>>>
>>> Matthew Knepley wrote:
 Check out $PETSC_DIR/bin/configVars.py

 Matt

 On Thu, Jan 22, 2009 at 4:38 PM, Satish Balay   
 wrote:

> On Thu, 22 Jan 2009, Boyana Norris wrote:
>
>
>> Is there a script that can be used to query the values of  
>> various variables
>> defined in petscvariables makefile snippets (similar to lots of  
>> linux tools'
>> pkg-config scripts)?
>>
> [don't have canned code for this but] I've previously recommended
> doing the following in the packages configure.. [facets now has  
> this
> in their configure to detect petsc]
>
>
> - petsc_arch and petsc_dir are inputs to configure
> - Create a dummy makefile on the fly
> - run this makefile to echo relavent stuff..
>
>
> For eg:
> asterix:/home/balay/download-pine>cat configpetsc.sh
> #!/bin/sh
>
> PETSC_ARCH=asterix64
> PETSC_DIR=/home/balay/spetsc
>
> cat < petscmake
> PETSC_ARCH = ${PETSC_ARCH}
> PETSC_DIR  = ${PETSC_DIR}
> include ${PETSC_DIR}/conf/base
> EOF
>
> PETSC_INC=`make -f petscmake getincludedirs`
> PETSC_LIB=`make -f petscmake getlinklibs`
>
> echo ' PETSC_INC ***'
> echo ${PETSC_INC}
> echo ' PETSC_LIB ***'
> echo ${PETSC_LIB}
>
>
> Satish
>
>




>>>
>>> -- 
>>> Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
>>> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
>>> http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986
>>
>
> -- 
> Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
> http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986




script to query PETSc makefile variables?

2009-01-22 Thread Boyana Norris


Barry Smith wrote:
>
> The danger is that the PETSc conf/variables makefile defines its 
> own variables based on various variables that
> are defined in PETSC_ARCH/conf/petscvariables hence the "raw" variable 
> values from running config/configure.py may not
> always be what you need.

Actually that is exactly the reason I wanted the script. I don't want 
*all* the variables, just a couple. If I just include the petscvariables 
file in my makefile, all hell breaks lose since there are lots of 
conflicts in variable names (the curse of everybody being "good" and 
following the gnu model).
>
>Yes, this situation has to be fixed. There are too many levels of 
> complexity and how can anyone keep track of things, what a mess.
> Satish doesn't agree but I think the logic and defines in 
> conf/variables needs to be removed into the config/configure.py system
>

Having both would make everyone happy, if it can be done without 
duplicating information.

Boyana
>
>Barry
>
>
> On Jan 22, 2009, at 5:15 PM, Boyana Norris wrote:
>
>> Thank you both -- I'd prefer to use configVars.py, but it seems to 
>> depend on the script module, which is not standard in at least Python 
>> 2.5. Googling for "python script module" is a joke, as you can 
>> imagine. Is this a PETSc thing or a general module I can get somewhere?
>>
>> Thanks!
>> Boyana
>>
>> Matthew Knepley wrote:
>>> Check out $PETSC_DIR/bin/configVars.py
>>>
>>>  Matt
>>>
>>> On Thu, Jan 22, 2009 at 4:38 PM, Satish Balay  
>>> wrote:
>>>
 On Thu, 22 Jan 2009, Boyana Norris wrote:


> Is there a script that can be used to query the values of various 
> variables
> defined in petscvariables makefile snippets (similar to lots of 
> linux tools'
> pkg-config scripts)?
>
 [don't have canned code for this but] I've previously recommended
 doing the following in the packages configure.. [facets now has this
 in their configure to detect petsc]


 - petsc_arch and petsc_dir are inputs to configure
 - Create a dummy makefile on the fly
 - run this makefile to echo relavent stuff..


 For eg:
 asterix:/home/balay/download-pine>cat configpetsc.sh
 #!/bin/sh

 PETSC_ARCH=asterix64
 PETSC_DIR=/home/balay/spetsc

 cat < petscmake
 PETSC_ARCH = ${PETSC_ARCH}
 PETSC_DIR  = ${PETSC_DIR}
 include ${PETSC_DIR}/conf/base
 EOF

 PETSC_INC=`make -f petscmake getincludedirs`
 PETSC_LIB=`make -f petscmake getlinklibs`

 echo ' PETSC_INC ***'
 echo ${PETSC_INC}
 echo ' PETSC_LIB ***'
 echo ${PETSC_LIB}


 Satish


>>>
>>>
>>>
>>>
>>
>> -- 
>> Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
>> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
>> http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986
>

-- 
Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov 

Argonne National Laboratory  |   Phone: +1 (630) 252 7908 

http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986 




script to query PETSc makefile variables?

2009-01-22 Thread Boyana Norris
Ah, ok, that explains it -- it's not in the installed version (the one 
after make install). Should it be? I really would like to avoid 
depending on the PETSc source directories.

Boyana

Matthew Knepley wrote:
> On Thu, Jan 22, 2009 at 5:15 PM, Boyana Norris  wrote:
>   
>> Thank you both -- I'd prefer to use configVars.py, but it seems to depend on
>> the script module, which is not standard in at least Python 2.5. Googling
>> for "python script module" is a joke, as you can imagine. Is this a PETSc
>> thing or a general module I can get somewhere?
>> 
>
> That module is in PETSc,
>
>   $PETSC_DIR/config/BuildSystem
>
> Matt
>
>   
>> Thanks!
>> Boyana
>>
>> Matthew Knepley wrote:
>> 
>>> Check out $PETSC_DIR/bin/configVars.py
>>>
>>>  Matt
>>>
>>> On Thu, Jan 22, 2009 at 4:38 PM, Satish Balay  wrote:
>>>
>>>   
 On Thu, 22 Jan 2009, Boyana Norris wrote:


 
> Is there a script that can be used to query the values of various
> variables
> defined in petscvariables makefile snippets (similar to lots of linux
> tools'
> pkg-config scripts)?
>
>   
 [don't have canned code for this but] I've previously recommended
 doing the following in the packages configure.. [facets now has this
 in their configure to detect petsc]


 - petsc_arch and petsc_dir are inputs to configure
 - Create a dummy makefile on the fly
 - run this makefile to echo relavent stuff..


 For eg:
 asterix:/home/balay/download-pine>cat configpetsc.sh
 #!/bin/sh

 PETSC_ARCH=asterix64
 PETSC_DIR=/home/balay/spetsc

 cat < petscmake
 PETSC_ARCH = ${PETSC_ARCH}
 PETSC_DIR  = ${PETSC_DIR}
 include ${PETSC_DIR}/conf/base
 EOF

 PETSC_INC=`make -f petscmake getincludedirs`
 PETSC_LIB=`make -f petscmake getlinklibs`

 echo ' PETSC_INC ***'
 echo ${PETSC_INC}
 echo ' PETSC_LIB ***'
 echo ${PETSC_LIB}


 Satish


 
>>>
>>>
>>>   
>> --
>> Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
>> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
>> http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986
>>
>> 
>
>
>
>   

-- 
Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov 

Argonne National Laboratory  |   Phone: +1 (630) 252 7908 

http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986 




script to query PETSc makefile variables?

2009-01-22 Thread Barry Smith

 The danger is that the PETSc conf/variables makefile defines its  
own variables based on various variables that
are defined in PETSC_ARCH/conf/petscvariables hence the "raw" variable  
values from running config/configure.py may not
always be what you need.

Yes, this situation has to be fixed. There are too many levels of  
complexity and how can anyone keep track of things, what a mess.
Satish doesn't agree but I think the logic and defines in conf/ 
variables needs to be removed into the config/configure.py system


Barry


On Jan 22, 2009, at 5:15 PM, Boyana Norris wrote:

> Thank you both -- I'd prefer to use configVars.py, but it seems to  
> depend on the script module, which is not standard in at least  
> Python 2.5. Googling for "python script module" is a joke, as you  
> can imagine. Is this a PETSc thing or a general module I can get  
> somewhere?
>
> Thanks!
> Boyana
>
> Matthew Knepley wrote:
>> Check out $PETSC_DIR/bin/configVars.py
>>
>>  Matt
>>
>> On Thu, Jan 22, 2009 at 4:38 PM, Satish Balay   
>> wrote:
>>
>>> On Thu, 22 Jan 2009, Boyana Norris wrote:
>>>
>>>
 Is there a script that can be used to query the values of various  
 variables
 defined in petscvariables makefile snippets (similar to lots of  
 linux tools'
 pkg-config scripts)?

>>> [don't have canned code for this but] I've previously recommended
>>> doing the following in the packages configure.. [facets now has this
>>> in their configure to detect petsc]
>>>
>>>
>>> - petsc_arch and petsc_dir are inputs to configure
>>> - Create a dummy makefile on the fly
>>> - run this makefile to echo relavent stuff..
>>>
>>>
>>> For eg:
>>> asterix:/home/balay/download-pine>cat configpetsc.sh
>>> #!/bin/sh
>>>
>>> PETSC_ARCH=asterix64
>>> PETSC_DIR=/home/balay/spetsc
>>>
>>> cat < petscmake
>>> PETSC_ARCH = ${PETSC_ARCH}
>>> PETSC_DIR  = ${PETSC_DIR}
>>> include ${PETSC_DIR}/conf/base
>>> EOF
>>>
>>> PETSC_INC=`make -f petscmake getincludedirs`
>>> PETSC_LIB=`make -f petscmake getlinklibs`
>>>
>>> echo ' PETSC_INC ***'
>>> echo ${PETSC_INC}
>>> echo ' PETSC_LIB ***'
>>> echo ${PETSC_LIB}
>>>
>>>
>>> Satish
>>>
>>>
>>
>>
>>
>>
>
> -- 
> Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
> http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986




script to query PETSc makefile variables?

2009-01-22 Thread Matthew Knepley
On Thu, Jan 22, 2009 at 5:15 PM, Boyana Norris  wrote:
> Thank you both -- I'd prefer to use configVars.py, but it seems to depend on
> the script module, which is not standard in at least Python 2.5. Googling
> for "python script module" is a joke, as you can imagine. Is this a PETSc
> thing or a general module I can get somewhere?

That module is in PETSc,

  $PETSC_DIR/config/BuildSystem

Matt

> Thanks!
> Boyana
>
> Matthew Knepley wrote:
>>
>> Check out $PETSC_DIR/bin/configVars.py
>>
>>  Matt
>>
>> On Thu, Jan 22, 2009 at 4:38 PM, Satish Balay  wrote:
>>
>>>
>>> On Thu, 22 Jan 2009, Boyana Norris wrote:
>>>
>>>

 Is there a script that can be used to query the values of various
 variables
 defined in petscvariables makefile snippets (similar to lots of linux
 tools'
 pkg-config scripts)?

>>>
>>> [don't have canned code for this but] I've previously recommended
>>> doing the following in the packages configure.. [facets now has this
>>> in their configure to detect petsc]
>>>
>>>
>>> - petsc_arch and petsc_dir are inputs to configure
>>> - Create a dummy makefile on the fly
>>> - run this makefile to echo relavent stuff..
>>>
>>>
>>> For eg:
>>> asterix:/home/balay/download-pine>cat configpetsc.sh
>>> #!/bin/sh
>>>
>>> PETSC_ARCH=asterix64
>>> PETSC_DIR=/home/balay/spetsc
>>>
>>> cat < petscmake
>>> PETSC_ARCH = ${PETSC_ARCH}
>>> PETSC_DIR  = ${PETSC_DIR}
>>> include ${PETSC_DIR}/conf/base
>>> EOF
>>>
>>> PETSC_INC=`make -f petscmake getincludedirs`
>>> PETSC_LIB=`make -f petscmake getlinklibs`
>>>
>>> echo ' PETSC_INC ***'
>>> echo ${PETSC_INC}
>>> echo ' PETSC_LIB ***'
>>> echo ${PETSC_LIB}
>>>
>>>
>>> Satish
>>>
>>>
>>
>>
>>
>>
>
> --
> Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov
> Argonne National Laboratory  |   Phone: +1 (630) 252 7908
> http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986
>



-- 
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



script to query PETSc makefile variables?

2009-01-22 Thread Boyana Norris
Thank you both -- I'd prefer to use configVars.py, but it seems to 
depend on the script module, which is not standard in at least Python 
2.5. Googling for "python script module" is a joke, as you can imagine. 
Is this a PETSc thing or a general module I can get somewhere?

Thanks!
Boyana

Matthew Knepley wrote:
> Check out $PETSC_DIR/bin/configVars.py
>
>   Matt
>
> On Thu, Jan 22, 2009 at 4:38 PM, Satish Balay  wrote:
>   
>> On Thu, 22 Jan 2009, Boyana Norris wrote:
>>
>> 
>>> Is there a script that can be used to query the values of various variables
>>> defined in petscvariables makefile snippets (similar to lots of linux tools'
>>> pkg-config scripts)?
>>>   
>> [don't have canned code for this but] I've previously recommended
>> doing the following in the packages configure.. [facets now has this
>> in their configure to detect petsc]
>>
>>
>> - petsc_arch and petsc_dir are inputs to configure
>> - Create a dummy makefile on the fly
>> - run this makefile to echo relavent stuff..
>>
>>
>> For eg:
>> asterix:/home/balay/download-pine>cat configpetsc.sh
>> #!/bin/sh
>>
>> PETSC_ARCH=asterix64
>> PETSC_DIR=/home/balay/spetsc
>>
>> cat < petscmake
>> PETSC_ARCH = ${PETSC_ARCH}
>> PETSC_DIR  = ${PETSC_DIR}
>> include ${PETSC_DIR}/conf/base
>> EOF
>>
>> PETSC_INC=`make -f petscmake getincludedirs`
>> PETSC_LIB=`make -f petscmake getlinklibs`
>>
>> echo ' PETSC_INC ***'
>> echo ${PETSC_INC}
>> echo ' PETSC_LIB ***'
>> echo ${PETSC_LIB}
>>
>>
>> Satish
>>
>> 
>
>
>
>   

-- 
Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov 

Argonne National Laboratory  |   Phone: +1 (630) 252 7908 

http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986 




script to query PETSc makefile variables?

2009-01-22 Thread Matthew Knepley
Check out $PETSC_DIR/bin/configVars.py

  Matt

On Thu, Jan 22, 2009 at 4:38 PM, Satish Balay  wrote:
> On Thu, 22 Jan 2009, Boyana Norris wrote:
>
>> Is there a script that can be used to query the values of various variables
>> defined in petscvariables makefile snippets (similar to lots of linux tools'
>> pkg-config scripts)?
>
>
> [don't have canned code for this but] I've previously recommended
> doing the following in the packages configure.. [facets now has this
> in their configure to detect petsc]
>
>
> - petsc_arch and petsc_dir are inputs to configure
> - Create a dummy makefile on the fly
> - run this makefile to echo relavent stuff..
>
>
> For eg:
> asterix:/home/balay/download-pine>cat configpetsc.sh
> #!/bin/sh
>
> PETSC_ARCH=asterix64
> PETSC_DIR=/home/balay/spetsc
>
> cat < petscmake
> PETSC_ARCH = ${PETSC_ARCH}
> PETSC_DIR  = ${PETSC_DIR}
> include ${PETSC_DIR}/conf/base
> EOF
>
> PETSC_INC=`make -f petscmake getincludedirs`
> PETSC_LIB=`make -f petscmake getlinklibs`
>
> echo ' PETSC_INC ***'
> echo ${PETSC_INC}
> echo ' PETSC_LIB ***'
> echo ${PETSC_LIB}
>
>
> Satish
>



-- 
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



script to query PETSc makefile variables?

2009-01-22 Thread Satish Balay
On Thu, 22 Jan 2009, Boyana Norris wrote:

> Is there a script that can be used to query the values of various variables
> defined in petscvariables makefile snippets (similar to lots of linux tools'
> pkg-config scripts)?


[don't have canned code for this but] I've previously recommended
doing the following in the packages configure.. [facets now has this
in their configure to detect petsc]


- petsc_arch and petsc_dir are inputs to configure
- Create a dummy makefile on the fly
- run this makefile to echo relavent stuff..


For eg:
asterix:/home/balay/download-pine>cat configpetsc.sh
#!/bin/sh

PETSC_ARCH=asterix64
PETSC_DIR=/home/balay/spetsc

cat < petscmake
PETSC_ARCH = ${PETSC_ARCH}
PETSC_DIR  = ${PETSC_DIR}
include ${PETSC_DIR}/conf/base
EOF

PETSC_INC=`make -f petscmake getincludedirs`
PETSC_LIB=`make -f petscmake getlinklibs`

echo ' PETSC_INC ***'
echo ${PETSC_INC}
echo ' PETSC_LIB ***'
echo ${PETSC_LIB}


Satish



script to query PETSc makefile variables?

2009-01-22 Thread Boyana Norris
Is there a script that can be used to query the values of various 
variables defined in petscvariables makefile snippets (similar to lots 
of linux tools' pkg-config scripts)?

Thanks,
Boyana

-- 
Boyana Norris, Computer Scientist|   Email: norris at mcs.anl.gov 

Argonne National Laboratory  |   Phone: +1 (630) 252 7908 

http://www.mcs.anl.gov/~norris/  |   Fax:   +1 (630) 252 5986