-
Notifications
You must be signed in to change notification settings - Fork 243
ci: Edit Dockerfile.petsc and add docker-petsc.yml #2779
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
base: petsc
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## petsc #2779 +/- ##
==========================================
- Coverage 75.98% 75.98% -0.01%
==========================================
Files 273 273
Lines 53844 53850 +6
Branches 4551 4551
==========================================
+ Hits 40913 40917 +4
- Misses 12106 12108 +2
Partials 825 825 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| try: | ||
| from petsctools import get_petscvariables, MissingPetscException | ||
| petsc_variables = get_petscvariables() | ||
| except ImportError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JDBetteridge I moved the petsc imports from requirements.txt to requirements-petsc.txt as you advised. As a result, the petsc dependencies are no longer installed in Dockerfile.devito - which is preferred - but this leads to the following errors (this and this). I've addressed them by wrapping the imports in except ImportError blocks (see also petsc/solver_parameters.py below), in a similar way to how mpi4py is imported in distributed.py. Is this fine? What is best practice? Any suggestions for a longer term solution, particularly as requirements-petsc.txt grows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you will need to import guard petsctools. And wherever possible you should avoid importing anything PETSc specific if PETSc isn't present on the system. Long term we may want to revisit the module structure, but for now this is fine
While developing on the
petscbranch, this PR addsdocker-petsc.ymlto build and pushDockerfile.petscon pushes to thepetscbranch. This PR also updatesDockerfile.petscso that it usesdevitocodes/devito:cpu-devas its base. Marked as a draft until PR #2778 is reviewed/merged.