Skip to content

Commit 39a1926

Browse files
author
Matthias Koeppe
committed
Update documentation
1 parent 5c0c753 commit 39a1926

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

src/bin/sage-runtests

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ if __name__ == "__main__":
2626
".py, .pyx, .pxd, .pxi, .sage, .spyx, .tex, .rst.")
2727
parser.add_argument("-p", "--nthreads", dest="nthreads",
2828
type=int, nargs='?', const=0, default=1, metavar="N",
29-
help="tests in parallel using N threads with 0 interpreted as max(2, min(8, cpu_count()))")
29+
help="test in parallel using N threads, with 0 interpreted as max(2, min(8, cpu_count())); "
30+
"when run under the control of the GNU make jobserver (make -j), request as most N job slots")
3031
parser.add_argument("-T", "--timeout", type=int, default=-1, help="timeout (in seconds) for doctesting one file, 0 for no timeout")
3132
what = parser.add_mutually_exclusive_group()
3233
what.add_argument("-a", "--all", action="store_true", default=False, help="test all files in the Sage library")

src/doc/en/developer/doctesting.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,10 @@ doctests. This determines the number of threads by reading the
512512
environment variable :envvar:`MAKE`: if it is set to ``make -j12``, then
513513
use 12 threads. If :envvar:`MAKE` is not set, then by default it uses
514514
the number of CPU cores (as determined by the Python function
515-
``multiprocessing.cpu_count()``) with a minimum of 2 and a maximum of 8.
515+
:func:`multiprocessing.cpu_count`) with a minimum of 2 and a maximum of 8.
516+
(When this runs under the control of the `GNU make jobserver
517+
<https://www.gnu.org/software/make/manual/make.html#Parallel>`_, then Sage
518+
will request as most this number of job slots.)
516519

517520
In any case, this will test the Sage library with multiple threads::
518521

src/doc/en/installation/source.rst

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -782,14 +782,19 @@ Here are some of the more commonly used variables affecting the build process:
782782
Some users on single-core macOS machines have reported problems when
783783
building Sage with ``MAKE='make -jNUM'`` with ``NUM`` greater than one.
784784

785-
- :envvar:`SAGE_NUM_THREADS` - if set to a number, then when building the
786-
documentation, parallel doctesting, or running ``sage -b``, use this many
787-
threads.
785+
- :envvar:`SAGE_NUM_THREADS` - if set to a number, then when rebuilding with
786+
``sage -b`` or parallel doctesting with ``sage -t -p 0``, use at most this
787+
many threads.
788+
788789
If this is not set, then determine the number of threads using the value of
789790
the :envvar:`MAKE` (see above) or :envvar:`MAKEFLAGS` environment variables.
790-
If none of these specifies a number of jobs, use one thread (except for
791-
parallel testing: there we use a default of the number of CPU cores, with a
792-
maximum of 8 and a minimum of 2).
791+
If none of these specifies a number of jobs,
792+
- ``sage -b`` only uses one thread
793+
- ``sage -t -p 0`` uses a default of the number of CPU cores, with a
794+
maximum of 8 and a minimum of 2.
795+
796+
When ``sage -t -p`` runs under the control of the GNU ``make``
797+
jobserver, then Sage will request as most this number of job slots.
793798

794799
- :envvar:`V` - if set to ``0``, silence the build. Instead of
795800
showing a detailed compilation log, only one line of output is shown

0 commit comments

Comments
 (0)