Skip to content

Commit

Permalink
Merge pull request #82 from inducer/github-conda-ci-with-mpi4py
Browse files Browse the repository at this point in the history
Github Conda CI: Run with mpi4py
  • Loading branch information
inducer committed Nov 18, 2020
2 parents 535dbce + 6d815e5 commit 2c33c8d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,15 @@ jobs:
- name: "Main Script"
run: |
sudo apt update
sudo apt install octave
sudo apt install octave openmpi-bin libopenmpi-dev
CONDA_ENVIRONMENT=.test-conda-env-py3.yml
export MPLBACKEND=Agg
curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project-within-miniconda.sh
. ./build-and-test-py-project-within-miniconda.sh
curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/ci-support.sh
. ./ci-support.sh
build_py_project_in_conda_env
with_echo python -m pip install mpi4py
test_py_project
firedrake:
name: Pytest Firedrake
Expand Down
1 change: 1 addition & 0 deletions .test-conda-env-py3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dependencies:
- python=3
- git
- numpy
- libhwloc=1
- pocl
- mako
- pyopencl
Expand Down
23 changes: 10 additions & 13 deletions meshmode/discretization/connection/projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,16 @@ def kproj():
def keval():
return make_loopy_program([
"{[iel]: 0 <= iel < nelements}",
"{[idof]: 0 <= idof < n_to_nodes}"
"{[idof]: 0 <= idof < n_to_nodes}",
"{[ibasis]: 0 <= ibasis < n_to_nodes}"
],
"""
result[iel, idof] = result[iel, idof] + \
coefficients[iel, ibasis] * basis[idof]
sum(ibasis, vdm[idof, ibasis] * coefficients[iel, ibasis])
""",
[
lp.GlobalArg("coefficients", None,
shape=("nelements", "n_to_nodes")),
lp.ValueArg("ibasis", np.int32),
"..."
],
name="conn_evaluate_knl")
Expand Down Expand Up @@ -210,16 +210,13 @@ def keval():
# evaluate at unit_nodes to get the vector on to_discr
result = self.to_discr.zeros(actx, dtype=ary.entry_dtype)
for igrp, grp in enumerate(self.to_discr.groups):
for ibasis, basis_fn in enumerate(grp.basis()):
basis = actx.from_numpy(
basis_fn(grp.unit_nodes).flatten())

actx.call_loopy(
keval(),
ibasis=ibasis,
result=result[grp.index],
basis=basis,
coefficients=c[grp.index])
from modepy import vandermonde
vdm = actx.from_numpy(vandermonde(grp.basis(), grp.unit_nodes))
actx.call_loopy(
keval(),
result=result[grp.index],
vdm=vdm,
coefficients=c[grp.index])

return result

Expand Down

0 comments on commit 2c33c8d

Please sign in to comment.