[petsc-dev] control configure summary output

Satish Balay balay at mcs.anl.gov
Fri Feb 26 22:18:53 CST 2010


On Thu, 28 Jan 2010, Matthew Knepley wrote:

> On Thu, Jan 28, 2010 at 5:43 PM, Satish Balay <balay at mcs.anl.gov> wrote:
> 
> > Matt,
> >
> > currently configure dumps the following to the screen
> >
> > -------------------------------------------------
> > Compilers:
> >  C Compiler:         /home/balay/soft/linux64/mpich2-1.1/bin/mpicc  -fPIC
> > -Wall -Wwrite-strings -Wno-strict-aliasing -g3
> >  Fortran Compiler:   /home/balay/soft/linux64/mpich2-1.1/bin/mpif90  -fPIC
> > -Wall -Wno-unused-variable -g
> > Linkers:
> >  Shared linker:   /home/balay/soft/linux64/mpich2-1.1/bin/mpicc  -shared
> >  -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -g3
> >  Dynamic linker:   /home/balay/soft/linux64/mpich2-1.1/bin/mpicc  -shared
> >  -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -g3
> > PETSc:
> >  **
> >  ** Before running "make" your PETSC_ARCH must be specified with:
> >  **  ** setenv PETSC_ARCH asterix-foo (csh/tcsh)
> >  **  ** PETSC_ARCH=asterix-foo; export PETSC_ARCH (sh/bash)
> >  **
> >  **
> >  ** Before running "make" your PETSC_DIR must be specified with:
> >  **  ** setenv PETSC_DIR /home/balay/tmp/petsc-dev (csh/tcsh)
> >  **  ** PETSC_DIR=/home/balay/tmp/petsc-dev; export PETSC_DIR (sh/bash)
> >  **
> >  **
> >  ** Now build the libraries with "make all"
> >  **
> >  Clanguage: C
> >  Scalar type: real
> > MPI:
> >  Includes: -I/home/balay/soft/linux64/mpich2-1.1/include
> > X11:
> >  Includes:
> >  Library:  -lX11
> >  PETSc shared libraries: enabled
> >  PETSc dynamic libraries: disabled
> >  Memory alignment:16
> > BLAS/LAPACK: -llapack -lblas
> > -------------------------------------------------
> >
> > Its a bit wildy - and some of the recommendations get missed out. I'd like
> > to to read something like:
> >
> > -------------------------------------------------
> > Compilers:
> >  C Compiler:         /home/balay/soft/linux64/mpich2-1.1/bin/mpicc  -fPIC
> > -Wall -Wwrite-strings -Wno-strict-aliasing -g3
> >  Fortran Compiler:   /home/balay/soft/linux64/mpich2-1.1/bin/mpif90  -fPIC
> > -Wall -Wno-unused-variable -g
> > Linkers:
> >  Shared linker:   /home/balay/soft/linux64/mpich2-1.1/bin/mpicc  -shared
> >  -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -g3
> >  Dynamic linker:   /home/balay/soft/linux64/mpich2-1.1/bin/mpicc  -shared
> >  -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -g3
> > PETSc:
> >  PETSC_DIR: /home/balay/tmp/petsc-dev
> >  PETSC_ARCH: asterix-foo
> >  Clanguage: C
> >  Scalar type: real
> >  PETSc shared libraries: enabled
> >  PETSc dynamic libraries: disabled
> >  Memory alignment:16
> > MPI:
> >  Includes: -I/home/balay/soft/linux64/mpich2-1.1/include
> > X11:
> >  Includes:
> >  Library:  -lX11
> > BLAS/LAPACK: -llapack -lblas
> >  ** *************************************************************
> >  ** Before running "make" your PETSC_ARCH must be specified with:
> >  **  ** setenv PETSC_ARCH asterix-foo (csh/tcsh)
> >  **  ** PETSC_ARCH=asterix-foo; export PETSC_ARCH (sh/bash)
> >  **
> >  **
> >  ** Before running "make" your PETSC_DIR must be specified with:
> >  **  ** setenv PETSC_DIR /home/balay/tmp/petsc-dev (csh/tcsh)
> >  **  ** PETSC_DIR=/home/balay/tmp/petsc-dev; export PETSC_DIR (sh/bash)
> >  **
> >  **
> >  ** Now build the libraries with "make all"
> >  ** *************************************************************
> > -------------------------------------------------
> >
> > Or simplify the last section to:
> >
> >  ** *************************************************************
> >  ** Now build the libraries with "make PETSC_ARCH=asterix-foo
> > PETSC_DIR=/home/balay/tmp/petsc-dev all"
> >  ** *************************************************************
> >
> > Is there a way to control the order in which this stuff is dumped to
> > the screen [from the various .py files - so that it goes into the same
> > 'PETSc:' section?]
> >
> 
> This output happens in config.Framework.cleanup() and all it does is call
> str() on
> each guy. If you really want finer control over this output, meaning
> concatenation into
> higher level groups (above the module level), then you should
> 
>   a) change to another function like banner() which returns with a group
> name
> 
>   b) change this loop to first group up output and then logWrite() it
> 
> However, its not clear to me that we need this. Rather, we might get away
> with just
> having PETSc.Configure() give this overall advice at the end.
> 
> What do you think?


PETSc.Configure() stuff would be called before
config.Framework.cleanup() - so not useful. [unless everything -
including externalpackages gets printed from there]

So I just created 3 groups __str__() [the origianl stuff], __str1__()
[petsc subsection] and __str2__() [final summary - i.e the next
command to use] - that gets printed in that order.

This is good enough for me. I've also moved this printing stuff into a
different function.  [out of cleanup()], so this summary is printed
after even prometheus gets built.

Now I get the following summary.

Satish

-------------

asterix:/home/balay/tmp/petsc-dev>./config/examples/asterix64.py --download-prometheus=1 --download-parmetis=1 PETSC_ARCH=asterix-prometheus
=================================================================================
             Configuring PETSc to compile on your system                         
=================================================================================
=================================================================================                                                                                                 Warning: PETSC_ARCH from environment does not match command-line.                                                                                                           Warning: Using from command-line: asterix-prometheus, ignoring environment: asterix64                                                                                 =================================================================================                                                                                           =================================================================================                                                                                                 Compiling & installing Parmetis; this may take several minutes                                                              
                                           =================================================================================                                                                                           =================================================================================                                                                                                 Compiling Prometheus; this may take several minutes                                                                                                                   =================================================================================                                                                                                                                                                                                                                                                       Compilers:
  C Compiler:         /home/balay/soft/linux64/mpich2-1.1/bin/mpicc  -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -g3 
  C++ Compiler:       /home/balay/soft/linux64/mpich2-1.1/bin/mpicxx  -Wall -Wwrite-strings -Wno-strict-aliasing -g   -fPIC 
  Fortran Compiler:   /home/balay/soft/linux64/mpich2-1.1/bin/mpif90  -fPIC -Wall -Wno-unused-variable -g  
Linkers:
  Shared linker:   /home/balay/soft/linux64/mpich2-1.1/bin/mpicc  -shared  -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -g3 
  Dynamic linker:   /home/balay/soft/linux64/mpich2-1.1/bin/mpicc  -shared  -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -g3 
MPI:
  Includes: -I/home/balay/soft/linux64/mpich2-1.1/include
X11:
  Includes: 
  Library:  -lX11
BLAS/LAPACK: -llapack -lblas
ParMetis:
  Includes: -I/home/balay/tmp/petsc-dev/asterix-prometheus/include -I/home/balay/soft/linux64/mpich2-1.1/include
  Library:  -Wl,-rpath,/home/balay/tmp/petsc-dev/asterix-prometheus/lib -L/home/balay/tmp/petsc-dev/asterix-prometheus/lib -lparmetis -lmetis
Prometheus:
  Library:  -Wl,-rpath,/home/balay/tmp/petsc-dev/asterix-prometheus/lib -L/home/balay/tmp/petsc-dev/asterix-prometheus/lib -lpromfei -lprometheus -Wl,-rpath,/home/balay/soft/linux64/mpich2-1.1/lib -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/4.4.3 -lmpichcxx -lstdc++
PETSc:
  PETSC_ARCH: asterix-prometheus
  PETSC_DIR: /home/balay/tmp/petsc-dev
  Clanguage: C
  Scalar type: real
  Precision: double
  shared libraries: enabled
  dynamic libraries: disabled
  Memory alignment: 16
xxx==========================================================================xxx
   Configure stage complete. Now build PETSc libraries with:
   make PETSC_DIR=/home/balay/tmp/petsc-dev PETSC_ARCH=asterix-prometheus all
xxx==========================================================================xxx
asterix:/home/balay/tmp/petsc-dev>


More information about the petsc-dev mailing list