Actual source code: ex52.c


  2: static char help[] = "Solves a linear system in parallel with KSP. Modified from ex2.c \n\
  3:                       Illustrate how to use external packages MUMPS, SUPERLU and STRUMPACK \n\
  4: Input parameters include:\n\
  5:   -random_exact_sol : use a random exact solution vector\n\
  6:   -view_exact_sol   : write exact solution vector to stdout\n\
  7:   -m <mesh_x>       : number of mesh points in x-direction\n\
  8:   -n <mesh_y>       : number of mesh points in y-direction\n\n";

 10: #include <petscksp.h>

 12: #if defined(PETSC_HAVE_MUMPS)
 13: /* Subroutine contributed by Varun Hiremath */
 14: PetscErrorCode printMumpsMemoryInfo(Mat F)
 15: {
 16:   PetscInt maxMem, sumMem;

 18:   PetscFunctionBeginUser;
 19:   PetscCall(MatMumpsGetInfog(F, 16, &maxMem));
 20:   PetscCall(MatMumpsGetInfog(F, 17, &sumMem));
 21:   PetscCall(PetscPrintf(PETSC_COMM_WORLD, "\n MUMPS INFOG(16) :: Max memory in MB = %" PetscInt_FMT, maxMem));
 22:   PetscCall(PetscPrintf(PETSC_COMM_WORLD, "\n MUMPS INFOG(17) :: Sum memory in MB = %" PetscInt_FMT "\n", sumMem));
 23:   PetscFunctionReturn(PETSC_SUCCESS);
 24: }
 25: #endif

 27: int main(int argc, char **args)
 28: {
 29:   Vec         x, b, u; /* approx solution, RHS, exact solution */
 30:   Mat         A, F;
 31:   KSP         ksp; /* linear solver context */
 32:   PC          pc;
 33:   PetscRandom rctx; /* random number generator context */
 34:   PetscReal   norm; /* norm of solution error */
 35:   PetscInt    i, j, Ii, J, Istart, Iend, m = 8, n = 7, its;
 36:   PetscBool   flg = PETSC_FALSE, flg_ilu = PETSC_FALSE, flg_ch = PETSC_FALSE;
 37: #if defined(PETSC_HAVE_MUMPS)
 38:   PetscBool flg_mumps = PETSC_FALSE, flg_mumps_ch = PETSC_FALSE;
 39: #endif
 40: #if defined(PETSC_HAVE_SUPERLU) || defined(PETSC_HAVE_SUPERLU_DIST)
 41:   PetscBool flg_superlu = PETSC_FALSE;
 42: #endif
 43: #if defined(PETSC_HAVE_STRUMPACK)
 44:   PetscBool flg_strumpack = PETSC_FALSE;
 45: #endif
 46:   PetscScalar v;
 47:   PetscMPIInt rank, size;
 48: #if defined(PETSC_USE_LOG)
 49:   PetscLogStage stage;
 50: #endif

 52:   PetscFunctionBeginUser;
 53:   PetscCall(PetscInitialize(&argc, &args, (char *)0, help));
 54:   PetscCallMPI(MPI_Comm_rank(PETSC_COMM_WORLD, &rank));
 55:   PetscCallMPI(MPI_Comm_size(PETSC_COMM_WORLD, &size));
 56:   PetscCall(PetscOptionsGetInt(NULL, NULL, "-m", &m, NULL));
 57:   PetscCall(PetscOptionsGetInt(NULL, NULL, "-n", &n, NULL));
 58:   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 59:          Compute the matrix and right-hand-side vector that define
 60:          the linear system, Ax = b.
 61:      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 62:   PetscCall(MatCreate(PETSC_COMM_WORLD, &A));
 63:   PetscCall(MatSetSizes(A, PETSC_DECIDE, PETSC_DECIDE, m * n, m * n));
 64:   PetscCall(MatSetFromOptions(A));
 65:   PetscCall(MatMPIAIJSetPreallocation(A, 5, NULL, 5, NULL));
 66:   PetscCall(MatSeqAIJSetPreallocation(A, 5, NULL));
 67:   PetscCall(MatSetUp(A));

 69:   /*
 70:      Currently, all PETSc parallel matrix formats are partitioned by
 71:      contiguous chunks of rows across the processors.  Determine which
 72:      rows of the matrix are locally owned.
 73:   */
 74:   PetscCall(MatGetOwnershipRange(A, &Istart, &Iend));

 76:   /*
 77:      Set matrix elements for the 2-D, five-point stencil in parallel.
 78:       - Each processor needs to insert only elements that it owns
 79:         locally (but any non-local elements will be sent to the
 80:         appropriate processor during matrix assembly).
 81:       - Always specify global rows and columns of matrix entries.

 83:      Note: this uses the less common natural ordering that orders first
 84:      all the unknowns for x = h then for x = 2h etc; Hence you see J = Ii +- n
 85:      instead of J = I +- m as you might expect. The more standard ordering
 86:      would first do all variables for y = h, then y = 2h etc.

 88:    */
 89:   PetscCall(PetscLogStageRegister("Assembly", &stage));
 90:   PetscCall(PetscLogStagePush(stage));
 91:   for (Ii = Istart; Ii < Iend; Ii++) {
 92:     v = -1.0;
 93:     i = Ii / n;
 94:     j = Ii - i * n;
 95:     if (i > 0) {
 96:       J = Ii - n;
 97:       PetscCall(MatSetValues(A, 1, &Ii, 1, &J, &v, INSERT_VALUES));
 98:     }
 99:     if (i < m - 1) {
100:       J = Ii + n;
101:       PetscCall(MatSetValues(A, 1, &Ii, 1, &J, &v, INSERT_VALUES));
102:     }
103:     if (j > 0) {
104:       J = Ii - 1;
105:       PetscCall(MatSetValues(A, 1, &Ii, 1, &J, &v, INSERT_VALUES));
106:     }
107:     if (j < n - 1) {
108:       J = Ii + 1;
109:       PetscCall(MatSetValues(A, 1, &Ii, 1, &J, &v, INSERT_VALUES));
110:     }
111:     v = 4.0;
112:     PetscCall(MatSetValues(A, 1, &Ii, 1, &Ii, &v, INSERT_VALUES));
113:   }

115:   /*
116:      Assemble matrix, using the 2-step process:
117:        MatAssemblyBegin(), MatAssemblyEnd()
118:      Computations can be done while messages are in transition
119:      by placing code between these two statements.
120:   */
121:   PetscCall(MatAssemblyBegin(A, MAT_FINAL_ASSEMBLY));
122:   PetscCall(MatAssemblyEnd(A, MAT_FINAL_ASSEMBLY));
123:   PetscCall(PetscLogStagePop());

125:   /* A is symmetric. Set symmetric flag to enable ICC/Cholesky preconditioner */
126:   PetscCall(MatSetOption(A, MAT_SYMMETRIC, PETSC_TRUE));

128:   /* Create parallel vectors */
129:   PetscCall(MatCreateVecs(A, &u, &b));
130:   PetscCall(VecDuplicate(u, &x));

132:   /*
133:      Set exact solution; then compute right-hand-side vector.
134:      By default we use an exact solution of a vector with all
135:      elements of 1.0;  Alternatively, using the runtime option
136:      -random_sol forms a solution vector with random components.
137:   */
138:   PetscCall(PetscOptionsGetBool(NULL, NULL, "-random_exact_sol", &flg, NULL));
139:   if (flg) {
140:     PetscCall(PetscRandomCreate(PETSC_COMM_WORLD, &rctx));
141:     PetscCall(PetscRandomSetFromOptions(rctx));
142:     PetscCall(VecSetRandom(u, rctx));
143:     PetscCall(PetscRandomDestroy(&rctx));
144:   } else {
145:     PetscCall(VecSet(u, 1.0));
146:   }
147:   PetscCall(MatMult(A, u, b));

149:   /*
150:      View the exact solution vector if desired
151:   */
152:   flg = PETSC_FALSE;
153:   PetscCall(PetscOptionsGetBool(NULL, NULL, "-view_exact_sol", &flg, NULL));
154:   if (flg) PetscCall(VecView(u, PETSC_VIEWER_STDOUT_WORLD));

156:   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
157:                 Create the linear solver and set various options
158:      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

160:   /*
161:      Create linear solver context
162:   */
163:   PetscCall(KSPCreate(PETSC_COMM_WORLD, &ksp));
164:   PetscCall(KSPSetOperators(ksp, A, A));

166:   /*
167:     Example of how to use external package MUMPS
168:     Note: runtime options
169:           '-ksp_type preonly -pc_type lu -pc_factor_mat_solver_type mumps -mat_mumps_icntl_7 3 -mat_mumps_icntl_1 0.0'
170:           are equivalent to these procedural calls
171:   */
172: #if defined(PETSC_HAVE_MUMPS)
173:   flg_mumps    = PETSC_FALSE;
174:   flg_mumps_ch = PETSC_FALSE;
175:   PetscCall(PetscOptionsGetBool(NULL, NULL, "-use_mumps_lu", &flg_mumps, NULL));
176:   PetscCall(PetscOptionsGetBool(NULL, NULL, "-use_mumps_ch", &flg_mumps_ch, NULL));
177:   if (flg_mumps || flg_mumps_ch) {
178:     PetscCall(KSPSetType(ksp, KSPPREONLY));
179:     PetscInt  ival, icntl;
180:     PetscReal val;
181:     PetscCall(KSPGetPC(ksp, &pc));
182:     if (flg_mumps) {
183:       PetscCall(PCSetType(pc, PCLU));
184:     } else if (flg_mumps_ch) {
185:       PetscCall(MatSetOption(A, MAT_SPD, PETSC_TRUE)); /* set MUMPS id%SYM=1 */
186:       PetscCall(PCSetType(pc, PCCHOLESKY));
187:     }
188:     PetscCall(PCFactorSetMatSolverType(pc, MATSOLVERMUMPS));
189:     PetscCall(PCFactorSetUpMatSolverType(pc)); /* call MatGetFactor() to create F */
190:     PetscCall(PCFactorGetMatrix(pc, &F));

192:     if (flg_mumps) {
193:       /* Zero the first and last rows in the rank, they should then show up in corresponding null pivot rows output via
194:          MatMumpsGetNullPivots */
195:       flg = PETSC_FALSE;
196:       PetscCall(PetscOptionsGetBool(NULL, NULL, "-zero_first_and_last_rows", &flg, NULL));
197:       if (flg) {
198:         PetscInt rows[2];
199:         rows[0] = Istart;   /* first row of the rank */
200:         rows[1] = Iend - 1; /* last row of the rank */
201:         PetscCall(MatZeroRows(A, 2, rows, 0.0, NULL, NULL));
202:       }
203:       /* Get memory estimates from MUMPS' MatLUFactorSymbolic(), e.g. INFOG(16), INFOG(17).
204:          KSPSetUp() below will do nothing inside MatLUFactorSymbolic() */
205:       MatFactorInfo info;
206:       PetscCall(MatLUFactorSymbolic(F, A, NULL, NULL, &info));
207:       flg = PETSC_FALSE;
208:       PetscCall(PetscOptionsGetBool(NULL, NULL, "-print_mumps_memory", &flg, NULL));
209:       if (flg) PetscCall(printMumpsMemoryInfo(F));
210:     }

212:     /* sequential ordering */
213:     icntl = 7;
214:     ival  = 2;
215:     PetscCall(MatMumpsSetIcntl(F, icntl, ival));

217:     /* threshold for row pivot detection */
218:     PetscCall(MatMumpsSetIcntl(F, 24, 1));
219:     icntl = 3;
220:     val   = 1.e-6;
221:     PetscCall(MatMumpsSetCntl(F, icntl, val));

223:     /* compute determinant of A */
224:     PetscCall(MatMumpsSetIcntl(F, 33, 1));
225:   }
226: #endif

228:   /*
229:     Example of how to use external package SuperLU
230:     Note: runtime options
231:           '-ksp_type preonly -pc_type ilu -pc_factor_mat_solver_type superlu -mat_superlu_ilu_droptol 1.e-8'
232:           are equivalent to these procedual calls
233:   */
234: #if defined(PETSC_HAVE_SUPERLU) || defined(PETSC_HAVE_SUPERLU_DIST)
235:   flg_ilu     = PETSC_FALSE;
236:   flg_superlu = PETSC_FALSE;
237:   PetscCall(PetscOptionsGetBool(NULL, NULL, "-use_superlu_lu", &flg_superlu, NULL));
238:   PetscCall(PetscOptionsGetBool(NULL, NULL, "-use_superlu_ilu", &flg_ilu, NULL));
239:   if (flg_superlu || flg_ilu) {
240:     PetscCall(KSPSetType(ksp, KSPPREONLY));
241:     PetscCall(KSPGetPC(ksp, &pc));
242:     if (flg_superlu) PetscCall(PCSetType(pc, PCLU));
243:     else if (flg_ilu) PetscCall(PCSetType(pc, PCILU));
244:     if (size == 1) {
245:   #if !defined(PETSC_HAVE_SUPERLU)
246:       SETERRQ(PETSC_COMM_WORLD, PETSC_ERR_SUP, "This test requires SUPERLU");
247:   #else
248:       PetscCall(PCFactorSetMatSolverType(pc, MATSOLVERSUPERLU));
249:   #endif
250:     } else {
251:   #if !defined(PETSC_HAVE_SUPERLU_DIST)
252:       SETERRQ(PETSC_COMM_WORLD, PETSC_ERR_SUP, "This test requires SUPERLU_DIST");
253:   #else
254:       PetscCall(PCFactorSetMatSolverType(pc, MATSOLVERSUPERLU_DIST));
255:   #endif
256:     }
257:     PetscCall(PCFactorSetUpMatSolverType(pc)); /* call MatGetFactor() to create F */
258:     PetscCall(PCFactorGetMatrix(pc, &F));
259:   #if defined(PETSC_HAVE_SUPERLU)
260:     if (size == 1) PetscCall(MatSuperluSetILUDropTol(F, 1.e-8));
261:   #endif
262:   }
263: #endif

265:   /*
266:     Example of how to use external package STRUMPACK
267:     Note: runtime options
268:           '-pc_type lu/ilu \
269:            -pc_factor_mat_solver_type strumpack \
270:            -mat_strumpack_reordering METIS \
271:            -mat_strumpack_colperm 0 \
272:            -mat_strumpack_hss_rel_tol 1.e-3 \
273:            -mat_strumpack_hss_min_sep_size 50 \
274:            -mat_strumpack_max_rank 100 \
275:            -mat_strumpack_leaf_size 4'
276:        are equivalent to these procedural calls

278:     We refer to the STRUMPACK-sparse manual, section 5, for more info on
279:     how to tune the preconditioner.
280:   */
281: #if defined(PETSC_HAVE_STRUMPACK)
282:   flg_ilu       = PETSC_FALSE;
283:   flg_strumpack = PETSC_FALSE;
284:   PetscCall(PetscOptionsGetBool(NULL, NULL, "-use_strumpack_lu", &flg_strumpack, NULL));
285:   PetscCall(PetscOptionsGetBool(NULL, NULL, "-use_strumpack_ilu", &flg_ilu, NULL));
286:   if (flg_strumpack || flg_ilu) {
287:     PetscCall(KSPSetType(ksp, KSPPREONLY));
288:     PetscCall(KSPGetPC(ksp, &pc));
289:     if (flg_strumpack) PetscCall(PCSetType(pc, PCLU));
290:     else if (flg_ilu) PetscCall(PCSetType(pc, PCILU));
291:   #if !defined(PETSC_HAVE_STRUMPACK)
292:     SETERRQ(PETSC_COMM_WORLD, PETSC_ERR_SUP, "This test requires STRUMPACK");
293:   #endif
294:     PetscCall(PCFactorSetMatSolverType(pc, MATSOLVERSTRUMPACK));
295:     PetscCall(PCFactorSetUpMatSolverType(pc)); /* call MatGetFactor() to create F */
296:     PetscCall(PCFactorGetMatrix(pc, &F));
297:   #if defined(PETSC_HAVE_STRUMPACK)
298:     /* Set the fill-reducing reordering.                              */
299:     PetscCall(MatSTRUMPACKSetReordering(F, MAT_STRUMPACK_METIS));
300:     /* Since this is a simple discretization, the diagonal is always  */
301:     /* nonzero, and there is no need for the extra MC64 permutation.  */
302:     PetscCall(MatSTRUMPACKSetColPerm(F, PETSC_FALSE));
303:     /* The compression tolerance used when doing low-rank compression */
304:     /* in the preconditioner. This is problem specific!               */
305:     PetscCall(MatSTRUMPACKSetHSSRelTol(F, 1.e-3));
306:     /* Set minimum matrix size for HSS compression to 15 in order to  */
307:     /* demonstrate preconditioner on small problems. For performance  */
308:     /* a value of say 500 is better.                                  */
309:     PetscCall(MatSTRUMPACKSetHSSMinSepSize(F, 15));
310:     /* You can further limit the fill in the preconditioner by        */
311:     /* setting a maximum rank                                         */
312:     PetscCall(MatSTRUMPACKSetHSSMaxRank(F, 100));
313:     /* Set the size of the diagonal blocks (the leafs) in the HSS     */
314:     /* approximation. The default value should be better for real     */
315:     /* problems. This is mostly for illustration on a small problem.  */
316:     PetscCall(MatSTRUMPACKSetHSSLeafSize(F, 4));
317:   #endif
318:   }
319: #endif

321:   /*
322:     Example of how to use procedural calls that are equivalent to
323:           '-ksp_type preonly -pc_type lu/ilu -pc_factor_mat_solver_type petsc'
324:   */
325:   flg     = PETSC_FALSE;
326:   flg_ilu = PETSC_FALSE;
327:   flg_ch  = PETSC_FALSE;
328:   PetscCall(PetscOptionsGetBool(NULL, NULL, "-use_petsc_lu", &flg, NULL));
329:   PetscCall(PetscOptionsGetBool(NULL, NULL, "-use_petsc_ilu", &flg_ilu, NULL));
330:   PetscCall(PetscOptionsGetBool(NULL, NULL, "-use_petsc_ch", &flg_ch, NULL));
331:   if (flg || flg_ilu || flg_ch) {
332:     Vec diag;

334:     PetscCall(KSPSetType(ksp, KSPPREONLY));
335:     PetscCall(KSPGetPC(ksp, &pc));
336:     if (flg) PetscCall(PCSetType(pc, PCLU));
337:     else if (flg_ilu) PetscCall(PCSetType(pc, PCILU));
338:     else if (flg_ch) PetscCall(PCSetType(pc, PCCHOLESKY));
339:     PetscCall(PCFactorSetMatSolverType(pc, MATSOLVERPETSC));
340:     PetscCall(PCFactorSetUpMatSolverType(pc)); /* call MatGetFactor() to create F */
341:     PetscCall(PCFactorGetMatrix(pc, &F));

343:     /* Test MatGetDiagonal() */
344:     PetscCall(KSPSetUp(ksp));
345:     PetscCall(VecDuplicate(x, &diag));
346:     PetscCall(MatGetDiagonal(F, diag));
347:     /* PetscCall(VecView(diag,PETSC_VIEWER_STDOUT_WORLD)); */
348:     PetscCall(VecDestroy(&diag));
349:   }

351:   PetscCall(KSPSetFromOptions(ksp));

353:   /* Get info from matrix factors */
354:   PetscCall(KSPSetUp(ksp));

356: #if defined(PETSC_HAVE_MUMPS)
357:   if (flg_mumps || flg_mumps_ch) {
358:     PetscInt  icntl, infog34, num_null_pivots, *null_pivots;
359:     PetscReal cntl, rinfo12, rinfo13;
360:     icntl = 3;
361:     PetscCall(MatMumpsGetCntl(F, icntl, &cntl));

363:     /* compute determinant and check for any null pivots*/
364:     if (rank == 0) {
365:       PetscCall(MatMumpsGetInfog(F, 34, &infog34));
366:       PetscCall(MatMumpsGetRinfog(F, 12, &rinfo12));
367:       PetscCall(MatMumpsGetRinfog(F, 13, &rinfo13));
368:       PetscCall(MatMumpsGetNullPivots(F, &num_null_pivots, &null_pivots));
369:       PetscCall(PetscPrintf(PETSC_COMM_SELF, "  Mumps row pivot threshold = %g\n", cntl));
370:       PetscCall(PetscPrintf(PETSC_COMM_SELF, "  Mumps determinant = (%g, %g) * 2^%" PetscInt_FMT " \n", (double)rinfo12, (double)rinfo13, infog34));
371:       if (num_null_pivots > 0) {
372:         PetscCall(PetscPrintf(PETSC_COMM_SELF, "  Mumps num of null pivots detected = %" PetscInt_FMT "\n", num_null_pivots));
373:         for (j = 0; j < num_null_pivots; j++) PetscCall(PetscPrintf(PETSC_COMM_SELF, "  Mumps row with null pivots is = %" PetscInt_FMT "\n", null_pivots[j]));
374:       }
375:       PetscCall(PetscFree(null_pivots));
376:     }
377:   }
378: #endif

380:   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
381:                       Solve the linear system
382:      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
383:   PetscCall(KSPSolve(ksp, b, x));

385:   /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
386:                       Check solution and clean up
387:      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
388:   PetscCall(VecAXPY(x, -1.0, u));
389:   PetscCall(VecNorm(x, NORM_2, &norm));
390:   PetscCall(KSPGetIterationNumber(ksp, &its));

392:   /*
393:      Print convergence information.  PetscPrintf() produces a single
394:      print statement from all processes that share a communicator.
395:      An alternative is PetscFPrintf(), which prints to a file.
396:   */
397:   if (norm < 1.e-12) {
398:     PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Norm of error < 1.e-12 iterations %" PetscInt_FMT "\n", its));
399:   } else {
400:     PetscCall(PetscPrintf(PETSC_COMM_WORLD, "Norm of error %g iterations %" PetscInt_FMT "\n", (double)norm, its));
401:   }

403:   /*
404:      Free work space.  All PETSc objects should be destroyed when they
405:      are no longer needed.
406:   */
407:   PetscCall(KSPDestroy(&ksp));
408:   PetscCall(VecDestroy(&u));
409:   PetscCall(VecDestroy(&x));
410:   PetscCall(VecDestroy(&b));
411:   PetscCall(MatDestroy(&A));

413:   /*
414:      Always call PetscFinalize() before exiting a program.  This routine
415:        - finalizes the PETSc libraries as well as MPI
416:        - provides summary and diagnostic information if certain runtime
417:          options are chosen (e.g., -log_view).
418:   */
419:   PetscCall(PetscFinalize());
420:   return 0;
421: }

