Replace -pc_air_max_dd_ratio with new CF splitting type#220
Merged
stevendargaville merged 32 commits intomainfrom Mar 16, 2026
Merged
Replace -pc_air_max_dd_ratio with new CF splitting type#220stevendargaville merged 32 commits intomainfrom
stevendargaville merged 32 commits intomainfrom
Conversation
…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
…, like the CPU code
…s called with max_dd_ratio
… 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.