From 3318c426daf8b9ada524c7ceae39c23cbd80554a0d9480bc72467aef6d650717 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Thu, 20 Aug 2020 10:48:47 +0000 Subject: [PATCH 1/2] Accepting request 828118 from home:marxin:memory-constraint - Use memoryperjob constraint instead of %limit_build macro. - Use only 1GB for memoryperjob. Memory and CPU usage graph can be seen here: https://gist.githubusercontent.com/marxin/223890df4d8d8e490b6b2918b77dacad/raw/79a999743aff55c62acc0e9700cb95522fd107a7/PrusaSlicer.svg OBS-URL: https://build.opensuse.org/request/show/828118 OBS-URL: https://build.opensuse.org/package/show/science/PrusaSlicer?expand=0&rev=12 --- PrusaSlicer.changes | 6 ++++++ PrusaSlicer.spec | 2 -- _constraints | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/PrusaSlicer.changes b/PrusaSlicer.changes index 26cddb4..cd7ce02 100644 --- a/PrusaSlicer.changes +++ b/PrusaSlicer.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Aug 20 09:03:33 UTC 2020 - Martin Liška + +- Use memoryperjob constraint instead of %limit_build macro. +- Use only 1GB for memoryperjob. + ------------------------------------------------------------------- Mon Aug 10 08:12:10 UTC 2020 - Stefan Brüns diff --git a/PrusaSlicer.spec b/PrusaSlicer.spec index a0b4983..fe305f2 100644 --- a/PrusaSlicer.spec +++ b/PrusaSlicer.spec @@ -45,7 +45,6 @@ BuildRequires: libboost_system-devel BuildRequires: libboost_thread-devel BuildRequires: libcurl-devel BuildRequires: libexpat-devel -BuildRequires: memory-constraints BuildRequires: nlopt-devel BuildRequires: openvdb-devel >= 5 BuildRequires: openvdb-tools @@ -67,7 +66,6 @@ It also works with Mach3, LinuxCNC and Machinekit controllers. sed -i 's/UNKNOWN/OpenSUSE/' version.inc %build -%limit_build -m 4096 # sse2 flags for 32-bit: see gh#prusa3d/PrusaSlicer#3781 %ifarch %ix86 export CFLAGS="%optflags -mfpmath=sse -msse2" diff --git a/_constraints b/_constraints index cbb4c6b..6881d1d 100644 --- a/_constraints +++ b/_constraints @@ -1,3 +1,4 @@ + @@ -6,5 +7,8 @@ 8 + + 1024 + From bbaa80a2eb9c11b2a5469f17e24c048cb7e63f542347f0f0bfbb686475511116 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Thu, 20 Aug 2020 19:00:03 +0000 Subject: [PATCH 2/2] Accepting request 828264 from home:bnavigator:branches:science - revert the memoryperjob change. The build process really acquires that much memory per job and the workers cannot provide 3GB per CPU core. Sadly, we are limited by memory not by CPU cores. - require 11 GB of RAM. This allows us to run 3 jobs in parallel and can be provided by all architectures OBS-URL: https://build.opensuse.org/request/show/828264 OBS-URL: https://build.opensuse.org/package/show/science/PrusaSlicer?expand=0&rev=13 --- PrusaSlicer.changes | 9 +++++++++ PrusaSlicer.spec | 8 ++++++++ _constraints | 9 +++------ 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/PrusaSlicer.changes b/PrusaSlicer.changes index cd7ce02..b81fe23 100644 --- a/PrusaSlicer.changes +++ b/PrusaSlicer.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Aug 20 15:50:07 UTC 2020 - Benjamin Greiner + +- revert the memoryperjob change. The build process really acquires + that much memory per job and the workers cannot provide 3GB per + CPU core. Sadly, we are limited by memory not by CPU cores. +- require 11 GB of RAM. This allows us to run 3 jobs in parallel and + can be provided by all architectures + ------------------------------------------------------------------- Thu Aug 20 09:03:33 UTC 2020 - Martin Liška diff --git a/PrusaSlicer.spec b/PrusaSlicer.spec index fe305f2..ef4d548 100644 --- a/PrusaSlicer.spec +++ b/PrusaSlicer.spec @@ -45,6 +45,7 @@ BuildRequires: libboost_system-devel BuildRequires: libboost_thread-devel BuildRequires: libcurl-devel BuildRequires: libexpat-devel +BuildRequires: memory-constraints BuildRequires: nlopt-devel BuildRequires: openvdb-devel >= 5 BuildRequires: openvdb-tools @@ -66,6 +67,13 @@ It also works with Mach3, LinuxCNC and Machinekit controllers. sed -i 's/UNKNOWN/OpenSUSE/' version.inc %build +# The build process really acquires that much memory per job. We are +# limited by memory not by CPU cores. Using memoryperjob in _constraints cannot +# provide any workers on some architectures. This is still better than not using +# parallel building at all. +# https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.build_job_constraints.html +# https://en.opensuse.org/openSUSE:Specfile_guidelines#Parallel_make +%limit_build -m 3072 # sse2 flags for 32-bit: see gh#prusa3d/PrusaSlicer#3781 %ifarch %ix86 export CFLAGS="%optflags -mfpmath=sse -msse2" diff --git a/_constraints b/_constraints index 6881d1d..7368f17 100644 --- a/_constraints +++ b/_constraints @@ -4,11 +4,8 @@ 12 - - 8 - - - 1024 - + + 11 +