From 488bba4768c034c741fa7e929168d354a5a86306 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Sun, 23 Aug 2020 19:41:17 +0100 Subject: [PATCH 1/2] on macOS set OMP_NUM_THREADS to 1 for docbuild and tests --- build/bin/sage-site | 7 +++++++ src/bin/sage-runtests | 9 ++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/build/bin/sage-site b/build/bin/sage-site index 44d8e3acff9..ef5762d3cdc 100755 --- a/build/bin/sage-site +++ b/build/bin/sage-site @@ -157,6 +157,13 @@ if [ "$1" = "-docbuild" -o "$1" = "--docbuild" ]; then # cause the build to hang. If stdin is /dev/null, TeX just aborts. shift export LANG=C # to ensure it is possible to scrape out non-EN locale warnings + + # See #30351: bugs in macOS implementations of openblas/libgopm can cause + # docbuild to hang if multiple OpenMP threads are allowed. + if [ `uname` = 'Darwin' ]; then + export OMP_NUM_THREADS=1 + fi + exec sage-python -m sage_setup.docbuild "$@" Date: Mon, 24 Aug 2020 10:57:33 +0100 Subject: [PATCH 2/2] use the correct import location, not six.* --- src/sage_setup/docbuild/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage_setup/docbuild/utils.py b/src/sage_setup/docbuild/utils.py index 272f7e2d0f3..9fce8e4edae 100644 --- a/src/sage_setup/docbuild/utils.py +++ b/src/sage_setup/docbuild/utils.py @@ -113,7 +113,7 @@ def build_many(target, args, processes=None): WorkerDiedException: worker for 4 died with non-zero exit code -9 """ from multiprocessing import Process, Queue, cpu_count - from six.moves.queue import Empty + from queue import Empty if processes is None: processes = cpu_count()