Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ pyop2.log
*.node
*.geo
!cdisk.geo
/test/regression/tests/**/*.out
18 changes: 3 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ TEST_BASE_DIR = test

UNIT_TEST_DIR = $(TEST_BASE_DIR)/unit

REGRESSION_TEST_DIR = $(TEST_BASE_DIR)/regression

BACKENDS ?= sequential opencl openmp cuda
OPENCL_ALL_CTXS := $(shell scripts/detect_opencl_devices)
OPENCL_CTXS ?= $(OPENCL_ALL_CTXS)
Expand All @@ -25,16 +23,14 @@ GIT_REV = $(shell git rev-parse --verify --short HEAD)

all: ext

.PHONY : help test lint unit regression doc update_docs ext ext_clean meshes
.PHONY : help test lint unit doc update_docs ext ext_clean meshes

help:
@echo "make COMMAND with COMMAND one of:"
@echo " test : run lint, unit and regression tests"
@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 " regression : run regression tests"
@echo " regression_BACKEND : run regression 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"
Expand All @@ -44,7 +40,7 @@ help:
@echo
@echo "Available OpenCL contexts: $(OPENCL_CTXS)"

test: lint unit regression
test: lint unit

lint:
@flake8
Expand All @@ -57,14 +53,6 @@ unit_%:
unit_opencl:
cd $(UNIT_TEST_DIR); for c in $(OPENCL_CTXS); do PYOPENCL_CTX=$$c $(PYTEST) --backend=opencl; done

regression: $(foreach backend,$(BACKENDS), regression_$(backend))

regression_%:
cd $(REGRESSION_TEST_DIR); $(PYTEST) --backend=$*

regression_opencl:
cd $(REGRESSION_TEST_DIR); for c in $(OPENCL_CTXS); do PYOPENCL_CTX=$$c $(PYTEST) --backend=opencl; done

doc:
make -C $(SPHINX_DIR) $(SPHINX_TARGET) SPHINXOPTS=$(SPHINX_OPTS) APIDOCOPTS=$(APIDOC_OPTS)

Expand Down
39 changes: 2 additions & 37 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -320,21 +320,6 @@ When installing PyOP2 via ``python setup.py install`` the extension
modules will be built automatically and amending ``$PYTHONPATH`` is not
necessary.

FFC Interface
-------------

Solving UFL_ finite element equations requires a fork of FFC_, UFL_
and FIAT_. Note that FFC_ requires a version of Instant_.

Install FFC_ and all dependencies via pip::

sudo pip install \
git+https://bitbucket.org/mapdes/ffc.git#egg=ffc
git+https://bitbucket.org/mapdes/ufl.git#egg=ufl
git+https://bitbucket.org/mapdes/fiat.git#egg=fiat
git+https://bitbucket.org/fenics-project/instant.git#egg=instant
hg+https://bitbucket.org/khinsen/scientificpython

Setting up the environment
--------------------------

Expand All @@ -347,12 +332,6 @@ definitions as necessary::
export PETSC_DIR=/path/to/petsc
export PETSC_ARCH=linux-gnu-c-opt

#Add UFL and FFC to PYTHONPATH if in non-standard location
export UFL_DIR=/path/to/ufl
export FFC_DIR=/path/to/ffc
export PYTHONPATH=$UFL_DIR:$FFC_DIR:$PYTHONPATH
# Add any other Python module in non-standard locations

#Add PyOP2 to PYTHONPATH
export PYTHONPATH=/path/to/PyOP2:$PYTHONPATH

Expand Down Expand Up @@ -383,19 +362,12 @@ following to ``~/.bashrc`` or ``.env``::
# Add pytest binaries to the path
export PATH=${PATH}:${HOME}/.local/bin

The regression tests further require *gmsh* and *triangle*: ::

sudo apt-get install gmsh triangle-bin unzip

If all tests in our test suite pass, you should be good to go::

make test

This will run both unit and regression tests, the latter require UFL_ and FFC_.

This will attempt to run tests for all backends and skip those for not
available backends. If the FFC_ fork is not found, tests for the FFC_ interface
are xfailed.
This will run code linting and unit tests, attempting to run for all backends
and skipping those for not available backends.

Troubleshooting
---------------
Expand All @@ -418,17 +390,10 @@ Start with the unit tests with the sequential backend ::

py.test test/unit -vsx --tb=short --backend=sequential

Then move on to the regression tests with the sequential backend ::

py.test test/regression -vsx --tb=short --backend=sequential

With all the sequential tests passing, move on to the next backend in the same
manner as required.

.. _PPA: https://launchpad.net/~amcg/+archive/petsc3.4/
.. _PETSc: http://www.mcs.anl.gov/petsc/
.. _petsc4py: http://pythonhosted.org/petsc4py/
.. _FFC: https://bitbucket.org/mapdes/ffc
.. _FIAT: https://bitbucket.org/mapdes/fiat
.. _UFL: https://bitbucket.org/mapdes/ufl
.. _Instant: https://bitbucket.org/fenics-project/instant
Empty file removed demo/__init__.py
Empty file.
246 changes: 0 additions & 246 deletions demo/adv_diff.py

This file was deleted.

Loading