Why did you removed PETSC_ARCH_NAME variable in makefiles?
Lisandro Dalcin
dalcinl at gmail.com
Wed Nov 25 13:03:22 CST 2009
On Wed, Nov 25, 2009 at 3:19 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> Lisandro,
>
> That change will certainly NOT be reverted. PETSC_ARCH_NAME! what the
> heck kind of variable name is that?
>
I agree the name could be messy or misleading. But so is PETSC_ARCH,
which should actually be something like PETSC_CONF, right?
>
> I need to understand the reason for PETSC_ARCH_NAME, then we can come up
> with some solution.
OK. Let see.
> What is the difference between
> PETSC_ARCH_NAME and PETSC_ARCH?
>
None
> Is it only needed when --prefix is used (so
> PETSC_ARCH does not exist),
Yes.
> if so, exactly why is it needed, the whole idea
> behind --prefix is to eliminate PETSC_ARCH,
In the particular case of petsc4py, the Python extension module get's
installed as "lib/$PETSC_ARCH/PETSc.so". Then, for --prefix installs
of PETSc, I use the PETSC_ARCH_NAME (obtained from parsing makefiles,
as for many other configuration stuff).
>
> so why is it needed? How is
> PETSC_ARCH_NAME used?
>
I can certainly change my way of doing things in petsc4py. Perhaps I
should install as "lib/PETSc.so" for --prefix PETSc builds?
I said this before, but let's go one more time: I find --prefix
installs of PETSc a bit useless for general-purpose installations.
Supose as sysadmin "make install" PETSc in a cluster. She likely built
using a C as language, double precision real scalars, 32bit integers,
(dbg/opt?). Such configuration does not fit all applications. Some
users may require C++, other may want complex, others may want to run
her own codes with a debug version. Then I see VERY little point on
--prefix builds of PETSc. Moreover, in our machines at CIMEC I
maintain central installations of PETSc at /usr/local/petsc/3.0.0.
This is not done at all with --prefix and "make install", instead,
"/usr/local/petsc/3.0.0" is a HG clone of release-3.0.0.
For all these reasons, petsc4py stills support clearly separated
lib/$PETSC_ARCH/PETSc.so ext modules. For example, switching from
debug to optimized is just a matter of "export
PETSC_ARCH=opt-arch-name" and "python script.py". Perhaps now it is
the time to change a bit this, but I certainly need some
advice/discussion/comments from your side.
--
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