-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathINSTALL
95 lines (77 loc) · 4.58 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
The installation instructions are for Linux.
The built scripts will search for dependencies in ~/local first, so
all dependencies can be installed without administrator rights.
1. Install cmake (provided as package "cmake" in every distribution)
Version 2.8.3 or higher is needed!
2. Install mpich2 (>= 1.3.2p1).
a) Use a package from your distribution (mpich2 & libmpich2-dev; sometimes also
mpich & libmpich-dev)
b) Download source code from http://www.mcs.anl.gov/research/projects/mpich2/
and perform the following steps:
- unpack to ~local/src/mpich2/ and cd to this directory
- run ./configure --enable-shared --prefix=/home/<your-login>/local --enable-mpe
- run make
- run make install
- add ~/local/bin to your path (to the front)
3. Install a recent version of Boost (>= 1.47; tested with 1.63).
a) Use package "libboost-dev" from your Linux distribution, if recent enough and
built against mpich2 (and not openmpi).
b) Download source code from http://www.boost.org/ and perform the following
steps:
- unpack to ~/local/src/boost and cd to this directory
- run ./bootstrap.sh
- edit project-config.jam and modify the lines below:
option.set prefix : /home/<your-login>/local ;
option.set exec-prefix : /home/<your-login>/local ;
option.set libdir : /home/<your-login>/local/lib ;
option.set includedir : /home/<your-login>/local/include ;
- edit tools/build/v2/user-config.jam (on newer versions: create tools/build/src/user-config.jam) and add the line
using mpi ;
- edit boost/mpi/config.hpp and uncomment the line
#define BOOST_MPI_HOMOGENEOUS
- run ./b2 -j4 install (here -j4 means "use 4 cores")
4. Install the log4cxx library.
a) Use a package from your distribution (log4cxx & log4cxx-dev OR liblog4cxx10 & liblog4cxx10-dev)
b) Download source code from http://logging.apache.org/log4cxx/download.html
and perform the following steps:
- unpack to ~/local/src/apache-log4cxx-0.10.0
- run ./configure --prefix=/home/<your-login>/local
- run make (if this fails, see TROUBLESHOOTING below)
- run make install
5. Install ccache
- Use a package from your distribution (ccache)
6a) To install to ~/local, first "mkdir build" and run then "./localinstall.sh" (most users do this, no root login required)
6b) To build, Cd to <mf-root>/build, then run
- For optimized build (default; release with CPU-specific optimizations): cmake -DCMAKE_BUILD_TYPE=NativeRelease ../
- For generic release (release without CPU-specific optimizations): cmake -DCMAKE_BUILD_TYPE=Release ../
- For development (never use to measure runtime!): cmake -DCMAKE_BUILD_TYPE=Debug ../
- make
After the build is successful, the project can be imported into Eclipse
(project file is in root directory).
6c) To install for all users, build and then do "make install" as root
7. (Optionally) Run doxygen in the main directory to create documentation files.
TROUBLESHOOTING
- If cmake does not find the system's MPI library, you can hint it as follows:
cmake -DMPI_INCLUDE_PATH=/usr/include/mpich2/ -DMPI_LIBRARY=/usr/lib/libmpi.so ../
- If you get relocation errors, try compiling/installing boost with:
./b2 --v2 cxxflags=-fPIC install
- mpi2 may not compile with gcc-4.5 or newer
This is a bug in gcc; hopefully fixed in next versions. Fallback is to use gcc-4.4.
* install packages gcc-4.4, g++-4.4, c++-4.4 on your system
* Either
1) Change the default compiler (recommended)
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 40
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.4 40
2) add the following lines to your environment (or your ~/.bashrc file)
export MPICH_CC=/usr/bin/gcc-4.4
export MPICH_CXX=/usr/bin/g++-4.4
* test by checking "mpicc --version" and "mpicxx --version"
- log4cxx doesn't compile on new gcc versions.
To fix, add "#include <string.h>" to each of the following files:
* src/main/cpp/inputstreamreader.cpp:66: error: 'memmove' was not declared in this scope
* src/main/cpp/socketoutputstream.cpp:52: error: 'memcpy' was not declared in this scope
* src/examples/cpp/console.cpp:63: error: 'strcmp' was not declared in this scope
add "#include <stdio.h>" to src/examples/cpp/console.cpp
- Boost libraries not found when using DEBUG build: Build boost with
./b2 --variant=debug --layout=versioned --threading=multi install
./b2 --variant=release --layout=versioned --threading=multi install