diff --git a/web/content/docs/devguide/getting-started/build.md b/web/content/docs/devguide/getting-started/build.md index 8d9d6705b54f0b84dcd7256574b07674f88b1995..e5c10f4db5ab6dba2f13130e5452c0c58e4a6780 100644 --- a/web/content/docs/devguide/getting-started/build.md +++ b/web/content/docs/devguide/getting-started/build.md @@ -38,8 +38,19 @@ To build with the `ninja` tool on the shell go to your previously configured bui cd ../build/release 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 class='mac'> diff --git a/web/content/docs/devguide/troubleshooting/build.md b/web/content/docs/devguide/troubleshooting/build.md index b1e503a025a575dafc5cce81accc9ae4fdfc677c..0279756d7e8967e830699dad2ffc80ace3570571 100644 --- a/web/content/docs/devguide/troubleshooting/build.md +++ b/web/content/docs/devguide/troubleshooting/build.md @@ -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 --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" >}}).