Skip to content

Replace -pc_air_max_dd_ratio with new CF splitting type#220

Merged
stevendargaville merged 32 commits intomainfrom
ddc_pmis
Mar 16, 2026
Merged

Replace -pc_air_max_dd_ratio with new CF splitting type#220
stevendargaville merged 32 commits intomainfrom
ddc_pmis

Conversation

@stevendargaville
Copy link
Collaborator

@stevendargaville stevendargaville commented Mar 13, 2026

This PR removes the option -pc_air_max_dd_ratio and changes all interfaces which used it. Instead this has been replaced with a new CF splitting, namely -pc_air_cf_splitting_type diag_dom.

The new CF splitting has similar behaviour to -pc_air_max_dd_ratio. The old behaviour computed a PMISR with a strong threshold and then did multiple DDC iterations, where fixed fractions of the worst local F points are converted to C, until it reached the diagonal dominance ratio specified by -pc_air_max_dd_ratio.

This was cheap but very aggressive (if the fraction was high), as removing any one F point changes the diagonal dominance ratio of all its neighbours in Aff. Also in parallel this was not a true sorting of the worst ratios, so if the ratios differed throughout the domain there were regions where the diagonal dominance ratio was low but there would still be F points swapped.

Instead now the CF_DIAG_DOM does a two-pass splitting. The first does a PMISR CF splitting. The second step is now a parallel independent set in Aff + Aff^T with the measure given by the diagonal dominance ratio using our existing PMISR independent set algorithm. This ensures we only change one F point in a neighbourhood at a time, while still giving parallelism. It then performs as many iterations necessary to hit the diagonal dominance ratio given by the strong threshold.

This is more expensive but gives better results, with smooth decrease in iteration count as the max desired diagonal dominance ratio is decreased.

Also added an interface to compute_diag_dom_submatrix which is an easier API for external users to calculate a diagonally dominant submatrix from an input PETSc Mat.

…ce at a fixed number. Replaces multiple iterations changing a fixed number of local rows, to multiple iterations of a PMIS-style method which computes independent sets of the worst rows at each iteration and changes those only. Not yet tested in parallel but all the components should easily work in parallel.
…te file for the device copy of the CF markers
…existing measure and cf markers, just like the CPU version
… enabled, there is now a routine to calculate the diagonal dominance of Aff just based on the F point IS, similar to the kokkos routine.
… test the CF splitting is valid and added a case where it sets max_dd_ratio, as that triggers a different code path
… measure is the diagonal dominance ratio and not the number of rows in (Aff+Aff^T), it can do the pmisr on Aff+Aff^T implicitly, just using extra halo exchanges to compute the independent set. This is based off the branch pmisr_implicit_transpose which was never merged
… a guaranteed diagonally dominant submatrix from an input_mat. Uses PMISR_DDC and the new max_dd_ratio independent set algorithm. Works in parallel and on gpus
…bmatrix. Update the documentation with this new routine. Add testing which checks the returned matrix is row-wise diagonally dominant
… CF_DIAG_DOM. This also modifies the strength matrix to be defined by the strength of connection relative to the abs of the diagonal. This way we can use the strong_threshold as the max_dd_ratio, removing one of the parameters
…tting type, diag_dom. This uses the strong_threshold to specify a max dd ratio, that way the user only has to specify a single parameter
…h matrix - that produces a worse first pass.
…an assembled Aff+Aff^T, it does the pmisr implicitly, like the CPU version
@stevendargaville stevendargaville changed the title Change behaviour of -pc_air_max_dd_ratio Replace -pc_air_max_dd_ratio with new CF splitting type Mar 13, 2026
@stevendargaville stevendargaville merged commit 32ae00f into main Mar 16, 2026
17 checks passed
@stevendargaville stevendargaville deleted the ddc_pmis branch March 16, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant