@@ -38,8 +38,19 @@ To build with the `ninja` tool on the shell go to your previously configured bui
...
@@ -38,8 +38,19 @@ To build with the `ninja` tool on the shell go to your previously configured bui
cd ../build/release
cd ../build/release
ninja
ninja
```
```
By default, `ninja` uses maximum parallelism causing it to crash on many machines as the memory consumption exceeds the available memory.
Therefore, we recommend restricting the number of threads to be used, e.g., type `ninja -j 2` for a maximum of two threads.
<divclass="note">
<h3><iclass="fal fa-exclamation-triangle"></i> Exceeding memory consumption during compilation</h3>
By default, `ninja` uses maximum parallelism which may lead to a memory consumption exceeding the available memory (especially when compiling the processes).
Therefore, we recommend restricting the number of parallel compilations to be used to **one per 8 GB RAM**, e.g., if your machine has 16 GB RAM type `ninja -j 2` for a maximum of two parallel compilations.
Another option is to build just the process you are interested in by configuring with the CMake option `OGS_BUILD_PROCESSES`, e.g.: `cmake -DOGS_BUILD_PROCESSES=HT ....`. In this case you should be able to compile with full parallelization.
@@ -36,3 +36,7 @@ If this still fails you can disable building of the failing processes, e.g.:
...
@@ -36,3 +36,7 @@ If this still fails you can disable building of the failing processes, e.g.:
cmake .-DOGS_BUILD_PROCESS_HT=OFF
cmake .-DOGS_BUILD_PROCESS_HT=OFF
cmake --build.--config Release -j 1
cmake --build.--config Release -j 1
```
```
## Compiler crash on Linux / macOS
The same as described above for Windows can happen on other platforms if there is not enough RAM to compile in parallel. See the note on [Exceeding memory consumption during compilation]({{<ref"docs/devguide/getting-started/build.md#build-the-project">}}).