commit: 1590d50aab5daa504272ee6104c5b06e3d5d037b Author: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com> AuthorDate: Fri Jun 16 16:32:01 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Wed Jun 28 21:09:20 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1590d50a
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 <AT> gmail.com> Signed-off-by: Sam James <sam <AT> gentoo.org> sci-libs/vtk/vtk-9.2.5.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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
