Skip to content

Support arch installations of PETSc

Are we currently supporting arch-* installations of PETSc?

PETSc can be either installed in a prefix location (when specifying --prefix=$PREFIX_DIR at configure time, and in this case PETSC_DIR=$PREFIX_DIR, PETSC_ARCH=empty) or it can be installed in PETSC_DIR/PETSC_ARCH (when --prefix is not specified at configure time).

In the first case, PETSc includes can be found in $PREFIX_DIR/include and libraries in $PREFIX_DIR/lib. In the second case, the proper CPPFLAG for compiling PETSc code has to be -I$PETSC_DIR/include -I$PETSC_DIR/$PETSC_ARCH/include; libraries are in $PETSC_DIR/$PETSC_ARCH/lib.

The most robust way to get this is to use the pkgconfig file that PETSc installs in 'PETSC_DIR/lib/pkgconfig/PETSc.pc' (Prefix installations) or 'PETSC_DIR/$PETSC_ARCH/lib/pkgconfig/PETSc.pc' (arch-* installations).

arch-* installations can be detected whether the variable PETSC_ARCH is set or not.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information