diff --git a/.ci/install-for-firedrake.sh b/.ci/install-for-firedrake.sh new file mode 100644 index 0000000000000000000000000000000000000000..44aeb02f4ef03b404317bd3a54fbca45bc47ad70 --- /dev/null +++ b/.ci/install-for-firedrake.sh @@ -0,0 +1,22 @@ +sudo chown -R $(whoami) /github/home || true +sudo apt update +sudo apt upgrade -y +sudo apt install time +sudo apt install -y pocl-opencl-icd ocl-icd-opencl-dev + +. /home/firedrake/firedrake/bin/activate +grep -v loopy requirements.txt > /tmp/myreq.txt + +# This shouldn't be necessary, but... +# https://github.com/inducer/meshmode/pull/48#issuecomment-687519451 +pip install pybind11 + +# The Firedrake container is based on Py3.6 as of 2020-10-10, which +# doesn't have dataclasses. +pip install dataclasses + +pip install pytest + +pip install -r /tmp/myreq.txt +pip install --force-reinstall git+https://github.com/benSepanski/loopy.git@firedrake-usable_for_potentials +pip install . diff --git a/.github/workflows/run_firedrake_examples.sh b/.ci/run_firedrake_examples.sh similarity index 100% rename from .github/workflows/run_firedrake_examples.sh rename to .ci/run_firedrake_examples.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 431dd49949670329def15eba9cf5a69af39151d8..5ad711b28b25996efda7f65caf5c867ae1bd40ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,25 +40,9 @@ jobs: image: 'firedrakeproject/firedrake' steps: - uses: actions/checkout@v1 - # This Dependencies setup is the same setup used for running firedrake - # examples, but had to be copied since github doesn't support yaml - # anchors. Changes made here should also be made there - name: "Dependencies" run: | - sudo apt update - sudo apt upgrade -y - sudo apt install time - sudo apt install -y pocl-opencl-icd ocl-icd-opencl-dev - sudo chown -R $(whoami) /github/home - - . /home/firedrake/firedrake/bin/activate - grep -v loopy requirements.txt > /tmp/myreq.txt - pip install -r /tmp/myreq.txt - pip install --force-reinstall git+https://github.com/benSepanski/loopy.git@firedrake-usable_for_potentials - # The Firedrake container is based on Py3.6 as of 2020-10-10, which - # doesn't have dataclasses. - pip install pytest dataclasses - pip install . + . .ci/install-for-firedrake.sh - name: "Test" run: | . /home/firedrake/firedrake/bin/activate @@ -72,29 +56,13 @@ jobs: image: 'firedrakeproject/firedrake' steps: - uses: actions/checkout@v1 - # This Dependencies setup is the same setup used for running firedrake - # tests, but had to be copied since github doesn't support yaml - # anchors. Changes made here should also be made there - name: "Dependencies" run: | - sudo apt update - sudo apt upgrade -y - sudo apt install time - sudo apt install -y pocl-opencl-icd ocl-icd-opencl-dev - sudo chown -R $(whoami) /github/home - - . /home/firedrake/firedrake/bin/activate - grep -v loopy requirements.txt > /tmp/myreq.txt - pip install -r /tmp/myreq.txt - pip install --force-reinstall git+https://github.com/benSepanski/loopy.git@firedrake-usable_for_potentials - # The Firedrake container is based on Py3.6 as of 2020-10-10, which - # doesn't have dataclasses. - pip install pytest dataclasses - pip install . + . .ci/install-for-firedrake.sh - name: "Examples" run: | . /home/firedrake/firedrake/bin/activate - . ./.github/workflows/run_firedrake_examples.sh + . ./.ci/run_firedrake_examples.sh examples3: name: Examples Conda Py3 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9b3049cea75665108905349561c2e7a4a6b92c28..31ce117e663f422c3e31fb183043dccc7a0b1872 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,20 +54,7 @@ Python 3 POCL Firedrake: - "docker-runner" image: "firedrakeproject/firedrake" script: - - &firedrake_setup | - sudo apt update - sudo apt upgrade -y - sudo apt install time - sudo apt install -y pocl-opencl-icd ocl-icd-opencl-dev - source ~/firedrake/bin/activate - grep -v loopy requirements.txt > myreq.txt - pip install -r myreq.txt - pip install --force-reinstall git+https://github.com/benSepanski/loopy.git@firedrake-usable_for_potentials - # The Firedrake container is based on Py3.6 as of 2020-10-10, which - # doesn't have dataclasses. - pip install pytest dataclasses - pip install . - # run tests + - . .ci/install-for-firedrake.sh - cd test - python -m pytest --tb=native --junitxml=pytest.xml -rxsw test_firedrake_interop.py artifacts: @@ -79,9 +66,8 @@ Python 3 POCL Firedrake Examples: - "docker-runner" image: "firedrakeproject/firedrake" script: - - *firedrake_setup - # run examples - - . ./.github/workflows/run_firedrake_examples.sh + - . .ci/install-for-firedrake.sh + - . ./.ci/run_firedrake_examples.sh artifacts: reports: junit: test/pytest.xml diff --git a/meshmode/discretization/connection/direct.py b/meshmode/discretization/connection/direct.py index 1626ffec8ebbe369f621f404e6b031f1c6034354..b9dede9d494deb9d2767f4b252e7b6b073752c4f 100644 --- a/meshmode/discretization/connection/direct.py +++ b/meshmode/discretization/connection/direct.py @@ -288,7 +288,7 @@ class DirectDiscretizationConnection(DiscretizationConnection): (DirectDiscretizationConnection, "resample_by_picking_knl")) def pick_knl(): knl = make_loopy_program( - """{[iel, idof, j]: + """{[iel, idof]: 0<=iel