Visual Studio out-of-heap or stackoverflow errors

The compilation especially of the processes in Release-config can be very memory hungry. Using dynamic Eigen shape matrices can reduce memory usage:


You should also have at least 8 GB of RAM and even this can be not enough when compiling on multiple cores (which is the default). To build on only one core run the following in your build-directory:

cmake --build . --config Release -- /m:1 /p:CL_MPCount=1

OR if you have CMake >= 3.12 you can simply use -j 1:

cmake --build . --config Release -j 1

If this still fails you can disable building of the failing processes, e.g.:


If you get some error during build which mentions cotire or *.prefix.hxx.gch you can try to clean the pre-compiled headers with:

This may occur after updating the compiler or system libraries. Related to configurations with OGS_USE_PCH=ON only.


Commit: [docs] Added note on CMake's -j option. 3d0cbeb44  | Edit this page on

Creative Commons License | Privacy policy / Legal statements / Impressum