[petsc-users] Makefile problems: environmental variables, includes paths and libraries.

Balay, Satish balay at mcs.anl.gov
Tue Oct 15 11:42:17 CDT 2019


On Tue, 15 Oct 2019, Matthew Agius via petsc-users wrote:

> Dear PETSC users,
> 
> This is my first attempt at PETSC package.
> 
> First step, I think I have installed PETSC, well at least no errors.
> Now I am trying to run a simple makefile as suggested in the manual
> I am confused about undeclared variables in the example makefiles that I am
> coming across; variables such as:
> 
> > ${CLINKER}   ${PETSC_LIB}   ${PETSC_SYS_LIB}   ${PETSC_VEC_LI B}
> > ${PETSC_MAT_LIB}   ${PETSC_DM_LIB}   ${PETSC_KSP_LIB}   ${PETSC_SNES_LIB}
> > or ${PETSC_TS_LIB}.
> 
> Are these environmental variables?

nope - they are declared in other makefiles - and picked up with:

include ${PETSC_DIR}/lib/petsc/conf/variables
include ${PETSC_DIR}/lib/petsc/conf/rules


> So far I only have PETSC_DIR declared in my environment.
> Do I have to declare each one? What are they?
> 
> The error I am actually getting is
> 
> > error #6404: This name does not have a type, and must have an explicit
> > type.   [PETSC_NULL_CHARACTER]
> 
> This is probably due to a missing Include library file in the compilation.
> Any hint which one it is?

Presumably this is not a petsc example with petsc makefile.

Please compare the output of compiling your code/makefile - with a petsc example/makefile and check for differences.

i.e
cd src/ksp/ksp/examples/tutorials
make ex2

Satish



More information about the petsc-users mailing list