summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Zander <negril.nx+gentoo@gmail.com>2023-06-16 18:32:01 +0200
committerSam James <sam@gentoo.org>2023-06-28 22:09:20 +0100
commit1590d50aab5daa504272ee6104c5b06e3d5d037b (patch)
tree83a7e088b813ce8e2cd7bc2cd7df1ee9bb01481a /sci-libs/vtk
parentdev-util/bcc: add 0.28.0 (diff)
downloadgentoo-1590d50aab5daa504272ee6104c5b06e3d5d037b.tar.gz
gentoo-1590d50aab5daa504272ee6104c5b06e3d5d037b.tar.bz2
gentoo-1590d50aab5daa504272ee6104c5b06e3d5d037b.zip
sci-libs/vtk: reduce required memory for cuda compilation
Prior logic assumes infinite parallel nvcc calls, while real-life testing shows a max of 4. This adds crude logic to require no more memory then needed for 4 parallel calls. Bug: https://bugs.gentoo.org/901241 Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs/vtk')
-rw-r--r--sci-libs/vtk/vtk-9.2.5.ebuild2
1 files changed, 1 insertions, 1 deletions
diff --git a/sci-libs/vtk/vtk-9.2.5.ebuild b/sci-libs/vtk/vtk-9.2.5.ebuild
index 23a48458dd3a..b02f2ee03056 100644
--- a/sci-libs/vtk/vtk-9.2.5.ebuild
+++ b/sci-libs/vtk/vtk-9.2.5.ebuild
@@ -186,7 +186,7 @@ vtk_check_reqs() {
jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
fi
fi
- mem=$(( ${mem} * ${jobs} ))
+ mem=$(( ${mem} * $(( ${jobs} > 4 ? 4 : ${jobs} )) ))
use cuda && export CHECKREQS_MEMORY=${mem}M
export CHECKREQS_DISK_BUILD=${dsk}M