Newer
Older
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
## OpenFOAM® System Requirements
OpenFOAM requires a functioning C++11 compiler and `make` build toolchain.
### Minimum recommended versions
- gcc: 4.8.5
- cmake: 3.3 (required for ParaView and CGAL build)
- boost: 1.48 (required for CGAL build and some functionality)
- fftw: 3.3.7 (recommended - required for FFT-related functionality)
- paraview: 5.5.2 (for visualization)
To check the installed versions
| Program | To check the version |
|---------------|-----------------------|
| gcc | gcc --version |
| cmake | cmake --version |
| openmpi | orterun --version |
### Additional utilities
- flex
- QT: 5.9 (optional - for ParaView build)
### Ubuntu (eg, 19.04)
Install dependencies by executing the following lines on the command line:
```
sudo apt-get install build-essential flex cmake zlib1g-dev libopenmpi-dev openmpi-bin gnuplot libreadline-dev libncurses-dev
sudo apt-get install libgmp-dev libmpfr-dev libmpc-dev
```
Additional libraries will be required if compiling ParaView from
source, however it is suggested to skipped this initially since
it generally represent the main compilation difficulty.
In many cases, a system installation of paraview or a
[precompiled binary][download ParaView]
will be much easier.
Some libraries can be installed from from the operating system, or
compiled from the ThirdParty directory.
The default configuration for OpenFOAM assumes OpenMPI from the system
and ThirdParty installations for most others (boost, CGAL, FFTW,
Kahip, Scotch). This is generally the most portable configuration
across various Linux distributions, but it may be desirable to use
more system libraries on Ubuntu.
To inspect the available system versions, use the `apt-cache show`
command. For example,
```
sudo apt-cache show fftw3-dev
```
| Program | apt-cache show | Ubuntu | Version |
|-----------|-----------------|---------|---------|
| boost | libboost-dev | 19.04 | 1.67 |
| CGAL | libcgal-dev | 19.04 | 4.13 |
| FFTW | libfftw3-dev | 19.04 | 3.3.8 |
| scotch | libscotch-dev | 19.04 | 6.0.6 |
| Program | Ubuntu | Program version |
|-----------|-----------|-----------------|
| gcc | 19.04 | 8.3.0 |
| openmpi | 19.04 | 3.1.3 |
| cmake | 19.04 | 3.13.4 |
| flex | 19.04 | 2.6.4 |
### openSUSE (eg, Leap-15.0)
Install the dependencies by copying and pasting the following lines to the command line:
```
sudo zypper install -t pattern devel_C_C++
sudo zypper install cmake boost-devel mpfr-devel gmp-devel openmpi-devel gnuplot
```
This installs
| Program | openSUSE | Program version |
|-----------|-----------|-----------------|
| gcc | 15.0 | 7.4.3 |
| openmpi | 15.0 | 1.10.7 |
| cmake | 15.0 | 3.10.2 |
| flex | 15.0 | 2.6.4 |
#### OpenMPI
Check that the openmpi installation can be found:
```
orterun --version
```
And the command `mpicc --show` should display a complete compilation
line. This information is used in OpenFOAM to obtain the
compilation and link options.
For openSUSE it is common that this command cannot be found.
The reason being that the operating system can have several different
MPI vendors and versions installed and the user or sysadmin needs to
defined the preferred MPI. For this task, the `mpi-selector` and
`mpi-selector-menu` programs are used. These are automatically installed
by the system when openmpi has been installed.
If openmpi has been selected, the output will resemble the following:
```
$ mpi-selector --query
default:openmpi
level:user
```
If this is not the case, the `mpi-selector-menu` can be used to define
the preferred default.
***Note that changes in the preferred MPI do not take effect until the
next login.***
If all else fails, a brute force solution can also be used by simply
adding the corresponding lines to the `$HOME/.bashrc` file:
```
export PATH=$PATH:/usr/lib64/mpi/gcc/openmpi/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/mpi/gcc/openmpi/lib
```
This solution is not particularly nice, but may also be necessary if
some other part of the operating system installation is incomplete.
### Using IntelMPI
To run with IntelMPI, the LD_PRELOAD environment variable can be used
to pre-load the appropriate Intel® MPI binding library. For more
details, see INTELMPI release note page 13.
The following line can be the `$HOME/.bashrc` file:
```
export LD_PRELOAD="libmpi.so"
```
### Additional libraries
When compiled ParaView from source additional dependencies will be
required.
A partial list is given in the [ThirdParty requirements][link third-require].
**Please help us with keeping that information up-to-date and accurate.**
<!-- Links -->
[page ParaView]: http://www.paraview.org/
[download ParaView]: https://www.paraview.org/download/
<!-- OpenFOAM -->
[link openfoam-build]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/BUILD.md
[link openfoam-config]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/etc/README.md
[link openfoam-require]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Requirements.md
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/BUILD.md
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/Requirements.md
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/README.md
---
Copyright 2019 OpenCFD Ltd