20 #include "pism/util/petscwrappers/PetscInitializer.hh"
26 #include "pism/util/error_handling.hh"
33 PetscErrorCode ierr = 0;
34 PetscBool initialized = PETSC_FALSE;
36 ierr = PetscInitialized(&initialized);
39 if (initialized == PETSC_FALSE) {
40 ierr = PetscInitialize(&argc, &argv, NULL,
help);
44 printf(
"PETSc initialization failed. Aborting...\n");
45 MPI_Abort(MPI_COMM_WORLD, -1);
51 PetscErrorCode ierr = 0;
52 PetscBool initialized = PETSC_FALSE;
53 ierr = PetscInitialized(&initialized); CHKERRCONTINUE(ierr);
55 if (initialized == PETSC_TRUE) {
57 ierr = PetscFinalize(); CHKERRCONTINUE(ierr);
Initializer(int argc, char **argv, const char *help)
#define PISM_CHK(errcode, name)
std::string printf(const char *format,...)