new build system

Lisandro Dalcin dalcinl at gmail.com
Wed Jun 13 13:37:15 CDT 2007


The new PETSc build system make changes to current directory
structures (regarding 2.3.x series).

0 - The Main Goal (in my view)
==================

The main goal of such a change should be to make life easier for
packagers and users of those prebuilt packages, and facilitate PETSc
availability in many Linux distributions. I this is not the main goal,
I see no point in changing things.

In order to achieve the main goal, we have to respect standard
filesystem structures. Additionally, IMHO we should not make a mess in
those standard locations with many headers and libraries.

1 - Default PETSc package
================

Let's now assume that a 'default' PETSc package for some Linux distro
does not use external packages other than BLAS/LAPACK and MPI.
Regarding the previous paragraphs,  perhaps the better options is to
have:

prefix/bin
prefix/include/petsc   -> all PETSc headers
prefix/lib/petsc        -> all PETSc libs (*.a and *.so)
prefix/share/petsc/config     -> all configuration (old bmake stuff)
prefix/share/petsc/<other>  -> other stuff (like docs)

Note there is no need (I am right?) for a 'bin' directory in this
setup (I mean, with no external packages), but we can add in the near
future a 'petsc-config' script for querying installation path, version
and patch, etc.

This structure is standard and it does not mess 'include', 'lib', and
'share' with PETSc stuff.

2 - Optional PETSc package
================

Now, suppose some packager whants to make many variants (here variant
is different $PETSC_ARCH) of PETSc available for 'power' users. Each
variant include a different set of configuration options and extenal
packages. In such an scenario, perhaps a good location to put petsc is
in 'opt' using a deep structure:

/opt/petsc/<version>/<variant>/bin
/opt/petsc/<version>/<variant>/include/petsc
/opt/petsc/<version>/<variant>/lib/petsc
/opt/petsc/<version>/<variant>/share/petsc/conf

I think the duplication of headers and conf data is irrelevant here.


3 - Continuing the discussion
==================

FIRST, I invite all you to firt discuss all this and define a good and
standard structure for an 'installed' petsc. Perhaps we should invite
packagers (like Stephan) to joing this discussion.

NEXT, build system sould be updated to be able to manage 'installed'
versions and 'build' versions... This would possibly make the 'build'
directory structure ugly, but IMHO this should not be excuse.



-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594




More information about the petsc-dev mailing list