error C1060: compiler is out of heap space - Visual Studio 17 2022

1,434 views
Skip to first unread message

Haifei Chen

unread,
Mar 4, 2024, 1:50:11 PM3/4/24
to ProjectChrono
Hello,

Has anyone encountered this issue when compiling chrono v8.0.0? I git-cloned the repo at github (main branch, I think; VS git didn't allow choosing branches), had a fresh install of cmake 3.28.3 & Visual Studio 2022 Community, and unzipped eigen-3.4.0 and irrlicht-1.8.4. The building output some "signed/unsigned mismatch" warnings initially, but failed due to many errors "error C1060: compiler is out of heap space".

Configuring CMake
Only irrlicht and modal modal modules were enabled; cmake was configured as attached.

Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.19045.


The CXX compiler identification is MSVC 19.39.33521.0



Visual studio project

In project properties, the C++ language standard defaults to C++ 14, changing to C++ 17 did not help.



build log
2>C:\Projects\workspace\chrono\src\chrono\physics\ChSystem.cpp(1500,54): warning C4018: '>=': signed/unsigned mismatch

2>C:\Projects\workspace\chrono\src\chrono\physics\ChSystem.cpp(1500,113): warning C4018: '<': signed/unsigned mismatch

2>C:\Projects\workspace\chrono\src\chrono\physics\ChSystem.cpp(1551,40): warning C4389: '==': signed/unsigned mismatch



2>ChMaterialSurfaceNSC.cpp

2>(compiling source file '../../../chrono/src/chrono/physics/ChMaterialSurfaceSMC.cpp')

2>C:\Projects\workspace\eigen-3.4.0\Eigen\src\Core\DenseCoeffsBase.h(145,7): error C1060: compiler is out of heap space

2>(compiling source file '../../../chrono/src/chrono/physics/ChContactable.cpp')

2>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\list(487,1): error C1060: compiler is out of heap space

2>(compiling source file '../../../chrono/src/chrono/physics/ChAssembly.cpp')

2>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\xtr1common(42,23): error C1060: compiler is out of heap space

2>(compiling source file '../../../chrono/src/chrono/physics/ChMaterialSurfaceNSC.cpp')

2>C:\Projects\workspace\eigen-3.4.0\Eigen\src\Core\CwiseBinaryOp.h(153,1): error C1060: compiler is out of heap space

2>(compiling source file '../../../chrono/src/chrono/physics/ChFeeder.cpp')

2>C:\Projects\workspace\eigen-3.4.0\Eigen\src\Core\PlainObjectBase.h(953,1): error C1060: compiler is out of heap space

2>(compiling source file '../../../chrono/src/chrono/physics/ChContactContainer.cpp')

2>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\memory(1595,1): error C1060: compiler is out of heap space

2>(compiling source file '../../../chrono/src/chrono/physics/ChContactContainerSMC.cpp')

2>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\initializer_list(49,1): error C1060: compiler is out of heap space

2>(compiling source file '../../../chrono/src/chrono/physics/ChMaterialSurface.cpp')

2>C:\Projects\workspace\eigen-3.4.0\Eigen\src\Core\util\XprHelper.h(663,1): error C1060: compiler is out of heap space

2>(compiling source file '../../../chrono/src/chrono/physics/ChContactContainerNSC.cpp')

2>ChLimit.cpp

2>Done building project "ChronoEngine.vcxproj" -- FAILED.


Thank you,
Haifei
CMakeCache.txt

Dario Mangoni

unread,
Mar 5, 2024, 5:46:30 AM3/5/24
to ProjectChrono
Hi Haifei,
this is indeed quite an annoying problem: due to the heavy usage of templates in the Eigen library and in some parts of the Chrono code (mainly FEA) the compilation requires big amount of RAM.
The options are few:
  • reduce the number of parallel builds; I'm afraid you have to go down to one single core (in Visual Studio, you go to Tools>Options>Projects and Solutions and set "maximum number of parallel project builds" to 1)
    you can try with 4 or less if you want
  • buy a 32GB RAM computer :-)
Dario

Haifei Chen

unread,
Mar 5, 2024, 2:14:27 PM3/5/24
to ProjectChrono
Hi Dario,

Thank you for the tips. Reducing number of parallel builds to 4, 2, or 1 did not resolve the issue. Many attempts have been tried to compile the code with VS 2022. In some cases, '"a task was cancelled" without any warnings or errors, while other cases simply crashed the VS. On a rare occasion, the build went far enough to still log the C1060 error. 

Last month I was able to compile Chrono in WSL on the same laptop, running Win10 Pro, 16GB RAM. The (GNU) compile was successful using both C++11 and C++17. Do you suggest to try other compilers on Windows? I'd like to try on the visualization brought by the irrlicht library.



Thank you,
Haifei

Dario Mangoni

unread,
Mar 6, 2024, 4:09:11 AM3/6/24
to ProjectChrono
Hi Haifei,
that's really unfortunate. I previously had a 16GB laptop of few years ago and it was working very slowly but fine with only 1 parallel build.

As you can see from the installation page we don't have the test Chrono on more compilers than the ones showed there.
But since GCC+CLang+VS are all guaranteed to work, maybe you won't need many fixes to make it work with Intel.
And surely we appreciate any pull request that could fix potential bug on the Intel compiler!

My last suggestion is to make sure to not have other heavy tasks running on your pc while compiling, but that's quite a trivial recommendation!

Dario

Radu Serban

unread,
Mar 6, 2024, 5:36:02 AM3/6/24
to ProjectChrono

Haifei, this must be due to how your system is set up.

 

It is true that the use of Eigen in Chrono leads to increased memory requirements during compilation, but I have no problems building Chrono with all modules enabled with VS 2022 and a setting of 8 max parallel builds on a Windows machine with 16GB RAM.

 

What is the size of your swap file?  I have it set at 32GB. If yours is lower than that, try increasing it.

 

--Radu

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/60ca8773-b00e-4903-b4aa-7983838648c2n%40googlegroups.com.

Haifei Chen

unread,
Mar 6, 2024, 2:20:14 PM3/6/24
to ProjectChrono
Hi Dario and Radu,

Issue resolved by setting 32GB virtual memory and 8 max parallel builds. Previously my system had 0MB swap file. It took about 25 min to compile the core, irrlicht and modal modules, plus demos. Exciting!

Thank you for your help!
Haifei

Reply all
Reply to author
Forward
0 new messages