#include #include #include static char help[] = "Test HDF5\n\n"; int main(int argc, char* argv[]) { // Error code for debugging PetscErrorCode ierr; // Initialize PETSc / MPI and pass input arguments to PETSc PetscInitialize(&argc, &argv, PETSC_NULL, help); Vec xPassive; VecCreate(PETSC_COMM_WORLD, &xPassive); PetscObjectSetName((PetscObject) xPassive, "xPassive"); VecSetSizes(xPassive, PETSC_DECIDE, 4614720); VecSetFromOptions(xPassive); PetscViewer viewin; PetscViewerHDF5Open(PETSC_COMM_WORLD, "xPassive.h5", FILE_MODE_READ, &viewin); PetscViewerDestroy(&viewin); VecDestroy(&xPassive); PetscFinalize(); return 0; }