423: /*TEST

425:    test:
426:       args: -use_petsc_lu
427:       output_file: output/ex52_2.out

429:    test:
430:       suffix: mumps
431:       nsize: 3
432:       requires: mumps
433:       args: -use_mumps_lu
434:       output_file: output/ex52_1.out

436:    test:
437:       suffix: mumps_2
438:       nsize: 3
439:       requires: mumps
440:       args: -use_mumps_ch
441:       output_file: output/ex52_1.out

443:    test:
444:       suffix: mumps_3
445:       nsize: 3
446:       requires: mumps
447:       args: -use_mumps_ch -mat_type sbaij
448:       output_file: output/ex52_1.out

450:    test:
451:       suffix: mumps_4
452:       nsize: 3
453:       requires: mumps !complex !single
454:       args: -use_mumps_lu -m 50 -n 50 -print_mumps_memory
455:       output_file: output/ex52_4.out

457:    test:
458:       suffix: mumps_5
459:       nsize: 3
460:       requires: mumps !complex !single
461:       args: -use_mumps_lu -m 50 -n 50 -zero_first_and_last_rows
462:       output_file: output/ex52_5.out

464:    test:
465:       suffix: mumps_omp_2
466:       nsize: 4
467:       requires: mumps hwloc openmp pthread defined(PETSC_HAVE_MPI_PROCESS_SHARED_MEMORY)
468:       args: -use_mumps_lu -mat_mumps_use_omp_threads 2
469:       output_file: output/ex52_1.out

471:    test:
472:       suffix: mumps_omp_3
473:       nsize: 4
474:       requires: mumps hwloc openmp pthread defined(PETSC_HAVE_MPI_PROCESS_SHARED_MEMORY)
475:       args: -use_mumps_ch -mat_mumps_use_omp_threads 3
476:       # Ignore the warning since we are intentionally testing the imbalanced case
477:       filter: grep -v "Warning: number of OpenMP threads"
478:       output_file: output/ex52_1.out

480:    test:
481:       suffix: mumps_omp_4
482:       nsize: 4
483:       requires: mumps hwloc openmp pthread defined(PETSC_HAVE_MPI_PROCESS_SHARED_MEMORY)
484:       # let petsc guess a proper number for threads
485:       args: -use_mumps_ch -mat_type sbaij -mat_mumps_use_omp_threads
486:       output_file: output/ex52_1.out

488:    testset:
489:       suffix: strumpack_2
490:       nsize: {{1 2}}
491:       requires: strumpack
492:       args: -use_strumpack_lu
493:       output_file: output/ex52_3.out

495:       test:
496:         suffix: aij
497:         args: -mat_type aij

499:       test:
500:         requires: kokkos_kernels
501:         suffix: kok
502:         args: -mat_type aijkokkos

504:       test:
505:         requires: cuda
506:         suffix: cuda
507:         args: -mat_type aijcusparse

509:       test:
510:         requires: hip
511:         suffix: hip
512:         args: -mat_type aijhipsparse

514:    test:
515:       suffix: strumpack_ilu
516:       nsize: {{1 2}}
517:       requires: strumpack
518:       args: -use_strumpack_ilu
519:       output_file: output/ex52_3.out

521:    testset:
522:       suffix: superlu_dist
523:       nsize: {{1 2}}
524:       requires: superlu superlu_dist
525:       args: -use_superlu_lu
526:       output_file: output/ex52_2.out

528:       test:
529:         suffix: aij
530:         args: -mat_type aij

532:       test:
533:         requires: kokkos_kernels
534:         suffix: kok
535:         args: -mat_type aijkokkos

537:       test:
538:         requires: cuda
539:         suffix: cuda
540:         args: -mat_type aijcusparse

542:       test:
543:         requires: hip
544:         suffix: hip
545:         args: -mat_type aijhipsparse

547:    test:
548:       suffix: superlu_ilu
549:       requires: superlu superlu_dist
550:       args: -use_superlu_ilu
551:       output_file: output/ex52_2.out

553: TEST*/