PetscHasExternalPackage#

Determine whether PETSc has been configured with the given package

Synopsis#

#include "petscsys.h"   
PetscErrorCode PetscHasExternalPackage(const char pkg[], PetscBool *has)

Not Collective

Input Parameter#

  • pkg - external package name

Output Parameter#

Notes#

This is basically an alternative for PETSC_HAVE_XXX whenever a preprocessor macro is not available/desirable, e.g. in Python.

The external package name pkg is e.g. “hdf5”, “yaml”, “parmetis”. It should correspond to the name listed in ./configure --help or e.g. in PetscViewerType, MatPartitioningType, MatSolverType.

The lookup is case insensitive, i.e. looking for “HDF5” or “hdf5” is the same.

See Also#

PetscViewerType, MatPartitioningType, MatSolverType

Level#

intermediate

Location#

src/sys/objects/package.c

Examples#

src/tao/constrained/tutorials/ex1.c


Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages