-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
122 lines (83 loc) · 5.13 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Installation instructions
*************************
Setting up the Blaze library on a particular system is a fairly easy two step process. Since
Blaze is a template library and therefore mainly consists of header files no compilation is
required. In the following, this two step process is explained in detail, preceded only by
a short summary of the requirements.
Requirements
************
In order for Blaze to work properly, the Boost library must be installed on the system. It is
recommended to use the newest Boost library available, but Blaze requires at minimum the Boost
version 1.39. If you don't have Boost installed on your system, you can download it for free
from 'www.boost.org'.
Additionally, for maximum performance Blaze expects you to have a BLAS library installed (Intel
MKL, ACML, Atlas, Goto, ...). If you don't have a BLAS library installed on your system, Blaze
will still work and will not be reduced in functionality, but performance may be severely limited.
Thus it is strongly recommended to install a BLAS library.
Step 1: Configuration
*********************
Linux/MacOSX Users
------------------
The first step is to adapt the 'Configfile' in the Blaze home directory to the local configuration.
Any text editor can be used for this task:
vi ./Configfile
In the 'Configfile', the kind of installation (debug or release), the library types (static and/or
dynamic), the compiler including compiler flags, and several include paths have to be specified.
Afterwards, the 'configure' script can be run, which uses the 'Configfile' to update and create
several files (including header files):
./configure
This step can also be omitted, but results in a default configuration that does not guarantee
the highest performance for all operations. For instance, without running the 'configure' script,
Blaze assumes that no BLAS library is installed on the system and cannot use BLAS functionality
for instance for the matrix/matrix multiplication.
In order to further customize the Blaze library the header files in the './blaze/config/'
subdirectory can be adapted. For instance, in the header file './blaze/config/StorageOrder.h'
the default matrix storage order (i.e. row-major or column-major) can be specified.
Windows Users
-------------
Unfortunately, for Windows users there is no 'configure' script available (yet). Therefore Windows
users have to manually configure the Blaze library. Most configuration headers are located in the
'./blaze/config/' subdirectory. The one exception is the 'BLAS.h' header in the './blaze/system/'
subdirectory that contains the configuration of the BLAS functionality. Note that in case the
'BLAZE_BLAS_MODE' symbol is set to 1, the correct BLAS header file has to be specified!
Step 2: Installation
********************
Linux/MacOSX Users
------------------
The second step is the installation of the header files. Since Blaze mainly consists of header
files, the './blaze' subdirectory can be simply copied to a standard include directory:
cp -r ./blaze /usr/local/include
Alternatively, on Unix-based machines (which includes Linux and Mac OS X) the 'CPLUS_INCLUDE_PATH'
environment variable can be set. The specified directory will be searched after any directories
specified on the command line with the option '-I' and before the standard default directories
(such as '/usr/local/include' and '/usr/include'). Assuming a user misterX, the environment
variable can be set as follows:
CPLUS_INCLUDE_PATH=/usr/home/misterX/blaze
export CPLUS_INCLUDE_PATH
Last but not least, the './blaze' subdirectory can be explicitly specified on the command line.
The following example demonstrates this by means of the GNU C++ compiler:
g++ -I/usr/home/misterX/blaze -o BlazeTest BlazeTest.cpp
Windows Users
-------------
Windows doesn't have a standard include directory. Therefore the Blaze header files can be copied
to any other directory or simply left in the default Blaze directory. However, the chosen include
directory has to be explicitly specified as include path. In Visual Studio, this is done via the
project property pages, configuration properties, C/C++, General settings. Here the additional
include directories can be specified. Note that there are small differences between VS2008 and
VS2010: 'http://blogs.msdn.com/b/vsproject/archive/2009/07/07/vc-directories.aspx'
Step 3 (Optional): Compilation
******************************
Linux/MacOSX Users
------------------
Next to the math library, Blaze also contains a small number of additional (sub-)libraries. If
these libraries, such as blaze::ThreadPool or the blaze::logging functionality, are required
it is necessary to create the Blaze library files. For that purpose, the 'configure' script has
created a 'Makefile' that can be used for the compilation process:
make
Afterwards, the 'libblaze.so' and/or 'libblaze.a' libraries are contained in the 'lib' subdirectory
and can be copied to a standard library directory. However, note that this step is purely optional
and can be omitted if only the Blaze math library is required.
cp ./lib/* /usr/local/lib
Windows Users
-------------
For Windows users, a comfortable compilation of the extended Blaze features is not (yet) supported.