Skip to content

Commit dd9879f

Browse files
committed
Fixed README.
1 parent 1d3a837 commit dd9879f

File tree

1 file changed

+47
-41
lines changed

1 file changed

+47
-41
lines changed

README.md

Lines changed: 47 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,73 @@
1-
# Benchmark
1+
# LinearOperator - a generic, high-level expression syntax for linear algebra
22

3-
## files:
3+
This repository contains all benchmarks and source codes to reproduce the
4+
results of the article
45

5-
- **./bench_scripts/run.sh** : generate all benchmark
6+
*LinearOperator - a generic, high-level expression syntax for linear algebra*
67

7-
## benchmarks:
8+
2016, Matthias Maier, Mauro Bardelloni, Luca Heltai
9+
10+
In particular, it requires the deal.II library (version greater or equal than 8.3)
11+
and the eigen and blaze libraries.
812

9-
### eigen.cc
13+
Submodules for both eigen and blaze are provided, for your convenience. If you install
14+
from github, you should make sure you download all submodules:
1015

11-
Compare a simple and a smart implementation of a code based on Eigen with a
12-
code based on LinearOperator Class.
16+
git clone --recursive https://github.com/mathLab/LinearOperator.git
1317

14-
The benchmark consists in the evaluation of **A^3** where **A** is a
15-
matrix.
18+
or, if you already have a clone of the LinearOperator repository, you can get the
19+
submodules by the following command (inside your local LinearOperator repository)
1620

17-
### full_matrix_01.cc
21+
git submodule update --init --recursive
1822

19-
Define a full matrix and compare a raw implementation of matrix-vector
20-
multiplication with the one based on LinearOperator Class.
23+
## Installation
2124

22-
### full_matrix_02.cc
25+
Assuming you installed correctly the `deal.II` library (www.dealii.org) under the path
26+
`/path/to/dealii`, then issuing the following commands should create all executables
27+
for the benchmarks presented in the paper:
2328

24-
Define a full matrix **A** and compare a raw implementation of **(3Id +
25-
A)A** with the one based on LinearOperator Class.
29+
mkdir build
30+
cd build
31+
cmake -DDEAL_II_DIR=/path/to/dealii .. # Alternatively, set DEAL_II_DIR env variable
32+
make
2633

27-
### sparse_matrix_01.cc
34+
this will create a few executables in the `build` directory.
2835

29-
Define a sparse matrix and compare a raw implementation of matrix-vector
30-
multiplication with the one based on LinearOperator Class.
36+
If you want to reproduce the results of the articles, we provide the following script
37+
38+
./script/matrix.sh
3139

32-
### sparse_matrix_02.cc
40+
which will create a directory `build_matrix_test`, configure, build and run all tests,
41+
outputting the results into the directory `./build_matrix_test/output_dir`
3342

34-
Define a sparse matrix **A** and compare a raw implementation of $(3Id +
35-
A)A$ with the one based on LinearOperator Class.
43+
## benchmarks:
3644

37-
### triple_add_01.cc
45+
Each benchmark is included in the directory `./apps`, and makes a comparison between
46+
some simple operations involving either dense matrices or sparse matrices implemented
47+
in `dealii`, `eigen`, or `blaze`, and two variants involving `LinearOperator` and
48+
`PackagedOperation` objects. The first variant involves the creation of temporary
49+
`PackagedOperation` objects in each loop, while the second makes one construction
50+
outside the loop, and only uses the objects that have been previously constructed.
3851

39-
Compare a raw implementation of $A(x+y+z)$ with the one based on
40-
LinearOperator Class.
52+
The following tests are provided:
4153

42-
This code uses **vmult_add** in the raw section.
54+
### `{full,sparse}_matrix_01.cc`
4355

44-
### triple_add_02.cc
56+
Compute `M*v`
4557

46-
Compare a raw implementation of $A(x+y+z)$ with the one based on
47-
LinearOperator Class.
58+
### `{full,sparse}_matrix_02.cc`
4859

49-
This code uses **+=** in the raw section.
60+
Compute `M*M*M*v`
5061

51-
### Stokes
62+
### `{full,sparse}_matrix_03.cc`
5263

53-
Benchmark for the LinearOperator class. This code assemble a preconditioner
54-
for Stokes using two different approaches:
55-
- Assembling the matrix and performing
56-
every operation in the usual way
57-
- Assembling the matrix, defining the
58-
associated LinearOperators, and then performing all the operations using an
59-
high-level syntax (LinearOperator).
64+
Compute `(3*Id+M)*M*v`
6065

61-
### step-6
66+
### `{full,sparse}_matrix_04.cc`
6267

63-
Benchmark for constraints linear operator.
68+
Compute `M*(x+y+z)`
6469

65-
### step-40
70+
### step_32.cc
6671

67-
Parallel version of the previous benchmark.
72+
Compute a preconditioner for Stokes system, using a low level `deal.II` implementation,
73+
or using a `LinearOperator` variant.

0 commit comments

Comments
 (0)