[petsc-users] Compile and link correctly using conf/petscvariables and conf/variables

Filippo Spiga filippo.spiga at disco.unimib.it
Thu Aug 5 14:47:20 CDT 2010


  Dear Matthew,

Matthew Knepley wrote:
> include ${PETSC_DIR}/conf/variables
> include ${PETSC_DIR}/conf/rules
>
> foo: foo.o
>      ${CLINKER} -o foo foo.o ${PETSC_TS_LIB}

I already have a Makefile. But most important I have a autoconf script 
that generates my configure that generates my Makefile. So I have two 
possibilities:
- modify every single Make template to use "conf/variables" and 
"conf/rules" as you suggested (long, boring and useless strategy because 
all my current Makefiles work. I only want to generalize the configure 
as much as possible replacing one single line);
- or starting from "conf/petscvariables" I can try to compose by myself 
the only information I need to generalize my scripts.

I only need the name of the library. That's all. Or, if it was compiled 
splitting it in different indipendent libraries, I need the right order 
to link {PETSC_CONTRIB_BASIC, PETSC_SNES_LIB_BASIC, PETSC_KSP_LIB_BASIC, 
PETSC_MAT_LIB_BASIC, PETSC_LIB_BASIC, PETSC_VEC_LIB_BASIC, 
PETSC_DM_LIB_BASIC, PETSC_TS_LIB_BASIC, PETSC_SYS_LIB_BASIC}. I don't 
understand why "conf/petscvariables" doesn't provide that information. I 
guess it's easy to store it in one single explicit line. I'm looking for 
a easy way to ensure portability, I don't want to increase the 
complexity of the makefile/configure.

If starting from the last stable release PETSc is compiled by default in 
one single library (and it is), I can ignore all these stuffs until that 
kind of "portability" problem will arise. I will probably do that at 
this point...

Thank you very much for your explanations,
Regards

-- 

Filippo SPIGA

«Nobody will drive us out of Cantor's paradise.»
      -- David Hilbert



More information about the petsc-users mailing list