1: static char help[] = "Benchmark dense matrix LU factorization (BLAS/LAPACK)\n\n";
3: #include <petscbm.h>
4: #include <petscmat.h>
6: int main(int argc, char **argv)
7: {
8: PetscBench bm;
10: PetscFunctionBeginUser;
11: PetscCall(PetscInitialize(&argc, &argv, NULL, help));
12: PetscCall(MatInitializePackage());
13: PetscCall(PetscBenchCreate(PETSC_COMM_SELF, &bm));
14: PetscCall(PetscBenchSetType(bm, PETSCBMHPL));
15: PetscCall(PetscBenchSetFromOptions(bm));
16: PetscCall(PetscBenchSetUp(bm));
17: PetscCall(PetscBenchRun(bm));
18: PetscCall(PetscBenchView(bm, PETSC_VIEWER_STDOUT_SELF));
19: PetscCall(PetscBenchSetSize(bm, 5000));
20: PetscCall(PetscBenchRun(bm));
21: PetscCall(PetscBenchView(bm, PETSC_VIEWER_STDOUT_SELF));
23: PetscCall(PetscBenchDestroy(&bm));
24: PetscCall(PetscFinalize());
25: return 0;
26: }
28: /*TEST
30: test:
31: requires: hpl
33: TEST*/