forked from devitocodes/devito
-
Notifications
You must be signed in to change notification settings - Fork 0
compiler: Change PETScArray type to PetscScalar #64
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
ZoeLeibowitz
wants to merge
148
commits into
master
Choose a base branch
from
PetscScalar
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
148 commits
Select commit
Hold shift + click to select a range
a9801e7
compiler: Add FuncPtrCall
ZoeLeibowitz 3f73add
misc: Update docstring
ZoeLeibowitz ccd10b9
compiler: Edit names, move position of Callback and other small edits
ZoeLeibowitz f34ae6d
misc: Update docstring for Callback
ZoeLeibowitz ae28dac
misc: Clean up blank lines
ZoeLeibowitz 20fd2d1
misc: Split Dockerfile.cpu into .cpu and .intel
FabioLuporini 2a6b923
try petscfunc from abstractfunc
ZoeLeibowitz 2c0d33e
latest.
ZoeLeibowitz 12ab5bd
remove data allignment
ZoeLeibowitz 2e940ad
new petsc types
ZoeLeibowitz 0815c70
add const func in petscfunction
ZoeLeibowitz cc38a90
dsl: Simplify PETScFunction class and add diff dtypes inside test_pet…
ZoeLeibowitz 1dc5695
dsl: Inherit from DiscreteFunction for PETScFunction instead?'
ZoeLeibowitz 6152445
compiler: Switch PETScFunction to inherit from Array
ZoeLeibowitz cbedc60
compiler: Edit PETScFunction to inherit from ArrayBasic
ZoeLeibowitz 469e308
misc: Fix pytest for test_petsc.py
ZoeLeibowitz 9129223
compiler: Edit _C_ctype property of PETScFunction to utilise CustomDtype
ZoeLeibowitz acff687
compiler: Edit _C_ctype property of PETScFunction
ZoeLeibowitz 3362ad8
misc: Update file due to incorrect rebase
ZoeLeibowitz 5b15b4e
compiler: Change name to PETScArray from PETScFunction
ZoeLeibowitz 7f3920a
compiler: Add intermediate class between PETScArray and ArrayBasic
ZoeLeibowitz 15e7400
compiler: Remove PETSc specific checks in place_definitions
ZoeLeibowitz ea9be50
compiler: Remove PETSc specific check from place_definitions and edit…
ZoeLeibowitz 905a7e2
compiler: Remove is_PETScArray
ZoeLeibowitz 415ad20
compiler: Remove elif is_ObjectArray and use alloc_object_.. inside t…
ZoeLeibowitz adc5428
misc: Delete empty file
ZoeLeibowitz 0a571c7
misc: Move dtype_to_petsctype to petsc.py and clean up blank lines
ZoeLeibowitz ce3cfb3
misc: Clean up blank line
ZoeLeibowitz 245242a
Update nodes.py
ZoeLeibowitz b45b17c
Update nodes.py
ZoeLeibowitz 40699ae
compiler: Add FuncPtrCall
ZoeLeibowitz 0ad3625
compiler: Edit names, move position of Callback and other small edits
ZoeLeibowitz 136921a
types: Update PETScArray to have liveness
ZoeLeibowitz c9e9836
compiler: Switch get to pop in PETScArray
ZoeLeibowitz 31c8a27
types: Move liveness to ArrayBasic from PETScArray
ZoeLeibowitz 3d5278e
misc: clean
ZoeLeibowitz ae01826
types: Make PETScArrays differentiable
ZoeLeibowitz 222d804
types: Introduce PETScFunction class to enable differentiablity and t…
ZoeLeibowitz bbf64d2
types: Update PETScArray
ZoeLeibowitz 9ce5462
types: Edit init file for petsc types
ZoeLeibowitz 5e70798
revert file messed up rebase
ZoeLeibowitz 649b282
types: Add coefficients arg to PETScArray
ZoeLeibowitz 2b17216
types: Add basic PETScEq
ZoeLeibowitz 2c01d4f
types: Add PETScSolve and simple iet pass
ZoeLeibowitz a49dfa5
tests: Add test for PETScSolve
ZoeLeibowitz 4d9f98e
misc: Clean
ZoeLeibowitz 944adb0
misc: Clean up
ZoeLeibowitz 5924933
misc: Add a comment in types/petsc.py
ZoeLeibowitz 01f099f
types: Update PETScEq default solver params
ZoeLeibowitz 80e9b69
types: Remove hasattr from LoweredEq, create common node class for pe…
ZoeLeibowitz 807e93c
compiler: Edit iteration bound check in cluster.py i.e change PETScAr…
ZoeLeibowitz 8f8c3c0
compiler: Remove deep nesting in cluster.py isinstance check for Arra…
ZoeLeibowitz efc2289
compiler: Replace additions in LoweredEq with PETScRHS class which is…
ZoeLeibowitz 7ecaf4a
misc: Clean
ZoeLeibowitz d99d672
compiler: Remove target and solver params from LinearSolverExpression
ZoeLeibowitz f62a12b
compiler: Reduce elif statements inside iet/algorithms by using a PET…
ZoeLeibowitz fb6c936
types: Change name from PETScRHS to LinearSolveExpr
ZoeLeibowitz d232332
types: Edit LinearSolveExpr
ZoeLeibowitz 9fd5a8b
compiler: Small edit in LinearSolveExpr
ZoeLeibowitz 527269e
compiler: Small edit to hash in LinearSolveExpr
ZoeLeibowitz ce3ebba
compiler: Remove function from iet/algorithms and replace with just t…
ZoeLeibowitz d8a57bb
compiler: Remove unecessary __init__ from LinearSolverExpression
ZoeLeibowitz f2d05a1
compiler: Remove printer for LinearSolveExpr
ZoeLeibowitz 0cbae6f
misc: Clean up
ZoeLeibowitz eafda55
compiler: Edit PETScArrays to support devito multi-dim indexing
ZoeLeibowitz bcb892f
misc: clean
ZoeLeibowitz 1333432
tests: Add test for no automatic cast generation with PETScArrays
ZoeLeibowitz 754eb0f
misc: Docstring edit in test petsc
ZoeLeibowitz 4057c2c
compiler: Add PETScIndexedData
ZoeLeibowitz eb51bd0
misc: Clean
ZoeLeibowitz bdaba5e
compiler: Add indexedbases back and simplify PETScArray symbolic shape
ZoeLeibowitz a488156
types: Reverse dmda and therefore casting to match Devito
ZoeLeibowitz 5914852
misc: Doc
ZoeLeibowitz 41c7ff4
misc: Add line back
ZoeLeibowitz 3e0288d
compiler: Add Mock/placeholder expressions to create distinct iterati…
ZoeLeibowitz 17193ea
misc: Clean up
ZoeLeibowitz d55a2d0
bench: Remove null profiled sections in Kernel for openmp
ZoeLeibowitz 76d05c7
compiler: Remove init=False from LinSolveMock
ZoeLeibowitz 5555b67
compiler: Simplify by just having a Mock RHS which drops correspondin…
ZoeLeibowitz c4ec0b7
misc: Clean up
ZoeLeibowitz ff4cf07
misc: Clean
ZoeLeibowitz 309a3f9
misc: Comments
ZoeLeibowitz 452a213
misc: Typo
ZoeLeibowitz 21d6af2
compiler: Lift iteration space instead of using new Mock object
ZoeLeibowitz 5b4a79c
misc: Clean
ZoeLeibowitz a1dc4a4
misc: Clean
ZoeLeibowitz 3e57412
misc: Clean
ZoeLeibowitz c561573
compiler: Move petsc lift to petsc only file
ZoeLeibowitz 2721817
types: Simplify petsc_lift
ZoeLeibowitz 06a9c4c
types: Add else to petsc_lift
ZoeLeibowitz 1195470
misc: Move petsc_lift to passes/clusters file
ZoeLeibowitz 1c20833
compiler: Move petsc_lift to after clusterize inside lower_clusters
ZoeLeibowitz fdd3d67
misc: Fix functools
ZoeLeibowitz 1cce1af
misc: Split Dockerfile.cpu into .cpu and .intel
FabioLuporini 7ad9bc9
misc: Update file due to incorrect rebase
ZoeLeibowitz dd75395
dsl: Dispatch to sympy.Add not both Add and EvalDerivative
ZoeLeibowitz 1fe94ea
compiler: Create mixin for ThreadCallable and PETScCallable
ZoeLeibowitz feba0a9
compiler: Don't ever generate time loop for petsc callbacks
ZoeLeibowitz 10602d0
compiler: Move passes from utils into passes and create petsc_preprocess
ZoeLeibowitz ad1fb03
misc: Remove workflow triggers
ZoeLeibowitz 107d86d
rebase leftover
ZoeLeibowitz f3e1701
dsl: Edit PETScSolve to support modified stencils
ZoeLeibowitz e825ab8
dsl: Map time indices after forming eqn sets
ZoeLeibowitz ccb1901
dsl: Simplify index extraction
ZoeLeibowitz f0483f4
misc: Split Dockerfile.cpu into .cpu and .intel
FabioLuporini 57b99e6
misc: Update file due to incorrect rebase
ZoeLeibowitz ca20534
misc: Split Dockerfile.cpu into .cpu and .intel
FabioLuporini 15ed63e
misc: Update file due to incorrect rebase
ZoeLeibowitz bd4fc4b
dsl: Dispatch to sympy.Add not both Add and EvalDerivative
ZoeLeibowitz 09f6fdf
compiler: Create mixin for ThreadCallable and PETScCallable
ZoeLeibowitz 09d9180
types: Edit freesymbols in FieldFromPointer
ZoeLeibowitz 8472b77
clean
ZoeLeibowitz 579045f
trigger wfs for branches off this branch
ZoeLeibowitz 79cf51a
rebase leftover
ZoeLeibowitz 4272da2
rebase fix and remove concretize mapper
ZoeLeibowitz 526449e
rebase leftover
ZoeLeibowitz 4689508
flake8
ZoeLeibowitz 434e424
flake8
ZoeLeibowitz cfa7218
misc: Split Dockerfile.cpu into .cpu and .intel
FabioLuporini fd8c53f
misc: Update file due to incorrect rebase
ZoeLeibowitz d09e654
misc: Split Dockerfile.cpu into .cpu and .intel
FabioLuporini 62a4e1c
misc: Update file due to incorrect rebase
ZoeLeibowitz 0f862ba
dsl: Dispatch to sympy.Add not both Add and EvalDerivative
ZoeLeibowitz b8de614
compiler: Create mixin for ThreadCallable and PETScCallable
ZoeLeibowitz 82b434b
types: Edit freesymbols in FieldFromPointer
ZoeLeibowitz 8cb18d3
compiler: Use classes
ZoeLeibowitz da2bbf3
compiler: Switch to using a separate struct and dm for each SNES solve
ZoeLeibowitz c445140
compiler: Rework petscarrays
ZoeLeibowitz 670e1d2
misc: Clean up
ZoeLeibowitz ad5fb49
compiler: Timedep abstraction
ZoeLeibowitz 89cc06e
More cleanup, add callbackdm etc
ZoeLeibowitz 2c4a568
Address some comments
ZoeLeibowitz b83ec92
compiler: Move uxreplace_efuncs into Builder
ZoeLeibowitz 4d75af8
misc: Clean up
ZoeLeibowitz 5f25b0f
misc: Add timeloop abstraction docs
ZoeLeibowitz 37b62b3
misc: Clean up and docs
ZoeLeibowitz 10af16f
misc: Spellings
ZoeLeibowitz ef7ee34
flake8
ZoeLeibowitz 3b80b8b
Merge pull request #38 from ZoeLeibowitz/cleanup2
ZoeLeibowitz b989d06
Clean up
ZoeLeibowitz be99236
Merge pull request #36 from ZoeLeibowitz/FieldFromPointer
ZoeLeibowitz 15f78ea
compiler: Initialize and Finalize PETSc once and command line args
ZoeLeibowitz cdc75f0
Merge pull request #43 from ZoeLeibowitz/init_finalize
ZoeLeibowitz c68dd4f
Coupled (#41)
ZoeLeibowitz 61e2ad6
compiler: Error thrown for petsc precision
ZoeLeibowitz c773e7f
flake8
ZoeLeibowitz 969c8d2
misc: Flake8 tests
ZoeLeibowitz d5904fb
misc: Switch to Pathlib
ZoeLeibowitz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| name: CI-petsc | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| on: | ||
| # Trigger the workflow on push or pull request, | ||
| # but only for the master branch | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
| branches: | ||
| - master | ||
|
|
||
| jobs: | ||
| pytest: | ||
| name: ${{ matrix.name }}-${{ matrix.set }} | ||
| runs-on: "${{ matrix.os }}" | ||
|
|
||
| env: | ||
| DOCKER_BUILDKIT: "1" | ||
| DEVITO_ARCH: "${{ matrix.arch }}" | ||
| DEVITO_LANGUAGE: ${{ matrix.language }} | ||
|
|
||
| strategy: | ||
| # Prevent all build to stop if a single one fails | ||
| fail-fast: false | ||
|
|
||
| matrix: | ||
| name: [ | ||
| pytest-docker-py39-gcc-noomp | ||
| ] | ||
| include: | ||
| - name: pytest-docker-py39-gcc-noomp | ||
| python-version: '3.9' | ||
| os: ubuntu-latest | ||
| arch: "gcc" | ||
| language: "C" | ||
| sympy: "1.12" | ||
|
|
||
| steps: | ||
| - name: Checkout devito | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Build docker image | ||
| run: | | ||
| docker build . --file docker/Dockerfile.devito --tag devito_img --build-arg base=zoeleibowitz/bases:cpu-${{ matrix.arch }} --build-arg petscinstall=petsc | ||
|
|
||
| - name: Set run prefix | ||
| run: | | ||
| echo "RUN_CMD=docker run --rm -t -e CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} --name testrun devito_img" >> $GITHUB_ENV | ||
| id: set-run | ||
|
|
||
| - name: Set tests | ||
| run : | | ||
| echo "TESTS=tests/test_petsc.py" >> $GITHUB_ENV | ||
| id: set-tests | ||
|
|
||
| - name: Check configuration | ||
| run: | | ||
| ${{ env.RUN_CMD }} python3 -c "from devito import configuration; print(''.join(['%s: %s \n' % (k, v) for (k, v) in configuration.items()]))" | ||
|
|
||
| - name: Test with pytest | ||
| run: | | ||
| ${{ env.RUN_CMD }} mpiexec -n 1 pytest --cov --cov-config=.coveragerc --cov-report=xml ${{ env.TESTS }} | ||
|
|
||
| - name: Upload coverage to Codecov | ||
| if: "!contains(matrix.name, 'docker')" | ||
| uses: codecov/codecov-action@v4 | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| name: ${{ matrix.name }} |
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
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
f-string, we try to update all string to
f".. {}"whenever we touch oneThere 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.
I don't think
_restrict_keywordshould be an object property that seems at the wrong place.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.
Do you have any other suggestions on where it could go if I need to drop it for certain objects like
PETScArrays?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.
Could it be attached to the class?