TRIQS / triqs

a Toolbox for Research on Interacting Quantum Systems
https://triqs.github.io
GNU General Public License v3.0
139 stars 72 forks source link

TRIQS compilation requires excessive memory #942

Open hmenke opened 4 months ago

hmenke commented 4 months ago

Prerequisites

Description

I have a VM with only 8 GB of RAM and no swap as a build environment. Inside this VM I can no longer compile TRIQS even without parallel make jobs.

[ 48%] Building CXX object python/triqs/gf/CMakeFiles/gf_factories.dir/gf_factories_wrap.cxx.o
cd /home/abuild/rpmbuild/BUILD/triqs-3.3.0/_build/python/triqs/gf && /mpcdf/soft/SLE_15/packages/x86_64/intel/2023.1.0.x/bin/icpx -DCPPDLR_GIT_HASH=b0c89cd5dd9fc1fca18a3a0b3cf60af74b707c07 -DFMT_HEADER_ONLY=1 -DH5_GIT_HASH=18c560f0595cf3f11e9536cfdc6e3aff0bd23cf1 -DITERTOOLS_GIT_HASH=2bb4da2b56ab49b3cd7b5f27cfb88c5320fe8524 -DMPICH_SKIP_MPICXX -DMPI_GIT_HASH=219a5e19fb7fca618f264c4ce4a9eac472d0f359 -DNDA_GIT_HASH="" -DNDA_USE_MKL -DNPY_1_7_API_VERSION -DNPY_NO_DEPRECATED_API -DOMPI_SKIP_MPICXX -D_MPICC_H -Dgf_factories_EXPORTS -I/home/abuild/rpmbuild/BUILD/triqs-3.3.0/c++ -I/home/abuild/rpmbuild/BUILD/triqs-3.3.0/_build/deps/itertools_src/c++ -I/home/abuild/rpmbuild/BUILD/triqs-3.3.0/_build/deps/mpi_src/c++ -I/home/abuild/rpmbuild/BUILD/triqs-3.3.0/_build/deps/h5_src/c++ -I/home/abuild/rpmbuild/BUILD/triqs-3.3.0/deps/nda/c++ -I/mpcdf/soft/SLE_15/packages/x86_64/intel_oneapi/2023.1/mkl/latest/include -I/home/abuild/rpmbuild/BUILD/triqs-3.3.0/_build/deps/fmt_src/include -I/home/abuild/rpmbuild/BUILD/triqs-3.3.0/_build/deps/cppdlr_src/c++ -I/home/abuild/rpmbuild/BUILD/triqs-3.3.0/deps/nda/python -I/home/abuild/rpmbuild/BUILD/triqs-3.3.0/deps/Cpp2Py/c++ -isystem /mpcdf/soft/SLE_15/packages/x86_64/intel_oneapi/2023.1/mpi/2021.9.0/include -isystem /mpcdf/soft/SLE_15/packages/haswell/boost/intel_2023.1.0.x-2023.1.0.x/1.79.0/include -isystem /mpcdf/soft/SLE_15/packages/haswell/fftw/intel_2023.1.0.x-2023.1.0.x/3.3.10/include -isystem /mpcdf/soft/SLE_15/packages/x86_64/anaconda/3/2023.03/include/python3.10 -isystem /mpcdf/soft/SLE_15/packages/x86_64/anaconda/3/2023.03/lib/python3.10/site-packages/numpy/core/include -fno-fast-math -O2 -g -march=haswell -O3 -DNDEBUG -std=c++2b -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fno-finite-math-only -fiopenmp -MD -MT python/triqs/gf/CMakeFiles/gf_factories.dir/gf_factories_wrap.cxx.o -MF CMakeFiles/gf_factories.dir/gf_factories_wrap.cxx.o.d -o CMakeFiles/gf_factories.dir/gf_factories_wrap.cxx.o -c /home/abuild/rpmbuild/BUILD/triqs-3.3.0/_build/python/triqs/gf/gf_factories_wrap.cxx
LLVM ERROR: out of memory

Steps to Reproduce

  1. Try to compile TRIQS on a machine with constrained memory.

Expected behavior: Reasonable memory usage by the compiler.

Actual behavior: Compiler crashes or is killed because the system runs out of memory.

Versions

https://github.com/TRIQS/triqs/tree/3.3.0

Formatting

Please use markdown in your issue message. A useful summary of commands can be found here.

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

Wentzell commented 3 months ago

Thank you @hmenke for pointing this out!

I have discussed this point with @parcollet and @Thoemi09.

For the next release we will be switching our binding tool from Cpp2Py to clair and c2py. Our next step will be to investigate if the issue persists after the migration.