From 85a4f0c0c2c7662d0efe30eeeb4884b2b5c53d78 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Fri, 4 Sep 2020 20:16:51 -0500 Subject: [PATCH 1/5] remove unused iname in kernel --- meshmode/discretization/connection/direct.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshmode/discretization/connection/direct.py b/meshmode/discretization/connection/direct.py index 1626ffec..b9dede9d 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 Date: Fri, 4 Sep 2020 22:32:21 -0500 Subject: [PATCH 2/5] Refactor Firedrake CI for less code duplication, install pybind 11 --- .ci/install-for-firedrake.sh | 19 +++++++++++ .../run_firedrake_examples.sh | 0 .github/workflows/ci.yml | 33 ++----------------- .gitlab-ci.yml | 18 ++-------- 4 files changed, 24 insertions(+), 46 deletions(-) create mode 100644 .ci/install-for-firedrake.sh rename {.github/workflows => .ci}/run_firedrake_examples.sh (100%) diff --git a/.ci/install-for-firedrake.sh b/.ci/install-for-firedrake.sh new file mode 100644 index 00000000..4b25ba82 --- /dev/null +++ b/.ci/install-for-firedrake.sh @@ -0,0 +1,19 @@ +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 -r /tmp/myreq.txt +pip install --force-reinstall git+https://github.com/benSepanski/loopy.git@firedrake-usable_for_potentials 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 431dd499..9bf5fe81 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,21 +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 + . .ci/install-for-firedrake.sh # The Firedrake container is based on Py3.6 as of 2020-10-10, which # doesn't have dataclasses. pip install pytest dataclasses @@ -72,29 +60,14 @@ 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 + . .ci/install-for-firedrake.sh pip install . - 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 9b3049ce..7ed111cf 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,8 +66,7 @@ Python 3 POCL Firedrake Examples: - "docker-runner" image: "firedrakeproject/firedrake" script: - - *firedrake_setup - # run examples + - .ci/install-for-firedrake.sh - . ./.github/workflows/run_firedrake_examples.sh artifacts: reports: -- GitLab From 26deb45afad8d4dfec294538e19bfbce843ea8fe Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sat, 5 Sep 2020 00:35:45 -0500 Subject: [PATCH 3/5] Reflect example runner script move in Gitlab CI script --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7ed111cf..01e2773c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,7 +67,7 @@ Python 3 POCL Firedrake Examples: image: "firedrakeproject/firedrake" script: - .ci/install-for-firedrake.sh - - . ./.github/workflows/run_firedrake_examples.sh + - . ./.ci/run_firedrake_examples.sh artifacts: reports: junit: test/pytest.xml -- GitLab From 97e71945e0030e5a0642e8f84d2afb2a3d7a119d Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sat, 5 Sep 2020 00:37:45 -0500 Subject: [PATCH 4/5] Gitlab CI: Source Firedrake install script --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 01e2773c..31ce117e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,7 +54,7 @@ Python 3 POCL Firedrake: - "docker-runner" image: "firedrakeproject/firedrake" script: - - .ci/install-for-firedrake.sh + - . .ci/install-for-firedrake.sh - cd test - python -m pytest --tb=native --junitxml=pytest.xml -rxsw test_firedrake_interop.py artifacts: @@ -66,7 +66,7 @@ Python 3 POCL Firedrake Examples: - "docker-runner" image: "firedrakeproject/firedrake" script: - - .ci/install-for-firedrake.sh + - . .ci/install-for-firedrake.sh - . ./.ci/run_firedrake_examples.sh artifacts: reports: -- GitLab From c1892097857830c3bda08ec932f57921ebb09c26 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sat, 5 Sep 2020 09:06:30 -0500 Subject: [PATCH 5/5] Add missing 'pip install .' and 'pip install pytest' to shared for-Fdrake install script --- .ci/install-for-firedrake.sh | 3 +++ .github/workflows/ci.yml | 5 ----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.ci/install-for-firedrake.sh b/.ci/install-for-firedrake.sh index 4b25ba82..44aeb02f 100644 --- a/.ci/install-for-firedrake.sh +++ b/.ci/install-for-firedrake.sh @@ -15,5 +15,8 @@ pip install pybind11 # 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/ci.yml b/.github/workflows/ci.yml index 9bf5fe81..5ad711b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,10 +43,6 @@ jobs: - name: "Dependencies" run: | . .ci/install-for-firedrake.sh - # The Firedrake container is based on Py3.6 as of 2020-10-10, which - # doesn't have dataclasses. - pip install pytest dataclasses - pip install . - name: "Test" run: | . /home/firedrake/firedrake/bin/activate @@ -63,7 +59,6 @@ jobs: - name: "Dependencies" run: | . .ci/install-for-firedrake.sh - pip install . - name: "Examples" run: | . /home/firedrake/firedrake/bin/activate -- GitLab