DO NOT SQUASH Add PyOP2 to Firedrake repository#3817
Conversation
Make PETSc and petsc4py for CI use Firedrake not pip
actions: Build docs at end of successful test run
* Change requirements on loopy to point at the loopy sprint branch. * Replace lp.register_callable_kernel with lp.merge knl = lp.register_callable_kernel(knl, callee) is now knl = lp.merge([knl, callee]) . Reason given for loopy breaking back-compat: earlier they had a notion of a special "root_kernel" which only permitted one level of nesting loopy kernel calls and that was too restrictive. * Loopy callables: adapt to new API for registering. * Loopy Callables: register callables on a kernel not functions. * name is static property on SolveCallable and INVCallable * Loopy callables: register the callables rather than functions and remove the lookup functions. * Some progress * Loopy callables: Adapt API of with_types. * INVCallable has name "inverse" in loopy rep * Always pass a target when generating loopy kernels, otherwise we cannot merge them with wrapper kernels. * flake8 * Maybe generate call to inner kernel correctly Still doesn't work later. * Revert "Maybe generate call to inner kernel correctly" This reverts commit 009ca19f3fb133d53affeab53cd016c9b55620a9. * Revert "Revert "Maybe generate call to inner kernel correctly"" This reverts commit c85b60e6382b4762076b2744227fa5a6d903b830. * Remove dead code * rep2loopy: get name of callee kernel for matching the args. * Add missing code target * Maybe handle loopy argument access correctly dat.zero still doesn't work * Promote dats with shape (n,) to shape (n, 1) This enables sweeping indices to pick up a direct loop. * Set lang_version on all make_function calls * Fix disjoint arguments to C-string kernels * Resolve review comments * Rename function_args -> kernel_parameters * WIP Match args for all kernels in the callables table besides for LACallables? Why? * Only match args for callables that are CallableKernels. * Pin decorator Decorator version 5 changes the API in ways that break the argument type checking in PyOP2. We're therefore pinning on the version that works. * catch up with numpy type changes * Set within_inames_is_final on instructions * Squash numpy warning * Set strides on GlobalArgs * Caching: produce key for loop Programs. * Check if kernel is a loopy Program. * loopy.program.Program -> loopy.Program * Adapt to loopy interface changes. * Maintain loopy automatic reshaping (was in loopy) Everything in loopycompat.py file was in loopy/transform/callable.py but is removed in inducer/loopy#327. This commit maintains compatibility but should be phased out. * Fix loopy.program -> loopy.translation_unit * dont lint automatic reshaping (was in loopy) * Lint to pass flake8 * Fix loopy automatic reshaping (was in loopy) Changes were copied from an out of date branch by accident. * Fix type case error (recursively) This mirrors inducer/loopy#326 * ? Maybe fix the last dimension error mismatch. Not sure this will break things in other places. * Codegen: Don't merge indices of extent 1, so that the instructions are schedulable. This will fix e.g. the failure of tests/extrusion/test_steady_advection_2D_extr.py * Testing: Update loopy branch * Squashed commit of the following: commit 5a89bfc Author: Connor Ward <c.ward20@imperial.ac.uk> Date: Mon May 10 10:44:33 2021 +0100 Use Firedrake PETSc and petsc4py commit 948cb7d Author: David Ham <David.Ham@imperial.ac.uk> Date: Wed Apr 21 13:30:50 2021 +0100 Pin decorator Decorator version 5 changes the API in ways that break the argument type checking in PyOP2. We're therefore pinning on the version that works. commit 121c2a6 Author: David Ham <David.Ham@imperial.ac.uk> Date: Wed Apr 21 13:45:58 2021 +0100 catch up with numpy type changes * Revert "Squashed commit of the following:" This reverts commit bd1916142f883d6a4f0371ca6de2c344f0c7e78a. * Squashed commit of the following: commit 9a90c9f Merge: f1daf21 c8d7ff6 Author: Lawrence Mitchell <lawrence@wence.uk> Date: Tue May 11 12:07:33 2021 +0100 Merge pull request #618 from OP2/wence/fix/actions-doc-build actions: Build docs at end of successful test run commit c8d7ff6 Author: Lawrence Mitchell <lawrence@wence.uk> Date: Tue May 11 11:41:20 2021 +0100 actions: Build docs at end of successful test run commit f1daf21 Merge: d0cc348 5a89bfc Author: Lawrence Mitchell <lawrence@wence.uk> Date: Mon May 10 20:32:24 2021 +0100 Merge pull request #617 from connorjward/test-ci Make PETSc and petsc4py for CI use Firedrake not pip commit 5a89bfc Author: Connor Ward <c.ward20@imperial.ac.uk> Date: Mon May 10 10:44:33 2021 +0100 Use Firedrake PETSc and petsc4py commit 948cb7d Author: David Ham <David.Ham@imperial.ac.uk> Date: Wed Apr 21 13:30:50 2021 +0100 Pin decorator Decorator version 5 changes the API in ways that break the argument type checking in PyOP2. We're therefore pinning on the version that works. commit 121c2a6 Author: David Ham <David.Ham@imperial.ac.uk> Date: Wed Apr 21 13:45:58 2021 +0100 catch up with numpy type changes * Lint. * Jenkins * Make import global. * Drop package branches. Co-authored-by: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Co-authored-by: Lawrence Mitchell <lawrence@wence.uk> Co-authored-by: Connor Ward <c.ward20@imperial.ac.uk> Co-authored-by: David Ham <David.Ham@imperial.ac.uk> Co-authored-by: Kaushik Kulkarni <kaushikcfd@gmail.com>
Something like this will be necessary if we want general symmetry group stuff in the maps. It is also convenient if you want to stage in a permutation from the canonical FIAT order.
Instead of pattern matching on node names to determine whether nodes should be relabelled, just use a name generation scheme for everything. Now we have one less problem.
Add PETSc decorator to compile
More loopy interface changes: arg_id_to_val -> arg_id_to_arg
* Add petsc_raises fixture to catch PETSc callback exceptions
* Fix assembly of Real matrices
* Refactor test_demos, avoid mpiexec invocation * Fix multigrid test, __main__ is not valid when importing
* Get value_shape from FunctionSpace * Define FunctionSpace.block_size as the number of dofs per node * sort_domains --------- Co-authored-by: ksagiyam <k.sagiyama@imperial.ac.uk>
* DO NOT MERGE * Test VOM with point variant * Update .github/workflows/build.yml * Test Regge point variant * add continuity test * Test H(curl div) element (#3843) * Test H(curl div) element * test Hu-Zhang * checkout ufl master branch * checkout master branches
Signed-off-by: Umberto Zerbinati <zerbinati@maths.ox.ac.uk> Co-authored-by: Umberto Zerbinati <zerbinati@maths.ox.ac.uk>
* Disk checkpointing managing start, pause and continue checkpointing. * AdjointDiskCheckpoint --------- Co-authored-by: David A. Ham <david.ham@imperial.ac.uk>
* Moves PyOP2 code into Firedrake repository. * Adds a pyproject.toml for Firedrake * Enables (with some caveats) one to `pip install firedrake`! * Adds a new pip workflow to make sure things work * Moves Firedrake tests into a `tests/firedrake` subdirectory.
463eb23 to
1bceac4
Compare
|
I did a clean install using the branch. Wanted to test
|
Thanks for noticing this. Will fix ASAP.
Specifically what failed? I thought I tried this and things worked. |
|
But that's not what I have... https://github.com/firedrakeproject/firedrake/pull/3817/files#diff-e86a30193cf50f52a86c9839c05da17a3f06c2ff5d082571efc52644f7f79771L1407-R1400 Strange. I think that running |
|
To be clear, I installed current firedrake/scripts/firedrake-install Line 1407 in b783253 |
01273f3 to
8bcb96f
Compare
Ah I see. This is a case I had not (and certainly should have) considered. |
Description
The big merge!
Closes #3877
Key changes introduced by this PR
tests/firedrakesubdirectorypyproject.tomlpip install git+https://github.com/firedrakeproject/firedrake.gitbecomes a viable install method (subject to setting a number of environment variables). This ultimately will be our path to a Firedrake wheel.firedrake_configuration. The information is all accessible by inspecting PETSc variables.Outstanding tasks
firedrake-install,firedrake-update,firedrake-statusandfiredrake-cleanpass locally (these are not fully tested in the CI).git rebase -ito try and keep a clean history.firedrake-zenodoas PyOP2 repo is going away.Following feedback
firedrake-updateusing an existing installationfiredrake-zenodoshould be foundFuture work
pip install libsupermesh(nearly ready to go: JDBetteridge/pip install libsupermesh#10)