Changes between Version 4 and Version 10 of Ticket #26118


Ignore:
Timestamp:
08/24/18 14:50:53 (3 years ago)
Author:
saraedum
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #26118 – Description

    v4 v10  
    11Strangely `SAGE_NUM_THREADS=160 sage -tp --long --all` produces lots of timeouts on a 160 core machine.
    22
    3 It turns out that only a few cores are actually used (three or four most of the time) which seems to be related to the set CPU affinity. 
     3It turns out that only a few cores are actually used (three or four most of the time) which seems to be related to the set CPU affinity.
    44
    5 This ugly workaround fixes it:
    6 {{{
    7 --- a/src/sage/doctest/forker.py
    8 +++ b/src/sage/doctest/forker.py
    9 @@ -1696,6 +1696,9 @@ class DocTestDispatcher(SageObject):
    10          # Logger
    11          log = self.controller.log
    12  
    13 +        import os
    14 +        os.system("taskset -p 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff
    15 ffffffffffffffffffffffff %d 2>/dev/null >/dev/null" % os.getpid())
    16 +
    17          from cysignals.pselect import PSelecter
    18          try:
    19              # Block SIGCHLD and SIGINT except during the pselect() call
    20 }}}
     5One workaround `export OPENBLAS_NUM_THREADS=1`.
    216
    22 A better workaround, turned out to be setting `OPENBLAS_NUM_THREADS=1`.
     7Or we could `export OPENBLAS_MAIN_FREE=1` to disable OPENBLAS' threading affinity.
     8
     9The FAQ explains what these options do: https://github.com/xianyi/OpenBLAS/wiki/faq