[petsc-users] Petsc makefile and PETSC_COMPILE variable

Jed Brown jed at jedbrown.org
Wed Dec 16 11:14:26 CST 2020


Alex Koshkarov <okoshkarov at tae.com> writes:

> Thanks Barry,
>
> It makes much more sense! And thanks for clarifying what “P” indicates. I like this explicit approach over implicit because I am bad with makefile syntax. However, share/petsc/Makefile.user looks much cleaner, but I need to learn how pkg-config works to understand it.

Open a petsc.pc to see what is specified there. We define a number of extra variables that can help with checking for common compilers/wrappers and how to use RPATH if needed.

prefix=/home/jed/petsc/ompi-optg
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${prefix}/lib
ccompiler=mpicc
cflags_extra=-fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -O2 -march=native -ffp-contract=fast -g
cflags_dep=-MMD -MP
ldflag_rpath=-Wl,-rpath,
cxxcompiler=mpicxx
cxxflags_extra=-Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -g -O  -fPIC
fcompiler=mpif90
fflags_extra=-fPIC -Wall -ffree-line-length-0 -Wno-unused-dummy-argument -g -O

Name: PETSc
Description: Library to solve ODEs and algebraic equations
Version: 3.13.99
Cflags:   -I${includedir} -I/home/jed/petsc/include
Libs: -L${libdir} -lpetsc
Libs.private: -L/home/jed/petsc/ompi-optg/lib -L/usr/lib/openmpi -L/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0 -lHYPRE -lumfpack -lklu -lcholmod -lbtf -lccolamd -lcolamd -lcamd -lamd -lsuitesparseconfig -lsuperlu -lsuperlu_dist -lml -llapack -lblis -ltriangle -lX11 -lexodus -lnetcdf -lpnetcdf -lcgns -lmedC -lmed -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5 -lparmetis -lmetis -lm -lz -lstdc++ -ldl -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lm -lgfortran -lm -lgcc_s -lquadmath -lpthread -lquadmath -lstdc++ -ldl


More information about the petsc-users mailing list