Skip to content
Snippets Groups Projects
Verified Commit a7f61ea0 authored by Lars Bilke's avatar Lars Bilke
Browse files

[web] Added hint on number of compilations per RAM.

parent 47a21214
No related branches found
No related tags found
No related merge requests found
...@@ -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. <div class="note">
<h3><i class="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.
</div>
</div> </div>
<div class='mac'> <div class='mac'>
......
...@@ -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" >}}).
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment