Request related to SLEPc

Satish Balay balay at
Fri Dec 12 11:11:27 CST 2008

On Fri, 12 Dec 2008, Lisandro Dalcin wrote:

> I would like to add that, despite the new buildsystem if by far better
> than the old one, PETSc has lost a nice feature of being able of being
> installed in a central location for multiple $PETSC_ARCH's . This
> feature is something I need, as I have to maintain the PETSc
> intallation in our cluster, and I really need to have at least debug
> and optimized builds because our applications can also be built in the
> two modes.
> Up to now, I'm using this rule: I pass to configure
> --prefix=/usr/local/petsc/3.0.0/$PETSC_ARCH. But then, after
> installation, the actual $PETSC_DIR should be passed something like
> this: /usr/local/petsc/3.0.0/linux-gnu.

Yes -  in the prefix install model, PETSC_ARCH=prefix

> In petsc4py I've tried to be
> smart: it can build against the build directory, against an standard
> install (I mean, when you pass --prefix=/path/to/petsc) or my special
> rule (--prefix=/path/to/petsc/$PETSC_ARCH).

Is this the same build-dir/arch configured with --prefix? I think this
is just intermediate data [before 'make install'] - and anything that
works here is a fluke.. I don't think we should support this mode.

> Moreover, petsc4py can be
> built against MANY different $PETSC_ARCH's, this way, before running
> an script, you just setenv PETSC_ARCH=some-arch, and the Python import
> machinery will internally load the appropriate extension module. This
> is really, really nice, as I can run a small problem with debug libs,
> and next run to a larger problem with optimized libs, with just
> exporting an environmental variable.

The generic model with usage from make is: Both PETSC_DIR & PETSC_ARCH
are inputs. In the case of a prefixinstall - the makefiles just ignore
whatever PETSC_ARCH value is specified. Perhaps your scripts can
emulate the same behavior?

i.e instead of thinking PETSC_ARCH as the switch between different
builds, PETSC_DIR+PETSC_ARCH is the unique-key/switch.

> When using the PETSc makefiles for other C/C++ apps, my special
> install rule will not work the same than when building against the
> PETSc build directory. Of course, I believe it should be easy to make
> it work, but I'm thinking that many other users will run in the same
> need.

Hmm - the makefiles should be portable between prefix & non-prefix
builds. If this is with the intermediate build-dir for a prefix build,
I don't think we should support with mode..


More information about the petsc-dev mailing list