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/merge pyop2 tsfc #3817

Draft
wants to merge 3,890 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3890 commits
Select commit Hold shift + click to select a range
b92140e
Merge pull request #604 from connorjward/fix-broken-api-build
dham Dec 8, 2020
212ec4d
Replace deprecated new_hash
Dec 14, 2020
3652924
Merge pull request #605 from connorjward/fix-new_hash-deprecation
dham Dec 15, 2020
fe63bf7
Merge remote-tracking branch 'origin/master' into DataCarrier-object-…
nbouziani Dec 20, 2020
e5af975
Update AUTHORS
nbouziani Dec 20, 2020
21df7c9
Add zero kernel cache
connorjward Jan 5, 2021
be843f2
Fix linting error
connorjward Jan 6, 2021
8de26ea
Merge pull request #606 from connorjward/add-zero-kernel-cache
wence- Jan 6, 2021
4656a8a
Test code on merge with master
connorjward Jan 22, 2021
d0cc348
Merge pull request #608 from connorjward/test-on-merge
wence- Jan 22, 2021
ff738b2
Merge branch 'master' into DataCarrier-object-versionning
nbouziani Apr 26, 2021
516454d
Update data versioning for Dat and Mat (base and petsc_base classes)
nbouziani Apr 29, 2021
121c2a6
catch up with numpy type changes
dham Apr 21, 2021
948cb7d
Pin decorator
dham Apr 21, 2021
5a89bfc
Use Firedrake PETSc and petsc4py
connorjward May 10, 2021
f1daf21
Merge pull request #617 from connorjward/test-ci
wence- May 10, 2021
c8d7ff6
actions: Build docs at end of successful test run
wence- May 11, 2021
9a90c9f
Merge pull request #618 from OP2/wence/fix/actions-doc-build
wence- May 11, 2021
afe4ad4
add standard set operations
ksagiyam Apr 14, 2020
df6f9aa
Loopy sprint (#612)
ReubenHill May 14, 2021
ded8578
codegen/api: New PermutedMap class corresponding to map o permutation
wence- May 7, 2021
dfeec40
codegen: No more regular expressions in node renaming
wence- May 14, 2021
a257d1d
tests: Squash numpy deprecation warnings
wence- May 14, 2021
07a47b3
Merge remote-tracking branch 'origin/master' into DataCarrier-object-…
nbouziani May 24, 2021
1e74cea
Add PETSc decorator to compile
connorjward May 25, 2021
2781213
add standard set operations
ksagiyam Apr 14, 2020
855ec95
Merge branch 'fs_filter' of github.com:OP2/PyOP2 into fs_filter
ksagiyam May 25, 2021
29973b1
Add some missing DataCarrier inits
nbouziani May 26, 2021
c45a751
Merge pull request #623 from OP2/connorjward/time-compilation
dham Jun 9, 2021
bb27936
Merge remote-tracking branch 'origin/master' into fs_filter
ksagiyam Jun 15, 2021
e56d26f
More loopy interface changes: arg_id_to_val -> arg_id_to_arg
sv2518 Jun 9, 2021
f057908
Add recreate to Arg
Melina97 Jun 25, 2021
3442f06
Recreate method of Arg
Melina97 Jun 25, 2021
92184de
Fix cache problem
Melina97 Jun 25, 2021
e9b73ab
Fix cache problem
Melina97 Jun 25, 2021
f24478a
Fix cache problem
Melina97 Jun 25, 2021
b28bf14
Requirements: update loopy fork.
sv2518 Jun 28, 2021
781201c
Merge pull request #627 from OP2/new-loopy-master
dham Jun 30, 2021
760dbe7
Merge remote-tracking branch 'origin/master' into Melina97/fix_cache_…
Melina97 Jul 1, 2021
899a543
Updated changes
Melina97 Jul 1, 2021
70c4b39
Don't use a parloop when not needed
dham Jul 13, 2021
58f89ef
added subset case for copy
Melina97 Jul 13, 2021
2460b37
@dham
Melina97 Jul 15, 2021
3ddc70a
Don't use a parloop when not needed
Melina97 Jul 15, 2021
88b23e0
Merging conflict resolved
Melina97 Jul 15, 2021
5b053cc
faster dat copy
Melina97 Jul 16, 2021
c048265
Lint fix
Melina97 Jul 16, 2021
82279dc
Ignore generated files
wence- Jul 21, 2021
dd5d060
Fix get_petsc_dir (#622)
connorjward Jul 21, 2021
1272f50
Edited iops for Dat
Melina97 Jul 21, 2021
15bd621
Merge remote-tracking branch 'origin/master' into fs_filter
ksagiyam Jul 21, 2021
ec55e8e
Merge pull request #620 from OP2/fs_filter
ksagiyam Jul 21, 2021
c57aafc
Fix cache-clearing to work with directories
connorjward Jul 21, 2021
8423537
recreate method only
Melina97 Jul 22, 2021
6e00f49
Remove entire cache directory
connorjward Jul 22, 2021
117e4b7
Merge pull request #632 from OP2/connorjward/fix-pyop2clean
dham Jul 27, 2021
6101f6b
Merge pull request #629 from OP2/Melina97/fix_cache_problem
dham Jul 27, 2021
c915003
Call apt update in workflow
connorjward Jul 27, 2021
edf5b3a
Merge pull request #634 from OP2/connorjward/call-apt-update
dham Jul 27, 2021
b48f65d
Shortcut dat copy (#630)
dham Aug 11, 2021
9230ed6
Merge pull request #621 from OP2/wence/feature/composed-map
dham Aug 11, 2021
c0b50cf
Allow optional flop count on kernel construction
AndrewWhitmell Jul 14, 2021
0007d46
test: Squash numpy deprecation warning
wence- Aug 25, 2021
d5f82d3
petsc: Use correct scalar type for datmat multiplication
wence- Aug 25, 2021
a98bb32
Fix compilation failures on Mac M1 machines
danshapero Sep 9, 2021
2d77e8f
Merge pull request #636 from danshapero/m1-fixes
dham Sep 23, 2021
7d3d4be
Merge master
nbouziani Sep 24, 2021
fb0ee93
Split apart and linting passes
connorjward Sep 29, 2021
24b7214
Moved pyparloop in parloop.py
connorjward Sep 29, 2021
222ee58
All tests passing
connorjward Sep 29, 2021
2e60434
Fix Arg _is_mat check
connorjward Sep 29, 2021
55d9637
Fix linting
connorjward Sep 29, 2021
e4a9de6
Add subpackage to setup.py
connorjward Sep 29, 2021
a43fcd3
Merge pull request #639 from OP2/connorjward/refactor-base.py
dham Oct 5, 2021
54aad3a
Make Global.zero accept subset kwarg
connorjward Oct 7, 2021
6286fc0
Merge pull request #637 from OP2/connorjward/fix-subset-kwarg-error
wence- Oct 7, 2021
bc7cd81
Bug fix empty extruded set with variable layers
connorjward Oct 7, 2021
86d1d57
Merge pull request #641 from OP2/rebase-ext-mesh-fix
wence- Oct 7, 2021
83cfe91
Matrix tests run correctly in parallel
connorjward Oct 12, 2021
be8adea
Merge pull request #642 from OP2/connorjward/make-test-matrices-work-…
dham Oct 14, 2021
b6710b5
codegen: Fix issue with permuted maps
wence- Nov 3, 2021
d8c7509
Add test using permuted maps
wence- Nov 3, 2021
a737a31
Merge pull request #643 from OP2/wence/fix/permuted-map
wence- Nov 8, 2021
6d39e69
Merge remote-tracking branch 'origin/master' into DataCarrier-object-…
nbouziani Nov 14, 2021
520078b
Add mat.py
nbouziani Nov 14, 2021
d89e93c
Refactor object versioning using PETSc state counter
nbouziani Nov 16, 2021
ca5e50d
Fix typo
nbouziani Nov 16, 2021
54dd188
Add tests for Dat
nbouziani Nov 16, 2021
18f9fa4
Remove spurious incrementations from VecAccessMixin
nbouziani Nov 16, 2021
2836c7a
Cleanup
nbouziani Nov 21, 2021
7bcde5a
Add dat_version to MixedDat + test
nbouziani Nov 21, 2021
0e879bd
Specify petsc branch in ci.yml
nbouziani Nov 24, 2021
55ad119
Update few things
nbouziani Nov 25, 2021
82f9ac5
Update test + remove @abstractmethod from increment_dat_version
nbouziani Nov 25, 2021
3edaf9a
Merge branch 'DataCarrier-object-versionning' of github.com:OP2/PyOP2…
nbouziani Nov 25, 2021
5fe6451
Major redesign of API
connorjward Jan 25, 2022
686857b
Merge pull request #624 from OP2/connorjward/purge-parloop-data-refs
dham Feb 3, 2022
658abaa
Add disk_cached and cached decorators
connorjward Jan 25, 2022
e3bb5a0
Merge pull request #644 from OP2/cached-decorator
connorjward Feb 4, 2022
8b04898
Fix dtypes for COFFEE local kernel
connorjward Feb 8, 2022
186fac5
Merge pull request #647 from OP2/fix-dtype-bug
connorjward Feb 8, 2022
6827bdb
Uniquify args for halo exchanges
connorjward Feb 8, 2022
13f0d33
Merge pull request #649 from OP2/fix-2341
wence- Feb 9, 2022
462da86
Fix deadlocking disk_cached decorator
connorjward Feb 18, 2022
527fb49
Loopy: Set target globally to CWithGNULibcTarget
sv2518 Mar 2, 2022
ebe8ccb
Merge pull request #656 from OP2/sv/set-targets
sv2518 Mar 4, 2022
b1bf667
Minor fixes
sv2518 Mar 4, 2022
4ba2952
Merge pull request #657 from OP2/sv/fix-print
sv2518 Mar 4, 2022
5fb8559
Merge pull request #650 from OP2/connorjward/fix-deadlocking-decorator
connorjward Mar 22, 2022
2d2c3aa
Add dtype check for parloops
connorjward Mar 28, 2022
5f4c036
JDBetteridge/more compilers (#655)
JDBetteridge Apr 1, 2022
d62a56c
Merge pull request #659 from OP2/connorjward/parloop-dtype-check
dham Apr 6, 2022
4530b0e
Compilation: fix the compiler sniffing for apple.
sv2518 Apr 7, 2022
80715ac
Merge pull request #660 from OP2/sv/fix-compiler-sniff
dham Apr 7, 2022
ee0b56e
Don't just drop C instructions...
sv2518 Jan 18, 2022
0c7a5c8
Logging: add PETSc events into the inverse and solve callables. The m…
sv2518 Feb 4, 2022
a0a2ab2
Logging: Generate events for logging all local kernels/callables in p…
sv2518 Feb 15, 2022
883d037
Fix typo in attribute name for M1 Mac.
dham Apr 8, 2022
fc9c34a
Merge pull request #658 from OP2/sv/profiling-local-kernels-trackevents
dham Apr 8, 2022
0a1e339
pass gcc dir to linker on M1
dham Apr 27, 2022
8697788
Merge pull request #662 from OP2/hardcode_m1_library
dham May 3, 2022
a4887c7
call super's constructor
kaushikcfd May 4, 2022
a33fedf
Merge pull request #663 from OP2/mapper_init_defn
wence- May 5, 2022
f277089
PyOP2 compilation: add a pathway to compile with gcc on Mac.
sv2518 May 6, 2022
ba81ee0
Merge pull request #664 from OP2/sv/mac-gnu
sv2518 Jul 7, 2022
e1f7598
Fix mpicc (#667)
sv2518 Jul 8, 2022
ba8d12c
Merge master
nbouziani Jul 13, 2022
0989f1d
Fix lint
nbouziani Jul 13, 2022
a1d9d9f
Update ci.yml
nbouziani Jul 14, 2022
9eabf60
Add tests for Dat context managers
nbouziani Jul 21, 2022
ff58332
Merge branch 'DataCarrier-object-versionning' of github.com:OP2/PyOP2…
nbouziani Jul 21, 2022
784b217
Merge pull request #579 from OP2/DataCarrier-object-versionning
dham Jul 21, 2022
a2103cf
Increase state counter inside vec_context
nbouziani Jul 24, 2022
e09cd25
Update MixedDat._vec counter via Vec.array
nbouziani Jul 26, 2022
cb3ae29
Clean-up
nbouziani Jul 26, 2022
7036b5d
Merge pull request #670 from OP2/fix-mixed-dat-object-versioning
dham Jul 27, 2022
3a1b62f
Made a mistake in the compiler refactor + New linting rules (#672)
JDBetteridge Aug 11, 2022
473a1d5
Replace OrderedDicts getting passed to loopy
connorjward Aug 19, 2022
0dcf7d6
Enable loopy caching of kernels
connorjward Aug 19, 2022
a0259a9
Merge pull request #673 from OP2/connorjward/enable-loopy-caching
dham Oct 5, 2022
fcf4250
add ComposedMap
ksagiyam Oct 1, 2022
1ba576e
Merge pull request #674 from OP2/ksagiyam/composed_map
ksagiyam Oct 18, 2022
40905e7
Remove distutils from compilation.py
Feb 23, 2022
5218d79
Remove distutils from setup.py
JDBetteridge Mar 3, 2022
e242150
Update versioneer
JDBetteridge Mar 3, 2022
1da42a5
test_requires is deprecated
JDBetteridge Mar 3, 2022
f072341
Updated to latest versioneer (no distutils)
JDBetteridge Nov 4, 2022
189dc4d
Add matrix to CI
JDBetteridge Nov 4, 2022
fd59755
Fail fast false
JDBetteridge Nov 9, 2022
b74ed10
Merge pull request #678 from OP2/JDBetteridge/purge_distutils
dham Nov 9, 2022
382a718
Merge pull request #679 from OP2/JDBetteridge/ci_python_matrix
dham Nov 9, 2022
a959e43
codegen: add Quotient, FloorDiv, Remainder
ksagiyam Oct 11, 2022
e8722fb
extrusion: enable periodic extrusion
ksagiyam Oct 13, 2022
9de5afc
Merge pull request #675 from OP2/ksagiyam/periodic_extrusion
ksagiyam Nov 15, 2022
804b711
Add timeout to CI tests
JDBetteridge Nov 21, 2022
de58f78
Add 60 min job timeout and 10 min pytesttimeout as pytest-timout does…
JDBetteridge Nov 21, 2022
f4a5a17
Test new timeout strategy
JDBetteridge Nov 22, 2022
8f826a2
Try to change the CI environment instead
JDBetteridge Nov 22, 2022
e8be853
Re-enable matrix strategy
JDBetteridge Nov 23, 2022
3a1d876
Merge pull request #682 from OP2/JDBetteridge/add_CI_timeout
JDBetteridge Nov 23, 2022
43c14a6
Add halo freezing
connorjward Nov 16, 2022
c1158ed
Merge pull request #680 from OP2/connorjward/freeze-halos
dham Nov 23, 2022
dac4b97
Add some dummy Dat methods to Global
connorjward Nov 28, 2022
1f0a740
Replaced tompi4py() with proper comm_dup() calls
JDBetteridge Sep 30, 2022
65fd506
WIP: Tests passing, but not all comms freed
JDBetteridge Oct 2, 2022
fb274d2
This test was just wrong
JDBetteridge Oct 11, 2022
35de348
Tests pass with no comms referenced at end
JDBetteridge Oct 13, 2022
51b21f4
Lint code
JDBetteridge Oct 18, 2022
e3454bf
Remove debugging statements
JDBetteridge Oct 18, 2022
b2520ee
Fix up a few more MPI bits
JDBetteridge Oct 20, 2022
07d1dc5
Fix deadlocks in Firedrake tests
JDBetteridge Oct 24, 2022
5c4b242
Comm in composed map was not internal
JDBetteridge Oct 26, 2022
390289f
Remove pyop2.mpi.FriendlyCommNull
JDBetteridge Oct 26, 2022
ff67407
Address reviewer comments
JDBetteridge Oct 27, 2022
5563c85
pyop2_comm_status() now returns a string
JDBetteridge Oct 27, 2022
f01762d
Duplicate COMM_WORLD and COMM_SELF for PyOP2 use (and avoid renaming …
JDBetteridge Oct 27, 2022
235d45b
Fixed some unreachable lines and redundant logic
JDBetteridge Nov 4, 2022
2c6056b
Change debug to print in _free_comms as stream already closed
JDBetteridge Nov 15, 2022
ba86a16
Fixed removing comm from list twice on free
JDBetteridge Nov 18, 2022
4c439ea
Tidy code, address review comments
JDBetteridge Nov 23, 2022
7a3c68f
Merge pull request #685 from OP2/connorjward/extra-global-methods
dham Nov 29, 2022
7aca5e5
Merge pull request #676 from OP2/JDBetteridge/clean_comms
ksagiyam Nov 29, 2022
2c2c419
GCC 9 doesn't emit full version with `dumpfullversion` (#686)
JDBetteridge Jan 25, 2023
3748115
Fix Halo docstrings so Firedrake docs link properly
JDBetteridge Feb 3, 2023
1c6068a
Add comm to Global constructor in dat op
JDBetteridge Feb 14, 2023
233f6dc
Merge pull request #690 from OP2/JDBetteridge/global_fix
JDBetteridge Feb 14, 2023
7c9fdf3
Prevent freeing comms when refcount=0. Deadlock caused by garbage col…
JDBetteridge Mar 15, 2023
366a8c7
Merge pull request #692 from OP2/JDBetteridge/delay_comm_free
dham Mar 29, 2023
a1437d0
data_with_halos increments dat_version
connorjward Apr 3, 2023
59e109e
Merge pull request #694 from OP2/connorjward/fix-dat-versioning
JDBetteridge Apr 3, 2023
ed2ff83
DO NOT MERGE Try with updated PETSc branch
connorjward May 2, 2023
539f9cf
Try installing wheel
connorjward May 2, 2023
5903f7a
Add simple halo methods to Global and DatView (#695)
connorjward May 2, 2023
c665bbc
Drop Python 3.7
connorjward May 4, 2023
53a265c
Remove old requirement
connorjward May 4, 2023
0d1c5b0
Merge pull request #700 from OP2/connorjward/test-updated-petsc
JDBetteridge May 4, 2023
b255f06
Change import location to avoid loopy deprecation warning
connorjward May 2, 2023
06697a3
Merge pull request #699 from OP2/connorjward/deprecation-warning
JDBetteridge May 4, 2023
edae288
Expunge COFFEE (#697)
connorjward May 10, 2023
d230953
Global with no comm is a Constant (#701)
JDBetteridge Jun 14, 2023
92e756b
Insert zero blocks on matrix diagonals (#704)
connorjward Aug 23, 2023
8e4ad93
don't die if the cache dir doesn't exist (#707)
dham Aug 29, 2023
da14715
fix dat version (#709)
ksagiyam Sep 27, 2023
d017d59
Fix halo exchanges for MixedDats in parloops (#710)
connorjward Oct 18, 2023
fbde61f
mat + sparsity: use dset.layout_vec.local_size for sizes (#714)
ksagiyam Jan 9, 2024
ad0c430
Comm reference fixes + Remove __del__ method and add weakref.finalize…
JDBetteridge Jan 17, 2024
e0a4d3a
Passthrough params (#708)
pbrubeck Jan 24, 2024
eba7baf
For testing firedrake
JDBetteridge Feb 5, 2024
bfa7810
sparsity: fix some tests
ksagiyam Dec 8, 2023
09968a4
sparsity: repack rmaps, cmaps, and iteration_regions in maps_and_regions
ksagiyam Dec 8, 2023
3e436ee
sparsity: change interface to directly accept maps_and_regions
ksagiyam Dec 11, 2023
dc513fb
sparsity: add diagonal_block to kwargs
ksagiyam Dec 20, 2023
48a54d3
sparsity: ignore negative map indices
ksagiyam Dec 20, 2023
d60101b
sparsity: add test
ksagiyam Dec 20, 2023
0afe7fa
Merge pull request #713 from OP2/ksagiyam/sparsity
ksagiyam Mar 1, 2024
f424fb5
Merge pull request #717 from OP2/JDBetteridge/angus-g-fix
JDBetteridge Mar 5, 2024
594e87b
Change for MixedMesh implementation (#718)
ksagiyam Apr 3, 2024
eea5523
removed serial case in lgmap.
emmarothwell1 Dec 12, 2023
1b386a4
Added constrained_size to Set and creation of matrix.
emmarothwell1 Jan 5, 2024
17c20a7
layout_vec includes constrained case.
emmarothwell1 Jan 10, 2024
3b28acb
Put serial case back in for DataSet
emmarothwell1 Jan 25, 2024
acbbec9
global kernel _cache_key contains form signature
emmarothwell1 Jan 28, 2024
cd6e8b0
adding constrained size for mixed sets.
emmarothwell1 Feb 20, 2024
f990aab
add constrained size in lgmap for mixeddataset
emmarothwell1 Feb 26, 2024
d3eec81
apply pr suggestions for naming things
emmarothwell1 Mar 6, 2024
7c64679
remove whitespace
emmarothwell1 Apr 21, 2024
4e1bb3c
remove signature from global kernel.
emmarothwell1 Apr 23, 2024
8fa2ff3
Update pyop2/types/set.py
emmarothwell1 Apr 25, 2024
ebbed56
Merge pull request #716 from OP2/emmarothwell1/restricted_function_sp…
ksagiyam Apr 26, 2024
7bef38f
Fix for massively parallel performance regression (#720)
JDBetteridge May 8, 2024
c97a043
Support numpy 2.0
connorjward Apr 11, 2024
a52b998
Merge pull request #721 from OP2/JDBetteridge/numpy2_rebase
JDBetteridge Jun 7, 2024
7f3e8ae
Reset numbering when generating
JDBetteridge Jun 11, 2024
af813e9
Merge pull request #722 from OP2/JDBetteridge/reset_numbering
JDBetteridge Jun 12, 2024
5f18075
composed map: add permute method (#723)
ksagiyam Jun 18, 2024
b84b770
DatView: Fix zero() (#727)
pbrubeck Sep 4, 2024
31471a6
Remove comm hash and add per-comm caches (#724)
JDBetteridge Oct 9, 2024
47f2151
Merge remote-tracking branch 'pyop2/master' into JDBetteridge/merge_p…
JDBetteridge Oct 22, 2024
09a8055
Lint
JDBetteridge Oct 23, 2024
ee3dddd
Remove PyOP2 from install script
JDBetteridge Oct 23, 2024
1485de5
Update checkout version
JDBetteridge Oct 23, 2024
212214c
Moar linting
JDBetteridge Oct 23, 2024
fc70dcd
Remove another instance of PyOP2
JDBetteridge Oct 23, 2024
43efbfe
Rename workflow
JDBetteridge Oct 23, 2024
302c78d
Add more targets to clean
JDBetteridge Oct 23, 2024
09c0be7
Fix setup
JDBetteridge Oct 23, 2024
966aafc
Fix loopy import
JDBetteridge Oct 23, 2024
17d6a89
Move doc
JDBetteridge Oct 23, 2024
d1f74df
Move tests
JDBetteridge Oct 23, 2024
8518390
Stop building out of date PyOP2 docs
JDBetteridge Oct 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto

# Whitespace
* whitespace=tab-in-indent,space-before-tab,trailing-space,tabwidth=2
*.{py,pyx,pxd,pxi} whitespace=tab-in-indent,space-before-tab,trailing-space,tabwidth=4
Makefile whitespace=space-before-tab,trailing-space,tabwidth=2
pyop2/_version.py export-subst
firedrake/_version.py export-subst
107 changes: 107 additions & 0 deletions .github/workflows/pyop2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: PyOP2

# Trigger the workflow on push or pull request,
# but only for the master branch
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest
strategy:
# Don't immediately kill all if one Python version fails
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
env:
CC: mpicc
PETSC_DIR: ${{ github.workspace }}/petsc
PETSC_ARCH: default
PETSC_CONFIGURE_OPTIONS: --with-debugging=1 --with-shared-libraries=1 --with-c2html=0 --with-fortran-bindings=0
RDMAV_FORK_SAFE: 1
PYOP2_CI_TESTS: 1
timeout-minutes: 60

steps:
- name: Install system dependencies
shell: bash
run: |
sudo apt update
sudo apt install build-essential mpich libmpich-dev \
libblas-dev liblapack-dev gfortran

- name: Set correct Python version
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Clone PETSc
uses: actions/checkout@v4
with:
repository: firedrakeproject/petsc
path: ${{ env.PETSC_DIR }}

- name: Build and install PETSc
shell: bash
working-directory: ${{ env.PETSC_DIR }}
run: |
./configure "$PETSC_CONFIGURE_OPTIONS"
make

- name: Build and install petsc4py
shell: bash
working-directory: ${{ env.PETSC_DIR }}/src/binding/petsc4py
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade wheel cython numpy
python -m pip install --no-deps .

- name: Checkout PyOP2
uses: actions/checkout@v4
with:
path: PyOP2

- name: Install PyOP2 dependencies
shell: bash
working-directory: PyOP2
run: |
# xargs is used to force installation of requirements in the order we specified.
xargs -l1 python -m pip install < requirements-ext.txt
xargs -l1 python -m pip install < requirements-git.txt
python -m pip install pulp
python -m pip install -U flake8
python -m pip install -U pytest-timeout

- name: Install PyOP2 (Python <3.12)
if: ${{ matrix.python-version != '3.12' }}
shell: bash
working-directory: PyOP2
run: python -m pip install .

# Not sure if this is a bug in setuptools or something PyOP2 is doing wrong
- name: Install PyOP2 (Python == 3.12)
if: ${{ matrix.python-version == '3.12' }}
shell: bash
working-directory: PyOP2
run: |
python -m pip install -U setuptools
python setup.py install

- name: Run linting
shell: bash
working-directory: PyOP2
run: make lint

- name: Run tests
shell: bash
working-directory: PyOP2
run: |
# Running parallel test cases separately works around a bug in pytest-mpi
pytest -k "not parallel" --tb=native --timeout=480 --timeout-method=thread -o faulthandler_timeout=540 -v tests/pyop2
mpiexec -n 3 pytest -k "parallel[3]" --tb=native --timeout=480 --timeout-method=thread -o faulthandler_timeout=540 -v tests/pyop2
timeout-minutes: 10
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,34 @@ __pycache__/
/firedrake_configuration/configuration.json
/firedrake.egg-info
/docs/source/element_list.csv


# Build
build
dist
MANIFEST
PyOP2.egg-info
*.py[cdo]

# Extension modules
sparsity.so
sparsity.c
sparsity.cpython*.so
# Docs
pyop2.coffee.rst
pyop2.rst
pyop2.pdf
pyop2.aux
pyop2.log

# Testing
.pytest-incremental
.tox
.vagrant

# Meshes
*.edge
*.ele
*.msh
*.node
*.geo
19 changes: 19 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,22 @@ Joe Wallwork <[email protected]>
Jingmin Xia <[email protected]>
Jingmin Xia <[email protected]> <[email protected]>

Gheorghe-Teodor Bercea <[email protected]> <foraker.doc.ic.ac.uk>
George Boutsioukis <[email protected]>
David A Ham <[email protected]>
David A Ham <[email protected]> <[email protected]>
Miklós Homolya <[email protected]>
Nicolas Loriant <[email protected]> <[email protected]>
Nicolas Loriant <[email protected]> <[email protected]>
Nicolas Loriant <[email protected]> <[email protected]>
Nicolas Loriant <[email protected]> <[email protected]>
Nicolas Loriant <[email protected]> <[email protected]>
Fabio Luporini <[email protected]> <[email protected]>
Graham Markall <[email protected]> <[email protected]>
Graham Markall <[email protected]> <[email protected]>
Andrew McRae <[email protected]> <[email protected]>
Andrew McRae <[email protected]> <[email protected]>
Lawrence Mitchell <[email protected]> <[email protected]>
Lawrence Mitchell <[email protected]> <[email protected]>
Kaho Sato <[email protected]>
Reuben W. Nixon-Hill <[email protected]> <[email protected]>
24 changes: 24 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
PyOP2 has received contributions from the following:

Institutions
------------

Imperial College London
The University of Edinburgh

Individuals
-----------

Gheorghe-Teodor Bercea <[email protected]>
Simon Funke <[email protected]>
Ben Grabham <[email protected]>
David A Ham <[email protected]>
Nicolas Loriant <[email protected]>
Fabio Luporini <[email protected]>
Graham Markall <[email protected]>
Lawrence Mitchell <[email protected]>
Florian Rathgeber <[email protected]>
Francis Russell <[email protected]>
Kaho Sato <[email protected]>
Reuben W. Nixon-Hill <[email protected]>
Nacime Bouziani <[email protected]>
60 changes: 60 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Contributing to PyOP2

We value third-party contributions. To keep things simple for you and us,
please adhere to the following contributing guidelines.

## Getting Started

* You will need a [GitHub account](https://github.com/signup/free).
* Submit a [ticket for your issue][0], assuming one does not already exist.
* Clearly describe the issue including steps to reproduce when it is a bug.
* Make sure you specify the version that you know has the issue.
* Bonus points for submitting a failing test along with the ticket.
* If you don't have push access, fork the repository on GitHub.

## Making Changes

* Create a topic branch for your feature or bug fix.
* Make commits of logical units.
* Make sure your commits adhere to the coding guidelines below.
* Make sure your commit messages are in the [proper format][1]: The first line
of the message should have 50 characters or less, separated by a blank line
from the (optional) body. The body should be wrapped at 70 characters and
paragraphs separated by blank lines. Bulleted lists are also fine.
* Make sure you have added the necessary tests for your changes.
* Run _all_ the tests to assure nothing else was accidentally broken.

## Coding guidelines

[PEP 0008][2] is enforced, with the exception of [E501][3] and [E226][3]:
* Indent by 4 spaces, tabs are *strictly forbidden*.
* Lines should not exceed 79 characters where possible without severely
impacting legibility. If breaking a line would make the code much less
readable it's fine to overrun by a little bit.
* No trailing whitespace at EOL or trailing blank lines at EOF.

## Checking your commit conforms to coding guidelines

Install a Git pre-commit hook automatically checking for tab and whitespace
errors before committing and also calls `flake8` on your changed files. In the
`.git/hooks` directory of your local Git repository, run the following:

```
git config --local core.whitespace "space-before-tab, tab-in-indent, trailing-space, tabwidth=4"
wget https://gist.github.com/kynan/d233073b66e860c41484/raw/pre-commit
chmod +x pre-commit
```

Make sure the `pre-commit.sample` hook is still in place, since it is required.

## Submitting Changes

* We can only accept your contribution if you have signed the Contributor
License Agreement (CLA).
* Push your changes to a topic branch in your fork of the repository.
* Submit a pull request to the repository in the OP2 organization.

[0]: https://github.com/OP2/PyOP2/issues
[1]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[2]: http://www.python.org/dev/peps/pep-0008/
[3]: http://pep8.readthedocs.org/en/latest/intro.html#error-codes
31 changes: 31 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Firedrake:
Firedrake is free software: you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
Expand All @@ -11,3 +12,33 @@ License for more details.
You should have received a copy of the GNU Lesser General Public
License along with Firedrake. If not, see <http://www.gnu.org/licenses/>.

PyOP2:
Copyright (c) 2012, Imperial College London and others. Please see the
AUTHORS file in the main source directory for a full list of copyright
holders. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* The name of Imperial College London or that of other
contributors may not be used to endorse or promote products
derived from this software without specific prior written
permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTERS
''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
include versioneer.py
include firedrake/_version.py
recursive-include pyop2 *.c
include pyop2/_version.py

74 changes: 74 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ clean:
-@rm -f firedrake/cython/mg/impl.so > /dev/null 2>&1
@echo " RM firedrake/cython/mg/impl.c"
-@rm -f firedrake/cython/mg/impl.c > /dev/null 2>&1
@echo " RM pyop2/*.so"
-@rm -f pyop2/*.so > /dev/null 2>&1
@echo " RM tinyasm/*.so"
-@rm -f tinyasm/*.so > /dev/null 2>&1


THREADS=1
Expand Down Expand Up @@ -95,3 +99,73 @@ alltest: modules lint test
shorttest: modules lint
@echo " Running short regression tests"
@python -m pytest --short tests $(PYTEST_ARGS)

# PyOP2 Makefile
# PYTEST = py.test
#
# TEST_BASE_DIR = test
#
# UNIT_TEST_DIR = $(TEST_BASE_DIR)/unit
#
# SPHINX_DIR = doc/sphinx
# SPHINX_BUILD_DIR = $(SPHINX_DIR)/build
# SPHINX_TARGET = html
# SPHINX_TARGET_DIR = $(SPHINX_BUILD_DIR)/$(SPHINX_TARGET)
# SPHINXOPTS = -a
#
# PORT = 8000
#
# MESHES_DIR = demo/meshes
#
# GIT_REV = $(shell git rev-parse --verify --short HEAD)
#
# all: ext
#
# .PHONY : help test lint unit doc update_docs ext ext_clean meshes
#
# help:
# @echo "make COMMAND with COMMAND one of:"
# @echo " test : run lint and unit tests"
# @echo " lint : run flake8 code linter"
# @echo " unit : run unit tests"
# @echo " unit_BACKEND : run unit tests for BACKEND"
# @echo " doc : build sphinx documentation"
# @echo " serve : launch local web server to serve up documentation"
# @echo " update_docs : build sphinx documentation and push to GitHub"
# @echo " ext : rebuild Cython extension"
# @echo " ext_clean : delete generated extension"
# @echo " meshes : download demo meshes"
# @echo
# @echo "Available OpenCL contexts: $(OPENCL_CTXS)"
#
# test: lint unit
#
# lint:
# @flake8
#
# unit:
# cd $(TEST_BASE_DIR); $(PYTEST) unit
#
# doc:
# make -C $(SPHINX_DIR) $(SPHINX_TARGET) SPHINXOPTS=$(SPHINXOPTS)
#
# serve:
# make -C $(SPHINX_DIR) livehtml
#
# update_docs:
# if [ ! -d $(SPHINX_TARGET_DIR)/.git ]; then \
# mkdir -p $(SPHINX_BUILD_DIR); \
# cd $(SPHINX_BUILD_DIR); git clone `git config --get remote.origin.url` $(SPHINX_TARGET); \
# fi
# cd $(SPHINX_TARGET_DIR); git fetch -p; git checkout -f gh-pages; git reset --hard origin/gh-pages
# make -C $(SPHINX_DIR) $(SPHINX_TARGET) SPHINXOPTS=$(SPHINXOPTS)
# cd $(SPHINX_TARGET_DIR); git add .; git commit -am "Update documentation to revision $(GIT_REV)"; git push origin gh-pages
#
# ext: ext_clean
# python setup.py build_ext -i
#
# ext_clean:
# rm -rf build pyop2/compute_ind.c pyop2/compute_ind.so pyop2/sparsity.c pyop2/sparsity.so
#
# meshes:
# make -C $(MESHES_DIR) meshes
2 changes: 2 additions & 0 deletions docs/source/old_pyop2/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
all:
pdflatex pyop2.tex
Loading
Loading