1 static char help[] = "Benchmark dense matrix LU factorization (BLAS/LAPACK)\n\n"; 2 3 #include <petscbm.h> 4 #include <petscmat.h> 5 6 int main(int argc, char **argv) 7 { 8 PetscBench bm; 9 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)); 22 23 PetscCall(PetscBenchDestroy(&bm)); 24 PetscCall(PetscFinalize()); 25 return 0; 26 } 27 28 /*TEST 29 30 test: 31 requires: hpl 32 33 TEST*/ 34