summary refs log tree commit diff
path: root/pkgs/applications/science/math/sage/patches/pari-no-threads.patch
blob: 13b47dbdd31bee94a51ae7f76952d786520312d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/src/sage/libs/pari/__init__.py b/src/sage/libs/pari/__init__.py
index e451766474..77eda66097 100644
--- a/src/sage/libs/pari/__init__.py
+++ b/src/sage/libs/pari/__init__.py
@@ -205,6 +205,13 @@ def _get_pari_instance():
     # messages in Sage.
     P.default("debugmem", 0)
 
+    # Make sure pari doesn't use threads, regardless of how it was compiled.
+    # Threads cause some doctest failures (memory issues). Those could probably
+    # be solved without disabling threads. But that would require figuring out
+    # some sensible values for `threadsizemax`. See
+    # https://pari.math.u-bordeaux.fr/dochtml/html/GP_defaults.html
+    P.default("nbthreads", 1)
+
     return P
 
 pari = _get_pari_instance()