[sage-support] Re: Tensor Multiprocessing broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-02-02 Thread 'Alan Stafford' via sage-support
If I restart the kernel multiprocessing gets reset back to spawn. Rather than have to set it back to fork in every cell it should be set to fork by the kernel restart code. On Friday, January 28, 2022 at 2:04:43 PM UTC egourg...@gmail.com wrote: > Le jeudi 27 janvier 2022 à 18:59:36 UTC+1,

[sage-support] Re: Tensor Multiprocessing broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-01-28 Thread Eric Gourgoulhon
Le jeudi 27 janvier 2022 à 18:59:36 UTC+1, alan_thoma...@yahoo.co.uk a écrit : > That works. I get all cores used. > Great! I've opened the ticket https://trac.sagemath.org/ticket/33241 for that. Eric. -- You received this message because you are subscribed to the Google Groups

[sage-support] Re: Tensor Multiprocessing broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-01-27 Thread 'Alan Stafford' via sage-support
mp.set_start_method('fork',force=True) lets one rerun the notebook without restarting. On Thursday, January 27, 2022 at 5:59:36 PM UTC Alan Stafford wrote: > That works. I get all cores used. > On Thursday, January 27, 2022 at 1:20:26 PM UTC egourg...@gmail.com wrote: > >> Le mardi 25 janvier

[sage-support] Re: Tensor Multiprocessing broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-01-27 Thread 'Alan Stafford' via sage-support
if mp.get_start_method() != 'fork' : mp.set_start_method('fork') Lets one rerun the notebook without restarting the kernel. On Thursday, January 27, 2022 at 5:59:36 PM UTC Alan Stafford wrote: > That works. I get all cores used. > On Thursday, January 27, 2022 at 1:20:26 PM UTC

[sage-support] Re: Tensor Multiprocessing broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-01-27 Thread 'Alan Stafford' via sage-support
Adding : import multiprocessing as mp if mp.get_start_method != 'fork' : mp.set_start_method('fork') Lets one rerun the notebook without restarting the kernel. One can delete the line: os.environ['SAGE_NUM_THREADS'] = '4' On Thursday, January 27, 2022 at 5:59:36 PM UTC Alan Stafford wrote: >

[sage-support] Re: Tensor Multiprocessing broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-01-27 Thread 'Alan Stafford' via sage-support
That works. I get all cores used. On Thursday, January 27, 2022 at 1:20:26 PM UTC egourg...@gmail.com wrote: > Le mardi 25 janvier 2022 à 23:59:20 UTC+1, John H Palmieri a écrit : > >> Are you using OS X? Could this possibly be due to how Python handles >> multiprocessing on OS X vs. other

[sage-support] Re: Tensor Multiprocessing broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-01-27 Thread Eric Gourgoulhon
Le mardi 25 janvier 2022 à 23:59:20 UTC+1, John H Palmieri a écrit : > Are you using OS X? Could this possibly be due to how Python handles > multiprocessing on OS X vs. other platforms? (See > > https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods, > > in

[sage-support] Re: Tensor Multiprocessing broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-01-27 Thread 'Alan Stafford' via sage-support
ImportError: cannot import name 'NumberField' from partially initialized module 'sage.rings.number_field.number_field' (most likely due to a circular import)

[sage-support] Re: Tensor Multiprocessing broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-01-26 Thread 'Alan Stafford' via sage-support
SageMath 9.1 works with the 9.5 version of ncpus.py so one can disregard my tinkering with it. On Wednesday, January 26, 2022 at 10:12:33 AM UTC Alan Stafford wrote: > I am using Mac OS 12.1 Monterey. The notebook works on Sagemath 9.1 if I > hack ncpus.py to return 4. > > On Tuesday,

[sage-support] Re: Tensor Multiprocessing broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-01-26 Thread 'Alan Stafford' via sage-support
I am using Mac OS 12.1 Monterey. The notebook works on Sagemath 9.1 if I hack ncpus.py to return 4. On Tuesday, January 25, 2022 at 10:59:20 PM UTC John H Palmieri wrote: > Are you using OS X? Could this possibly be due to how Python handles > multiprocessing on OS X vs. other platforms? (See

[sage-support] Re: Tensor Multiprocessing broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-01-25 Thread John H Palmieri
Are you using OS X? Could this possibly be due to how Python handles multiprocessing on OS X vs. other platforms? (See https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods, in particular the comment "On macOS, the *spawn* start method is now the default" and

[sage-support] Re: Tensor Multiprocessing broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-01-25 Thread 'Alan Stafford' via sage-support
Process SpawnPoolWorker-1: Traceback (most recent call last): File "/private/var/tmp/sage-9.5-current/local/var/lib/sage/venv-python3.9.9/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap self.run() File

[sage-support] Re: Tensor Multiprocessing broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-01-25 Thread Eric Gourgoulhon
Hi, Le mardi 25 janvier 2022 à 12:54:57 UTC+1, alan_thoma...@yahoo.co.uk a écrit : > I get errors in this notebook if I set the variable tpar to any value > greater than one. (Number of Tensor processing cores.) > > *http://alan.atstafford.co.uk/Sage9.5Problem.ipynb >