Actual source code: ex17.c
2: static char help[] = "Demonstrates PetscGetVersonNumber().\n\n";
4: #include <petscsys.h>
5: int main(int argc, char **argv)
6: {
7: char version[128];
8: PetscInt major, minor, subminor;
10: /*
11: Every PETSc routine should begin with the PetscInitialize() routine.
12: argc, argv - These command line arguments are taken to extract the options
13: supplied to PETSc and options supplied to MPI.
14: help - When PETSc executable is invoked with the option -help,
15: it prints the various options that can be applied at
16: runtime. The user can use the "help" variable place
17: additional help messages in this printout.
18: */
20: PetscInitialize(&argc, &argv, (char *)0, help);
21: PetscGetVersion(version, sizeof(version));
23: PetscGetVersionNumber(&major, &minor, &subminor, NULL);
28: PetscFinalize();
29: return 0;
30: }
32: /*TEST
34: test:
36: TEST*/