[petsc-dev] new configuration/compile system for PETSc

Harald Pfeiffer pfeiffer at cita.utoronto.ca
Sat Jul 9 19:18:23 CDT 2011


We happen to use Petsc with our own makefiles.  PETSc is compiled 
entirely separately (or we use system-provided PETSc-modules).   We then 
manually set the appropriate include- and library-paths in our 
makefiles, for example:

PETSC_INCLUDE = -I$(PETSC_DIR)/include -I$(PETSC_DIR)/$(PETSC_ARCH)/include
PETSC_LIB = -L$(PETSC_DIR)/$(PETSC_ARCH)/lib -lpetsc -lX11
...
other stuff here
...
ARCH_INCLUDE = $(PETSC_INCLUDE)  ...
ARCH_LIB_PARALLEL   = $(HDF_LIB) $(FFTW_LIB) $(PETSC_LIB)  ....


Not elegant, but has been working like a charm for the last 12 years.


Harald






On 7/10/11 1:02 AM, Dmitry Karpeev wrote:
> On Sat, Jul 9, 2011 at 6:42 PM, Jed Brown<jedbrown at mcs.anl.gov>  wrote:
>> On Sat, Jul 9, 2011 at 18:30, Dmitry Karpeev<karpeev at mcs.anl.gov>  wrote:
>>>   If a user could write a
>>> simple foo.py that configured/built their
>>> favorite package with PETSc as a dependency, they could then proceed
>>> to modify the FOO code and jack
>>> PETSc into it.
>> But this just a different form of asking them to adopt our build system,
>> except that makefiles are a de-facto standard and our system won't be
>> familiar to anyone. Any system has to be easily usable from other systems
>> (at least makefiles, automake, and cmake).
> Yes, but there is also a practical problem: an engineer or a scientist, not
> intimately familiar with automake, cmake, etc., has taken the effort
> to understand
> PETSc so that our linear solvers can be substituted for FOO's.  How can we
> make it easier for these people to insert PETSc into their code?  Here
> I only mean
> the build process.  Maybe making them write foo.py is not the right approach,
> but we should have a usable approach (and, maybe, an example of doing it).
>
> In particular, is it sufficient to export linklibs, or do we also need
> to export the
> compiler (e.g., to ensure consistent Fortrant name mangling)?  There are
> a good number of Fortran users that want to use PETSc too.
>
> Dmitry.

-- 
Harald Pfeiffer
Assistant Professor
Cdn. Institute for Theoretical Astrophysics
University of Toronto
pfeiffer at cita.utoronto.ca
Tel. ++1 416-978-8497




More information about the petsc-dev mailing list