Skip to content
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

JDBetteridge/petsc priorities #3348

Merged
merged 33 commits into from
May 16, 2024
Merged

Conversation

JDBetteridge
Copy link
Member

@JDBetteridge JDBetteridge commented Jan 24, 2024

Description

Internal refactor of how we set PETSc defaults. This is now based off which PETSc external packages are installed. Now a user with an external PETSc with only:

  • MPI
  • HDF5
  • A direct solver (but I think for tests to pass this must currently be MUMPS)
  • A partitioner (even the built in PETSc "simple" partitioner)
  • An AMG solver (including PETSc's gamg)

should expect the Firedrake test suite to pass.

Moving forward tests that use optional dependencies, such as:

  • Netgen
  • SLEPc
  • Any PETSc external dependency (that isn't MPI or HDF5)
  • Matplotlib
  • VTK
  • PyTorch

Should check for the presence of the optional dependency before being included in the Firedrake test suite.

dham
dham previously approved these changes Jan 24, 2024
@JDBetteridge JDBetteridge changed the base branch from JDBetteridge/firedrake_lite to master January 26, 2024 17:18
@JDBetteridge JDBetteridge dismissed dham’s stale review January 26, 2024 17:18

The base branch was changed.

@JDBetteridge JDBetteridge changed the title Jd betteridge/petsc priorities JDBetteridge/petsc priorities Jan 26, 2024
firedrake/petsc.py Outdated Show resolved Hide resolved
@JDBetteridge JDBetteridge linked an issue Feb 14, 2024 that may be closed by this pull request
@JDBetteridge JDBetteridge force-pushed the JDBetteridge/petsc_priorities branch 3 times, most recently from 10b659b to 30bfc5a Compare March 5, 2024 18:03
dham
dham previously requested changes Mar 6, 2024
tests/regression/test_matrix_prefix.py Outdated Show resolved Hide resolved
tests/regression/test_matrix_prefix.py Outdated Show resolved Hide resolved
firedrake/petsc.py Outdated Show resolved Hide resolved
firedrake/petsc.py Outdated Show resolved Hide resolved
firedrake/petsc.py Show resolved Hide resolved
firedrake/petsc.py Outdated Show resolved Hide resolved
firedrake/solving_utils.py Show resolved Hide resolved
firedrake/petsc.py Show resolved Hide resolved
tests/demos/test_demos_run.py Outdated Show resolved Hide resolved
tests/output/test_io_backward_compat.py Outdated Show resolved Hide resolved
tests/regression/test_auxiliary_dm.py Show resolved Hide resolved
tests/regression/test_bdmc_riesz_map.py Show resolved Hide resolved
tests/regression/test_ensembleparallelism.py Show resolved Hide resolved
tests/slate/test_hdg_poisson.py Show resolved Hide resolved
tests/slate/test_hybrid_poisson_sphere.py Show resolved Hide resolved
tests/slate/test_variational_prb.py Show resolved Hide resolved
tests/supermesh/test_galerkin_projection.py Show resolved Hide resolved
firedrake/petsc.py Outdated Show resolved Hide resolved
Co-authored-by: Josh Hope-Collins <joshua.hope-collins13@imperial.ac.uk>
@JHopeCollins JHopeCollins self-requested a review May 16, 2024 10:53
@JHopeCollins
Copy link
Contributor

I think I'm happy with where things are now. Thanks for doing this Jack, it should make installing different configurations much much easier.

@JDBetteridge JDBetteridge dismissed dham’s stale review May 16, 2024 11:06

Changes have been made

@JDBetteridge JDBetteridge merged commit 5f1f33f into master May 16, 2024
10 checks passed
@JDBetteridge JDBetteridge deleted the JDBetteridge/petsc_priorities branch May 16, 2024 11:07

# Looser default tolerance for KSP inside SNES.
DEFAULT_KSP_PARAMETERS = solving_utils.DEFAULT_KSP_PARAMETERS.copy()
DEFAULT_KSP_PARAMETERS["ksp_rtol"] = 1e-5
DEFAULT_KSP_PARAMETERS = MappingProxyType(DEFAULT_KSP_PARAMETERS | {'ksp_rtol': 1e-5})

Choose a reason for hiding this comment

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

Is this | (pipe) syntax compatible with python 3.8?
Sorry if it is not the proper place to comment.
Enrico

Copy link
Member Author

Choose a reason for hiding this comment

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

Err.... no. Good spot! This is the right place to comment, but unfortunately the code is already merged. I will open a new pull request to remove this.

However, we will very shortly be dropping support for Python 3.8 as Python will soon be dropping support.

Choose a reason for hiding this comment

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

Ok, thanks. Actually everything worked fine on 3.9 and 3.10.
Next time, I will try to do the pull request by myself.
Enrico

Ig-dolci pushed a commit that referenced this pull request Jul 6, 2024
* Move all PETSc defaults to petsc.py

* Add warnings when defaulting to PETSc internals

* Stop installing Chaco by default

* Remove Chaco and ML from docker container

---------

Co-authored-by: David A. Ham <david.ham@imperial.ac.uk>
Co-authored-by: Josh Hope-Collins <joshua.hope-collins13@imperial.ac.uk>
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.

BUG: Tests in test_eigensolver do not check for SLEPc
5 participants