Skip to content

ISSUE 3763: Fix default solver options in documentation #4254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

tcalderon-space
Copy link

@tcalderon-space tcalderon-space commented Apr 26, 2025

Description

Fixes Issue #3763 Transfered the file from clean.rst to solving-interfaces.rst

tcalderon-space and others added 2 commits April 18, 2025 16:16
clean.rst is the solving-interface.rst
Copy link
Contributor

@connorjward connorjward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking this on. There are quite a few things that need addressing before this can get merged.

Could you also rename the PR to something that makes it clearer what is going on? Something like "Fix default solver options in documentation".

@@ -257,7 +257,7 @@ definite, and therefore can choose the conjugate gradient method,
rather than GMRES.

.. code-block:: python3

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

no need for extra whitespace

Comment on lines 739 to 747
solver_parameters: {
* ``mat_type``: "aij"
* ``ksp_type``: "preonly"
* ``ksp_rtol``: 1e-7
* ``pc_type``: "lu"
* ``pc_factor``: _DEFAULT_DIRECT_SOLVER_PARAMETERS
}

`LinearVariationalSolver defaults <https://github.com/firedrakeproject/firedrake/blob/master/firedrake/variational_solver.py#L134-L143>`_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just supposed to be a bulleted list. Please run make -C docs html and check the rendered HTML to make sure things look right.

@tcalderon-space tcalderon-space changed the title ISSUE 3763: Update to Clean.rst ISSUE 3763: Fix default solver options in documentation Apr 28, 2025
Comment on lines +745 to +747
* ``ksp_atol``: ``1e-50``
* ``ksp_divtol``: ``1e4``
* ``ksp_max_it``: ``10000``
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, please make sure the rest of the file is up to date. The options in 753-763 should have:

{'mat_type': 'aij',
 'ksp_type': 'preonly',
 'ksp_rtol': 1e-05,
 'pc_type': 'lu',
 'pc_factor_mat_solver_type': 'mumps',
 'pc_factor_mat_mumps_icntl_14': 200,
 'snes_type': 'newtonls',
 'snes_linesearch_type': 'basic'}

Copy link
Contributor

@connorjward connorjward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks this is looking much better.

clean.rst Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this file from the PR.

Comment on lines 767 to 768
* 'pc_factor_mat_solver_type': 'mumps'
* 'pc_factor_mat_mumps_icntl_14': 200
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 'pc_factor_mat_solver_type': 'mumps'
* 'pc_factor_mat_mumps_icntl_14': 200
* ``pc_factor_mat_solver_type``: ``mumps``
* ``pc_factor_mat_mumps_icntl_14``: 200

@connorjward connorjward requested a review from pbrubeck May 6, 2025 12:40
Comment on lines +767 to +768
* ``pc_factor_mat_solver_type`` : ``mumps``
* ``pc_factor_mat_mumps_icntl_14``: 200
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These parameters are only relevant if MUMPS is present. Do we want to keep them in the documentation? If so, they should also be included above in the linear solver parameters.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I wait for approval for whether I should update mumps or not? @pbrubeck @connorjward

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to try quite hard to not have MUMPS installed. I think these options should be documented.

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.

3 participants