Data point : on 10.6.beta9 with Python 13.2, I get 1 if sage is started 
without defining SAGE_NUM_THREADS, and n if I define SAGE_NUM_THREADS being 
n :
charpent@brique:~$ sage 
┌────────────────────────────────────────────────────────────────────┐ │ 
SageMath version 10.6.beta9, Release Date: 2025-03-09 │ │ Using Python 
3.13.2. Type "help()" for help. │ 
└────────────────────────────────────────────────────────────────────┘ 
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ 
Warning: this is a prerelease version, and it may be unstable. ┃ 
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ 
sage: sage.parallel.ncpus.ncpus() 1 sage: quit charpent@brique:~$ 
SAGE_NUM_THREADS=8 sage 
┌────────────────────────────────────────────────────────────────────┐ │ 
SageMath version 10.6.beta9, Release Date: 2025-03-09 │ │ Using Python 
3.13.2. Type "help()" for help. │ 
└────────────────────────────────────────────────────────────────────┘ 
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ 
Warning: this is a prerelease version, and it may be unstable. ┃ 
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ 
sage: sage.parallel.ncpus.ncpus() 8 

HTH,
​
Le mercredi 12 mars 2025 à 00:13:41 UTC+1, enriqu...@gmail.com a écrit :

>
> For 10.5 with python 3.12.5, sage.parallel.ncpus.ncpus() is 1 without 
> giving a value to SAGE_NUM_THREADS and 16 if sage is opened as 
> "SAGE_NUM_THREADS=16 
> sage". For 10.6.beta9 (python 3.13.2), the value is always one; in another 
> computer 10.6.beta9 is using python 3.12.5 and the value is always one. 
> El miércoles, 12 de marzo de 2025 a las 6:15:27 UTC+9, dim...@gmail.com 
> escribió:
>
>> On Mon, Mar 10, 2025 at 4:28 AM enriqu...@gmail.com 
>> <enriqu...@gmail.com> wrote: 
>> > 
>> > If I set the variable SAGE_NUM_THREADS to a number of cores before 
>> opening a sage session (command line or jupyterlab) there is a different 
>> behaviour in 10.5 and in 10.6beta; 
>> > parallel computation can be done in 10.5, there is no effect in the 
>> beta version (I do not know when it started to fail). In the beta version 
>> parallel computation is possible declaring the number of cores using the 
>> following hack (suggested to me at some point by Miguel Marco) 
>> > def miscpus(): 
>> > return "put here the number of cores" 
>> > sage.parallel.ncpus.ncpus=miscpus 
>> > Is it possible to know when SAGE_NUM_THREADS lost its effects? 
>>
>> what is the output of sage.parallel.ncpus.ncpus() in 10.5 and in 
>> 10.6.beta* for you? 
>> (without using the hack above). Are they using the same Python version? 
>>
>> The code for sage.parallel.ncpus.ncpus didn't change for a year, since 
>> 10.3. 
>>
>> Dima 
>>
>>
>>
>>
>> > Thanks, Enrique. 
>> > 
>> > -- 
>> > 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+...@googlegroups.com. 
>> > To view this discussion visit 
>> https://groups.google.com/d/msgid/sage-devel/fe02ae5f-64ab-4fb5-a826-d97f3d418dccn%40googlegroups.com.
>>  
>>
>>
>

-- 
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 view this discussion visit 
https://groups.google.com/d/msgid/sage-devel/8dd43307-a166-41be-bfe7-a0c04fcf8cdbn%40googlegroups.com.

Reply via email to