On Mon, Jul 9, 2018 at 6:35 PM Julian Rüth <julian.ru...@fsfe.org> wrote:
>
> Hello.
>
> since Sage 8.2 sage.parallel.ncpus.ncpus() returns 1 if you have no 
> environment variables such as MAKE, SAGE_NUM_THREADS, MAKEOPTS set.
>
> This number is used by the @parallel decorator and similar constructions to 
> determine the number of processes to run in parallel. (Unless during 
> doctests, then it's set to 2 I think.)
>
> The question is: What is a good default for things such as @parallel when 
> SAGE_NUM_THREADS has not been set? I think that 1 is not a good one. The 
> actual number of cores/threads on a system probably isn't either on servers 
> with lots of cores. At some point we had `min(8, number of threads)` which 
> appears reasonable to me.
>
> Please join the discussion at https://trac.sagemath.org/ticket/24937 :)

For the sake of reference, the standard library's
`multiprocessing.Pool` [1] just uses `os.cpu_count()` by default, and
I don't really see a problem with that.  If I want to limit
parallelization on a machine that I'm concurrently using for other
work, that's kind of a decision a human has to make.  If I have 32
cores why would I want it limited to 8, by default, for example?

(No, most people's personal machines won't have 32 cores, though
that's not going to be so uncommon forever...)

[1] 
https://docs.python.org/3.7/library/multiprocessing.html?highlight=process#multiprocessing.pool.Pool

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to