mshr build fails: virtual memory exhausted: Cannot allocate memory
Some mshr 2018.1.0 builds have started failing on Debian/Ubuntu with the error:
virtual memory exhausted: Cannot allocate memory
This currently affects 32 bit architectures in Debian, see https://buildd.debian.org/status/package.php?p=mshr
But it also affects 64 bit (amd64) in Ubuntu cosmic, https://launchpad.net/ubuntu/+source/mshr/2018.1.0+dfsg1-4/+build/15255377Link Text amd64 builds successfully for Debian.
The CGAL involved here is 4.12-1 (4.12-1build1), and tetgen 1.5.0-5, both used as a system library.
It mostly affects compilation of TetgenMeshGenerator3D.cpp, but some arches break sooner.
Does it mean mshr is demanding to use "too much" memory during build?
Comments (4)
-
-
reporter #debian-devel
suggests RAM may not be the problem. They cite https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79030#c2 (exhausting address space) -
reporter But anyway, Ubuntu buildds do have only 16GB, less than debian buildds.
-
reporter make -j1
doesn't help. In fact I can reproduce the error with a single compilation line, e.g. building CSGCGALMeshGenerator3D.cpp.o on i386,/usr/bin/c++ -DCGAL_HEADER_ONLY -DDOLFIN_VERSION=\"2018.1.0\" -DHAS_CHOLMOD -DHAS_HDF5 -DHAS_MPI -DHAS_PETSC -DHAS_SCOTCH -DHAS_SLEPC -DHAS_UMFPACK -DHAS_ZLIB -DNDEBUG -DTETLIBRARY -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -Dmshr_EXPORTS -I/build/mshr/mshr-2018.1.0+dfsg1/include -I/include -I/usr/include/i386-linux-gnu -isystem /usr/include/eigen3 -isystem /usr/include/hdf5/openmpi -isystem /usr/lib/i386-linux-gnu/openmpi/include/openmpi -isystem /usr/lib/i386-linux-gnu/openmpi/include -isystem /usr/lib/slepcdir/slepc3.9/i386-linux-gnu-real/include -isystem /usr/lib/petscdir/petsc3.9/i386-linux-gnu-real/include -isystem /usr/include/suitesparse -isystem /usr/include/superlu -isystem /usr/include/superlu-dist -isystem /usr/include/hypre -isystem /usr/include/scotch -fpermissive -g -O2 -fdebug-prefix-map=/build/mshr/mshr-2018.1.0+dfsg1=. -fstack-protector-strong -Wformat -Werror=format-security -std=c++0x -Wall -fPIC -std=c++11 -o CMakeFiles/mshr.dir/src/CSGCGALMeshGenerator3D.cpp.o -c /build/mshr/mshr-2018.1.0+dfsg1/src/CSGCGALMeshGenerator3D.cpp
The combination of
-g -O2
(to say nothing of-O3
) tips it over the edge. The compilation succeeds with either-g -O1
or with-O2
(without-g
).Should we alter the build configuration to drop
-g
, or find a different fix? - Log in to comment
Do you know how much memory is available on the build machines? I think building mshr requires at least 4 GB. Try using
make -j1
to reduce the number of build threads to a minimum on build machines with low memory. I see from the buildlogs on buildd.debian.org and launchpad that it is currently using from-j4
to-j8
.