On Wednesday, October 9, 2024 at 2:17:34 AM UTC-3 marc....@gmail.com wrote:

The problem with Windows is just that cypari2 does not support it. 
CyPari works fine on Windows. There is some trickiness required to 
get cysignals to work on Windows. This is because sage's 
implementation of sig_on calls setjmp and expects a signal handler to 
call longjmp, but that scheme fails on Windows where each signal 
handler runs in a separate thread with its own stack. However, CyPari 
has a workaround for this. 


Thanks for the explanation. As far as I know, cysignals is another instance 
of a component originally developed for sagemath, about maybe 20 years ago, 
then separated into a standalone package. In theory, this separation should 
make it easier to support other OS, but the fact that windows support 
hasn't materialized yet is a sign that this is not so clear. The design may 
be showing its age, but it seems to me to be fundamentally intrinsic to 
sagemath. There are other problems with cysignals (e.g. 
https://github.com/sagemath/sage/issues/37026).

PS There is another problem with cypari2, completely unrelated to this 
thread, which prevents SnapPy from using it, even on platforms which 
are supported by cypari2. That problem is that huge memory leaks were 
introduced in cypari2 by a redesign of the Python Gen class to try to 
keep the Pari GEN managed by a Python Gen object on the Pari stack as 
long as possible. Those leaks make cypari2 unusable for us. CyPari 
has reverted to the original model, where each Pari GEN is moved to 
the Pari heap when its wrapper Gen is constructed, and is freed from 
the Pari heap in the wrapper's __dealloc__ method. That fixes the 
leaks. 


The pari stack is also fundamentally intrinsic to pari. I'm guessing 
there's a tension here between memory and performance.

Both issues seem to be important, but are contained in separate pypi 
packages. It doesn't seem that lack of modularization is what prevents them 
from working well on windows.

Best,
Gonzalo
 

-- 
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 on the web visit 
https://groups.google.com/d/msgid/sage-devel/605526ca-3d10-44d5-9ff7-cd338380125dn%40googlegroups.com.

Reply via email to