Skip to content

Commit cf4f048

Browse files
[code:petsc-gmres] Update source comments for stokes2 matrix
Replace stale audikw_1 / MatrixMarket / .petscbin references in the top-of-file comment and usage string with stokes2 / FreeFEM ObjectView / stokes2.dat, matching the current README and run.sh behavior. Signed-off-by: William Dawson <william.dawson@riken.jp>
1 parent 2404574 commit cf4f048

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

‎programs/petsc-gmres/src/GMRES-PETSc.cpp‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
// CSR data transfered to PETSc Copyright, Atsushi Suzuki 30 Jul.2025
22
//
33
// A PETSc KSP (GMRES + GAMG algebraic multigrid preconditioner) benchmark:
4-
// load a large sparse SPD matrix, solve Ax = b for a known x, report the
5-
// relative L2 error and solve wall-time.
4+
// load the stokes2 sparse matrix (a Stokes flow saddle-point system,
5+
// 4.26M rows, generated via Gmsh/FreeFEM by Atsushi Suzuki), solve Ax = b
6+
// for a known x, report the relative L2 error and GMRES-iterate wall-time.
67
//
7-
// Loads a pre-converted PETSc binary matrix via MatLoad() against
8-
// PETSC_COMM_WORLD, so rows are properly partitioned across MPI ranks
9-
// (memory per rank scales as O(1/ranks), as a real distributed benchmark
10-
// should). The binary is produced once, offline, from the MatrixMarket
11-
// form of the benchmark matrix (audikw_1, SuiteSparse Matrix Collection,
12-
// GHS_psdef group) -- see this app's README.md for where each target
13-
// system's copy lives and how it was produced.
8+
// The matrix is written directly to PETSc binary format via FreeFEM's
9+
// ObjectView (= MatView), so MatLoad() reads it without a conversion step.
10+
// Rows are partitioned across MPI ranks via MatLoad against
11+
// PETSC_COMM_WORLD (memory per rank scales as O(1/ranks), as a real
12+
// distributed benchmark should). See this app's README.md for where each
13+
// target system's copy of stokes2.dat lives and how it was generated.
1414
static char help[] = "load a PETSc binary matrix and call the KSP solver\n";
1515

1616
#include <petscksp.h>
@@ -60,7 +60,7 @@ int main(int argc, char **args)
6060
PetscCall(PetscOptionsGetString(NULL, NULL, "-f", fname, sizeof(fname), &flg));
6161
if (!flg) {
6262
PetscCall(PetscPrintf(PETSC_COMM_WORLD,
63-
"usage: %s -f <matrix.petscbin> [-ksp_monitor] [-pc_type gamg] [-log_view]\n",
63+
"usage: %s -f <stokes2.dat> [-ksp_monitor] [-pc_type gamg] [-log_view]\n",
6464
args[0]));
6565
PetscCall(PetscFinalize());
6666
exit(-1);

0 commit comments

Comments
 (0)