From b5c1e78c3dac1e310d021086dd7608500b6ec1a9 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 13 Aug 2021 21:55:56 -0600 Subject: [PATCH] Try to limit memory usage on arm builds --- petsc.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/petsc.spec b/petsc.spec index 14f7b92..3b0ab88 100644 --- a/petsc.spec +++ b/petsc.spec @@ -661,6 +661,10 @@ pushd %{name}-%{version} ## RPM_BUILD_NCPUS="`%{_bindir}/getconf _NPROCESSORS_ONLN`" +%ifarch %{arm} +# Likely running out of memory during build +[ $RPM_BUILD_NCPUS -gt 3 ] && RPM_BUILD_NCPUS=3 +%endif make \ V=1 MAKE_NP=$RPM_BUILD_NCPUS PETSC_DIR=%{_builddir}/%{name}-%{version}/%{name}-%{version} PETSC_ARCH=%{_arch} all popd