HPX: CMake hangs at a point and consumes lot of system memory/RAM
When performing cmake on HPX library i.e (https://github.com/STEllAR-GROUP/hpx) with the command
cmake -GNinja -S $HPX_SRC_DIR -B $HPX_BUILD_DIR -DCMAKE_INSTALL_PREFIX=$HPX_INSTALL_DIR -DCMAKE_BUILD_TYPE=Release -DHPX_WITH_CXX_STANDARD=20 -DHPX_WITH_FETCH_ASIO=ON -DHPXLocal_WITH_CXX_STANDARD=20
,
cmake hangs at this https://gist.github.com/srinivasyadav18/e6f6644b400a7a635d186af9acee5214 point. And the memory usage of application keeps increasing as the time goes on and eventually uses up whole system memory (RAM).
We had a quick fix for this by appending an extra flag to the cmake i.e -DHPX_WITH_MODULES_AS_STATIC_LIBRARIES=On
, but a better solution would solve the issue.
Library Versions
Cmake : 3.20.0-rc3, 3.22
HPX : master branch
GCC : 11.1
Boost : 1.76
Way to reproduce
- mkdir workdir && cd workdir
- git clone https://github.com/STEllAR-GROUP/hpx
- mkdir hpx_build hpx_install
- cmake -GNinja -S ./hpx -B ./hpx_build -DCMAKE_INSTALL_PREFIX=./hpx_install -DCMAKE_BUILD_TYPE=Release DHPX_WITH_CXX_STANDARD=20 -DHPX_WITH_FETCH_ASIO=ON -DHPXLocal_WITH_CXX_STANDARD=20