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

Fix solver options #909

Merged
merged 3 commits into from
Nov 1, 2024
Merged

Fix solver options #909

merged 3 commits into from
Nov 1, 2024

Conversation

RemDelaporteMathurin
Copy link
Collaborator

Proposed changes

I realised that when users provided PETSC options for any F.ProblemBase class, they were just ignored.

Types of changes

What types of changes does your code introduce to FESTIM?

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code refactoring
  • Documentation Update (if none of the other choices apply)
  • New tests

Copy link

codecov bot commented Oct 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.70%. Comparing base (013937a) to head (dcb89e9).
Report is 4 commits behind head on fenicsx.

Additional details and impacted files
@@           Coverage Diff            @@
##           fenicsx     #909   +/-   ##
========================================
  Coverage    97.69%   97.70%           
========================================
  Files           43       43           
  Lines         2042     2048    +6     
========================================
+ Hits          1995     2001    +6     
  Misses          47       47           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RemDelaporteMathurin RemDelaporteMathurin added bug Something isn't working fenicsx Issue that is related to the fenicsx support labels Oct 31, 2024
@RemDelaporteMathurin
Copy link
Collaborator Author

@jorgensd to test this is there a way to catch a PETSC warning (I'd like to add a foo parameter and check that PETSC complains)

@jorgensd
Copy link
Collaborator

@jorgensd to test this is there a way to catch a PETSC warning (I'd like to add a foo parameter and check that PETSC complains)

set "options_left" by default:
https://petsc.org/release/manualpages/Sys/PetscOptionsLeft/

@RemDelaporteMathurin
Copy link
Collaborator Author

I added "options_left" by default but it doesn't raise an error, just prints more stuff:

#PETSc Option Table entries:
-nls_solve_coucoucou 3 # (source: code)
-nls_solve_ksp_type preonly # (source: code)
-nls_solve_pc_factor_mat_solver_type mumps # (source: code)
-nls_solve_pc_type lu # (source: code)
-options_left # (source: code)
#End of PETSc Option Table entries
WARNING! There are options you set that were not used!
WARNING! could be spelling mistake, etc!
There is one unused database option. It is:
Option left: name:-nls_solve_coucoucou value: 3 source: code

Without it it just prints:

WARNING! There are options you set that were not used!
WARNING! could be spelling mistake, etc!
There is one unused database option. It is:
Option left: name:-nls_solve_coucoucou value: 3 source: code

@RemDelaporteMathurin RemDelaporteMathurin merged commit ef8d875 into fenicsx Nov 1, 2024
12 checks passed
@RemDelaporteMathurin RemDelaporteMathurin deleted the fix-solver-options branch November 1, 2024 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fenicsx Issue that is related to the fenicsx support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants