INSTALL.md 1.99 KB
Newer Older
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
1
# Getting libaec
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

The source code of libaec is hosted at DKRZ GitLab.

## Source code and binary releases

The latest releases of libaec can be downloaded at the following
location:

  https://gitlab.dkrz.de/k202009/libaec/tags

## Developer snapshot

  git clone https://gitlab.dkrz.de/k202009/libaec.git


Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
17
# Installation
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
18

19
20
21
22
23
24
## General considerations

Libaec achieves the best performance on 64 bit systems. The library
will work correctly on 32 bit systems but encoding and decoding
performance will be much lower.

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
## Installation from source code release with configure

The most common installation procedure on Unix-like systems looks as
follows:

Unpack the tar archive and change into the unpacked directory.

  mkdir build
  cd build
  ../configure
  make check install

## Installation from source code release with CMake

As an alternative, you can use CMake to install libaec.
40
41
42

Unpack the tar archive and change into the unpacked directory.

43
44
  mkdir build
  cd build
45
  cmake ..
46
  make install
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
47

48
49
50
51
52
53
54
55
56
57
You can set options for compiling using the CMake GUI by replacing the cmake
command with

  cmake-gui ..

or by setting the options manually, e.g.

  cmake -DCMAKE_INSTALL_PREFIX=~/local ..

in order to set the install prefix to ~/local
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
58

59
60
61
62
63
64
CMake can also generate project files for Microsoft Visual Studio when
used in Windows.

## Installation from cloned repository

The configure script is not included in the repository. You can
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
65
generate it with autotools and gnulib:
66
67

  cd libaec
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
68
69
  gnulib-tool --import lib-symbol-visibility
  autoreconf -iv
70
71
72
73
74
75
  mkdir build
  cd build
  ../configure
  make check install


Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
76
# Intel compiler settings
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
77
78

The Intel compiler can improve performance by vectorizing certain
79
80
parts of the code on x86 architectures. Assuming your CPU supports
AVX2, the following options will increase encoding speed.
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
81

82
  ../configure CC=icc
83
  make CFLAGS="-O3 -xCORE-AVX2" bench
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
84

85
86
87
88
On a 3.4 GHz E3-1240 v3 we see more than 400 MiB/s for encoding
typical data.

Using other SIMD instruction sets on older CPUs may also help.