Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini authored Feb 21, 2018
1 parent 6de44c0 commit 6896b27
Showing 1 changed file with 24 additions and 32 deletions.
56 changes: 24 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
![Build Status](https://travis-ci.org/opesci/devito.svg?branch=master)
![Code Coverage](https://codecov.io/gh/opesci/devito/branch/master/graph/badge.svg)

[Devito](http://www.opesci.org/devito-public) is a tool to
perform optimised finite difference (FD) computation from
[Devito](http://www.opesci.org/devito-public) is a software to
implement optimised finite difference (FD) computation from
high-level symbolic problem definitions. Starting from symbolic
equations defined in [SymPy](http://www.sympy.org/en/index.html),
Devito employs automated code generation and just-in-time (JIT)
Expand All @@ -27,10 +27,10 @@ The recommended way to install Devito uses the Conda package manager
for installation of the necessary software dependencies. Please
install either [Anaconda](https://www.continuum.io/downloads) or
[Miniconda](https://conda.io/miniconda.html) using the instructions
provided at the download links.
provided at the download links. You will need the Python 3.6 version.

To install the editable development version Devito, including examples,
tests and tutorial notebooks, please run the following commands:
To install Devito, including examples, tests and tutorial notebooks,
follow these simple passes:
```
git clone https://github.com/opesci/devito.git
cd devito
Expand All @@ -39,38 +39,31 @@ source activate devito
pip install -e .
```

If you don't want to use the Conda environment manager, Devito can
also be installed directly from GitHub via pip:
```
pip install --user git+https://github.com/opesci/devito.git
```

## Examples

At the core of the Devito API are the so-called `Operator` objects that
allow users to create efficient FD kernels from SymPy expressions.
Examples of how to configure operators are provided:
At the core of the Devito API are the so-called `Operator` objects, which
allow the creation and execution of efficient FD kernels from SymPy
expressions. Examples of how to define operators are provided:

* A set of introductory notebook tutorials introducing the basic
features of Devito operators can be found under
`examples/cfd`. These tutorials cover a range of well-known examples
from Computation Fluid Dynamics (CFD) and are based on the excellent
from Computational Fluid Dynamics (CFD) and are based on the excellent
introductory blog ["CFD Python:12 steps to
Navier-Stokes"](http://lorenabarba.com/blog/cfd-python-12-steps-to-navier-stokes/)
by the Lorena A. Barba group. To run these, simply go into the tutorial
directory and run `jupyter notebook`.
* A set of tutorial notebooks for seismic inversion examples is currently
under construction in `examples/acoustic/tutorials`. We will add to these
in the near future to provide more complex examples of how to use Devito
operators for seismic imaging algorithms.
* A set of tutorial notebooks for seismic inversion examples is available in
`examples/seismic/tutorials`.
* Example implementations of acoustic forward, adjoint, gradient and born
operators for use in full-waveform inversion (FWI) methods can be found in
`examples/acoustic`.
* An advanced example of a Tilted Transverse Isotropy forward operator
for use in FWI can be found in `examples/tti`.
* A benchmark example for the acoustic and TTI forward operators can be
* A benchmark script for the acoustic and TTI forward operators can be
found in `examples/benchmark.py`


## Compilation

Devito's JIT compiler engine supports multiple backends, with provided
Expand All @@ -81,39 +74,38 @@ the following values:
* `gcc` or `gnu` - Standard GNU compiler toolchain
* `clang` or `osx` - Mac OSX compiler toolchain via `clang`
* `intel` or `icpc` - Intel compiler toolchain via `icpc`
* `intel-mic` or `mic` - Intel Xeon Phi using offload mode via the
`pymic` package

Thread parallel execution via OpenMP can also be enabled by setting
`DEVITO_OPENMP=1`.

For a full list of the available environment variables and their
possible values, simply execute:
For the full list of available environment variables and their
possible values, simply run:
```
from devito import print_defaults
print_defaults()
```

## Performance optimizations

Devito supports two classes of code optimizations, which are essential
Devito supports two classes of performance optimizations, which are essential
in a wide range of real-life kernels:
* Flop-count optimizations - They aim to reduce the operation count of an FD
kernel. These include, for example, code motion, factorization, and
detection of cross-stencil redundancies. The flop-count optimizations
are performed by routines built on top of SymPy, which logically belong
to the Devito Symbolic Engine (DSE), a sub-module of Devito.
are performed by routines built on top of SymPy, implemented in the
Devito Symbolic Engine (DSE), a sub-module of Devito.
* Loop optimizations - Examples include SIMD vectorization and parallelism
(via code annotations) and loop blocking. These are performed by the Devito
Loop Engine (DLE), a sub-module consisting of a sequence of compiler passes
manipulating abstract syntax trees. Some existing stencil optimizers
are being integrated with the DLE: one of these is
[YASK](https://github.com/01org/yask).
Loop Engine (DLE), another sub-module of Devito.

Further, [YASK](https://github.com/intel/yask) is being integrated as a Devito
backend, for optimized execution on Intel architectures.

Devito supports automatic auto-tuning of block sizes when loop blocking is
enabled. Enabling auto-tuning is simple: it can be done by passing the special
flag `autotune=True` to an `Operator`. Auto-tuning parameters can be set
through the special environment variable `DEVITO_AUTOTUNING`.

For more information on how to drive Devito for maximum run-time performance,
see [here](examples/PERFORMANCE.md).
see [here](examples/PERFORMANCE.md) or ask the developers on the Slack
channel linked above.

0 comments on commit 6896b27

Please sign in to comment.