Re: [sage-support] Set(L) == L and Set(L) != L are True at the same time?!

2023-02-23 Thread 'Alan Stafford' via sage-support
 Bernards Paradox. Anything is a set even the empty set. And the empty set 
contains itself. Axiom 11 is the source of the paradox.
Regards
Alan
On Thursday, 23 February 2023 at 13:13:33 GMT, Dima Pasechnik 
 wrote:  
 
 I opened
https://github.com/sagemath/sage/issues/35178
on this

On Thu, Feb 23, 2023 at 9:17 AM 'Peter Mueller' via sage-support
 wrote:
>
> Secundum non datur ...:
>
> sage: L = {0}
> sage: L == Set(L)
> True
> sage: L != Set(L)
> True
>
> How can this happen?! With  the python bulltin `set` instead of `Set` I get 
> the expected behavior though. (I'm using Sage version 9.8.)
>
> -- Peter Mueller
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/9b354d1b-7d08-48d4-9af4-e10532969e4fn%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAAWYfq3UK--5_i6dfnz7zDuO2S7j2U%3DpEzMtaa9McC%2Bb2WN16A%40mail.gmail.com.
  

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/2030022427.5776011.1677164271600%40mail.yahoo.com.


Re: [sage-support] 3d graphics crash (on Mac)

2022-07-13 Thread 'Alan Stafford' via sage-support
I am using Safari on MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports).

On Wednesday, July 13, 2022 at 7:32:41 PM UTC+1 Alan Stafford wrote:

> How does this look? http::///alan.atstafford.co.uk/Penrose/graphic.html
>
> On Wednesday, July 13, 2022 at 6:35:48 PM UTC+1 dim...@gmail.com wrote:
>
>>
>>
>> On Wed, 13 Jul 2022, 16:02 harald@gmail.com,  
>> wrote:
>>
>>> Hi,
>>>
>>> I am running Sagemath on a Mac Mini (2018; Intel).
>>>
>>> I used to have no problems when asking Sagemath to display 3d objects 
>>> (polygons), which I could then rotate, animate
>>>
>>> I haven't used my code for doing that sort of thing for a month or two 
>>> or so. Yesterday, I loaded it again, and, to my surprise, the 3D-graphics 
>>> capabilities of Sagemath kept crashing. (Firefox freezes for about a 
>>> minute, and then things go on as normal, except there are no 3D graphics 
>>> anymore - just a little circled "i" on the lower right corner.)
>>>
>>
>> Does it work with Safari or Chrome?
>>
>>>
>>> What may be going on? Upgrading from Sagemath 9.5 to 9.6 hasn't solved 
>>> the problem.
>>>
>>> Best
>>> Harald
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "sage-support" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to sage-support...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/sage-support/033f274d-bab5-4ad4-a712-2818a50324c2n%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/27026ceb-134d-4d9b-a759-64f58f0fad97n%40googlegroups.com.


Re: [sage-support] 3d graphics crash (on Mac)

2022-07-13 Thread 'Alan Stafford' via sage-support
How does this look? http::///alan.atstafford.co.uk/Penrose/graphic.html

On Wednesday, July 13, 2022 at 6:35:48 PM UTC+1 dim...@gmail.com wrote:

>
>
> On Wed, 13 Jul 2022, 16:02 harald@gmail.com,  
> wrote:
>
>> Hi,
>>
>> I am running Sagemath on a Mac Mini (2018; Intel).
>>
>> I used to have no problems when asking Sagemath to display 3d objects 
>> (polygons), which I could then rotate, animate
>>
>> I haven't used my code for doing that sort of thing for a month or two or 
>> so. Yesterday, I loaded it again, and, to my surprise, the 3D-graphics 
>> capabilities of Sagemath kept crashing. (Firefox freezes for about a 
>> minute, and then things go on as normal, except there are no 3D graphics 
>> anymore - just a little circled "i" on the lower right corner.)
>>
>
> Does it work with Safari or Chrome?
>
>>
>> What may be going on? Upgrading from Sagemath 9.5 to 9.6 hasn't solved 
>> the problem.
>>
>> Best
>> Harald
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "sage-support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to sage-support...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-support/033f274d-bab5-4ad4-a712-2818a50324c2n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/72dd016d-db37-4670-94d8-d1f541bfa00dn%40googlegroups.com.


Re: [sage-support] Re: Sage ImportError: canot load Singular library

2022-06-10 Thread 'Alan Stafford' via sage-support
 sudo cd / sudo rm -r *.*


On Friday, 10 June 2022, 10:41:59 BST, Vegard Lima  
wrote:  
 
 Hi,

there should be a fix for this in updates-testing for Fedora 36:
$ sudo dnf update sagemath --enablerepo=updates-testing

You might have to do this first:
$ sudo dnf erase sagemath-doc-en

Cheers,
Vegard

On Thu, Jun 2, 2022 at 9:36 AM Francesco Buscemi  wrote:
>
> Hello there; any news? I'm getting exactly the same errors...
>
> On Wednesday, May 11, 2022 at 7:23:15 PM UTC+9 jacovant...@gmail.com wrote:
>>
>> I am running Fedora 36 (had the same issue in Fedora 35) on a Lenovo 
>> IdeaPad. After installing sage using dnf I tried running it but it failed 
>> due to: "ImportError: cannot load Singular library from libSingular.so 
>> (b'libSingular.so: cannot open shared object file: No such file or 
>> directory')". The full error report is:
>>
>> Error in sys.excepthook:
>> Traceback (most recent call last):
>>  File "/usr/lib64/python3.10/pathlib.py", line 1303, in is_dir
>>    return S_ISDIR(self.stat().st_mode)
>> AttributeError: 'str' object has no attribute 'stat'
>>
>> Original exception was:
>> Traceback (most recent call last):
>>  File "/usr/lib64/sagemath/local/bin/sage-ipython", line 15, in 
>>    app.initialize()
>>  File 
>>"/home/jacovantonder/.local/lib/python3.10/site-packages/traitlets/config/application.py",
>> line 88, in inner
>>    return method(app, *args, **kwargs)
>>  File "/usr/lib/python3.10/site-packages/IPython/terminal/ipapp.py", line 
>>276, in initialize
>>    self.init_shell()
>>  File "/usr/lib64/python3.10/site-packages/sage/repl/interpreter.py", line 
>>789, in init_shell
>>    self.shell.extension_manager.load_extension(SAGE_EXTENSION)
>>  File "/usr/lib/python3.10/site-packages/IPython/core/extensions.py", line 
>>76, in load_extension
>>    return self._load_extension(module_str)
>>  File "/usr/lib/python3.10/site-packages/IPython/core/extensions.py", line 
>>99, in _load_extension
>>    if self._call_load_ipython_extension(mod):
>>  File "/usr/lib/python3.10/site-packages/IPython/core/extensions.py", line 
>>151, in _call_load_ipython_extension
>>    mod.load_ipython_extension(self.shell)
>>  File "/usr/lib64/python3.10/site-packages/sage/repl/__init__.py", line 5, 
>>in load_ipython_extension
>>    sage.repl.ipython_extension.load_ipython_extension(*args)
>>  File "/usr/lib64/python3.10/site-packages/sage/repl/ipython_extension.py", 
>>line 617, in wrapper
>>    result = func(*args, **kwargs)
>>  File "/usr/lib64/python3.10/site-packages/sage/repl/ipython_extension.py", 
>>line 630, in load_ipython_extension
>>    SageCustomizations(shell=ip)
>>  File "/usr/lib64/python3.10/site-packages/sage/repl/ipython_extension.py", 
>>line 434, in __init__
>>    import sage.all # until sage's import hell is fixed
>>  File "/usr/lib64/python3.10/site-packages/sage/all.py", line 131, in 
>>
>>    from sage.rings.all      import *
>>  File "/usr/lib64/python3.10/site-packages/sage/rings/all.py", line 87, in 
>>
>>    from .qqbar import (AlgebraicRealField, AA,
>>  File "/usr/lib64/python3.10/site-packages/sage/rings/qqbar.py", line 2810, 
>>in 
>>    QQxy = QQ['x', 'y']
>>  File "sage/structure/parent.pyx", line 1276, in 
>>sage.structure.parent.Parent.__getitem__
>>  File "/usr/lib64/python3.10/site-packages/sage/categories/rings.py", line 
>>1177, in __getitem__
>>    return PolynomialRing(self, elts)
>>  File 
>>"/usr/lib64/python3.10/site-packages/sage/rings/polynomial/polynomial_ring_constructor.py",
>> line 647, in PolynomialRing
>>    return _multi_variate(base_ring, names, **kwds)
>>  File 
>>"/usr/lib64/python3.10/site-packages/sage/rings/polynomial/polynomial_ring_constructor.py",
>> line 775, in _multi_variate
>>    from sage.rings.polynomial.multi_polynomial_libsingular import 
>>MPolynomialRing_libsingular
>>  File "sage/rings/polynomial/multi_polynomial_libsingular.pyx", line 1, in 
>>init sage.rings.polynomial.multi_polynomial_libsingular
>>  File "sage/libs/singular/singular.pyx", line 1558, in init 
>>sage.libs.singular.singular
>>  File "sage/libs/singular/singular.pyx", line 1532, in 
>>sage.libs.singular.singular.init_libsingular
>> ImportError: cannot load Singular library from libSingular.so 
>> (b'libSingular.so: cannot open shared object file: No such file or 
>> directory')
>>
>> I've had issues with installing sage with conda as well. Not being able to 
>> get the kernel to connect in Jupyter.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/c436992f-2358-401c-94b0-c7ed4d434f20n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 

Re: [sage-support] Create the groups which are given as the vector space (or module) over integers.

2022-06-10 Thread 'Alan Stafford' via sage-support
 Burgers vector - Wikipedia


| 
| 
| 
|  |  |

 |

 |
| 
|  | 
Burgers vector - Wikipedia

The vector's magnitude and direction is best understood when the 
dislocation-bearing crystal structure is first ...
 |

 |

 |



On Friday, 10 June 2022, 11:10:36 BST, Hongyi Zhao  
wrote:  
 
 For crystallographic space groups, say, the diamond structure, we have the 
following information, as described here [1].

The primitive cell lattice vectors can be defined as follows:

 a1 = (0, 1/2, 1/2), a2 = (1/2, 0, 1/2), a3 = (1/2, 1/2, 0)
The translation vectors, can be selected as follows:
t0 = (0, 0, 0), t1 = (0, 1/2, 1/2), t2 = (1/2, 0, 1/2), t3 = (1/2, 1/2, 0)

The above-mentioned translation vectors can be used to extend the primitive 
cell to the larger conventional cell, which has the following lattice vectors:
b1 = (1, 0, 0), b2 = (0, 1, 0), b3 = (0, 0, 1)
It is well known that the above specific set of vectors can be studied by the 
group theory method, say by lattice [2], or by the groups of vector space (or 
module) over integers
Having said that, I still feel that using such group tools to study the problem 
described here is quite difficult. Any hints/tips will be highly appreciated.

[1] https://en.wikipedia.org/wiki/Unit_cell[2] 
https://en.wikipedia.org/wiki/Lattice_(group)
Regards,HZ


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/5b42a54b-96fe-4e78-aa7e-bdabe04850c5n%40googlegroups.com.
  

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/637612474.1929730.1654861317639%40mail.yahoo.com.


Re: [sage-support] Re: Kerr_Schild.ipynb link and 9.6

2022-05-20 Thread 'Alan Stafford' via sage-support
Don't be embarrassed, I did the same at first. Really useful notebook to 
me.  I had missed it before.

Alan

On Friday, May 20, 2022 at 9:50:06 PM UTC+1 raymond@gmail.com wrote:

> Duh...  somewhere I started "save as" on the text leader not [ipynb]
> Embarrassed
> Ray
> On 5/20/22 16:05, 'Alan Stafford' via sage-support wrote:
>
> You need to do a save link as on [ipnyb] not just click on it. 
> Regards
> Alan
>
> On Friday, May 20, 2022 at 6:29:39 PM UTC+1 raymond@gmail.com wrote:
>
>> Hi, I  downloaded Kerr_Schild.ipynb  at 
>> https://luth.obspm.fr/~luthier/gourgoulhon/bh16/sage.html
>> It complains about JSON formatting.
>>
>> A previous version of Kerr_Schild.ipynb (date?) works. for 
>> sage --notebook=jupyter Kerr_Schild.ipynb
>>
>> Attached is a terminal output.  I included everything since I have been 
>> burned by throwing "irrelevant" output out.  It does open the browser to a 
>> login but barfs after the login with a rectangular JSON complaint.  It's 
>> reluctant to be copy/paste but I can do a screen capture if wanted.
>> jupyterlab  has a similar characteristic; passing old and failing new 
>> download with the failing screen 
>> File Load Error for Kerr_Schild.ipynb
>>
>> Unreadable Notebook: xx
>> x/gr/kerr/Sagemath/Kerr_Schild-22/Kerr_Schild.ipynb
>> NotJSONError("Notebook does not appear to be JSON:
>> '\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n>
>> 's to protect the guilty
>>
>> Ray
>>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-support...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/5b60-ea75-4a53-a833-aef318a5b770n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/sage-support/5b60-ea75-4a53-a833-aef318a5b770n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/3bf55bab-b277-492d-894f-3835749a1f36n%40googlegroups.com.


[sage-support] Re: Kerr_Schild.ipynb link and 9.6

2022-05-20 Thread &#x27;Alan Stafford&#x27; via sage-support
You need to do a save link as on [ipnyb] not just click on it.
Regards
Alan

On Friday, May 20, 2022 at 6:29:39 PM UTC+1 raymond@gmail.com wrote:

> Hi, I  downloaded Kerr_Schild.ipynb  at 
> https://luth.obspm.fr/~luthier/gourgoulhon/bh16/sage.html
> It complains about JSON formatting.
>
> A previous version of Kerr_Schild.ipynb (date?) works. for 
> sage --notebook=jupyter Kerr_Schild.ipynb
>
> Attached is a terminal output.  I included everything since I have been 
> burned by throwing "irrelevant" output out.  It does open the browser to a 
> login but barfs after the login with a rectangular JSON complaint.  It's 
> reluctant to be copy/paste but I can do a screen capture if wanted.
> jupyterlab  has a similar characteristic; passing old and failing new 
> download with the failing screen 
> File Load Error for Kerr_Schild.ipynb
>
> Unreadable Notebook: xx
> x/gr/kerr/Sagemath/Kerr_Schild-22/Kerr_Schild.ipynb
> NotJSONError("Notebook does not appear to be JSON:
> '\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n
> 's to protect the guilty
>
> Ray
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/5b60-ea75-4a53-a833-aef318a5b770n%40googlegroups.com.


[sage-support] Re: Quaternions and Lorentz Transformations

2022-04-22 Thread &#x27;Alan Stafford&#x27; via sage-support
I was trying to look at the link between quaternions and twistor space. I 
did a little notebook. Not exactly what you are looking at but it might 
help.

On Saturday, April 16, 2022 at 10:55:31 AM UTC+1 ny22...@gmail.com wrote:

> I am trying to understand how to use Quaternions within sagemath to 
> replicate Lorentz transforms.
>
> In other words, Lorentz transforms are rotations within a 4D spacetime and 
> I need to understand how they can be expressed in terms of quaternions.
>
> I looked up examples of quaternions usage and they seem cryptic...
>
> Since I suspect this issue has been solved a long time ago, I am asking 
> for help finding the appropriate code.
>
> Cheers,
>
> Marco  
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/42762710-f6d0-4742-a0b8-e5983cfcdfc2n%40googlegroups.com.


Twistor.ipynb
Description: Binary data


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

2022-02-09 Thread &#x27;Alan Stafford&#x27; via sage-support
Interact is broken for SageMath 9.5, it works in 9.4 so I don't understand 
the pull request.

On Wednesday, February 9, 2022 at 10:01:01 AM UTC slelievre wrote:

> Pull request to fix Sage interacts on the CoCalc side:
>
> - https://github.com/sagemathinc/cocalc/pull/5721
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/4b645611-eb44-485a-a1bf-6b2e18710534n%40googlegroups.com.


Re: [sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-02-06 Thread &#x27;Alan Stafford&#x27; via sage-support
No, it works with the 9.4 kernel but not with the 9.5 beta.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/a069841e-1d16-41b6-9563-30eb40421e45n%40googlegroups.com.


[sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-02-06 Thread &#x27;Alan Stafford&#x27; via sage-support
My point is that it is the same on Apple Mac, that it isn't related to the 
recent interface and multiprocessing problems but has just appeared with 
the 9.5 kernel beta release as it works with the 9.4 kernel.

On Sunday, February 6, 2022 at 8:53:51 AM UTC Emmanuel Charpentier wrote:

> That was my initial complaint... ;-)
>
> Le samedi 5 février 2022 à 18:05:42 UTC+1, alan_thoma...@yahoo.co.uk a 
> écrit :
>
>> M.eigenvalues() never returns.
>> On Saturday, February 5, 2022 at 11:48:47 AM UTC Emmanuel Charpentier 
>> wrote:
>>
>>> What exactly fails in the example ?
>>>
>>> Le vendredi 4 février 2022 à 13:20:26 UTC+1, alan_thoma...@yahoo.co.uk 
>>> a écrit :
>>>

 On Apple Mac the example above runs on the 9.4 kernel using either the 
 9.4 or 9.5  interface but not on the 9.5 kernel from either Interface.
 On Thursday, February 3, 2022 at 6:44:47 AM UTC Emmanuel Charpentier 
 wrote:

> Le mercredi 2 février 2022 à 22:15:00 UTC+1, Nils Bruin a écrit :
>
> On Monday, 31 January 2022 at 15:19:49 UTC-8 Emmanuel Charpentier 
>> wrote:
>>
>>> As advertised, an atempt at a minimal (non-)working example :
>>>
>>> # Reproducible minimal example
>>> with seed(0): M = matrix(AA, 3, 3, lambda u,v: AA.random_element())
>>> # Working ring
>>> WR = M.base_ring().algebraic_closure()
>>> # A variable to carry the eigenvalues
>>> l = SR.var("l")
>>> # Vector of unknowns for the eigenvectors
>>> V =vector(list(var("v", n=2))+[SR(1)])
>>> # M.eigenvalues does not return. Get them by hand
>>>
>>> Actually, for me on 9.5beta9, `M.eigenvalues()` works just fine.
>>
> Hmmm… You may have obtained a “less pathological” M than I did, due to 
> possible differences in random numbers generation (notwithstanding my 
> attempt at reproducibility…). 
>
> What do you get for M ? I have :
>
> sage: with seed(0): M = matrix(AA, 3, 3, lambda u,v: AA.random_element())
> sage: M.apply_map(lambda u:u.radical_expression())
> [   -sqrt(2) - 1-1/4  -2*sqrt(3)]
> [1/2  1/8*sqrt(33) + 1/8 -1/5*sqrt(29) + 3/5]
> [  0 1/4 1/2]
>
> So the problem is perhaps just platform-dependent, or there is a very 
>> recent change that affected this (my M gets just integer entries from 
>> {-2..2})
>>
> Okay. We have a problem in reproducibility : with seed(0): should 
> entail a reproducible, platform-independent result. It did not. BTW, what 
> is your platform ?
>
> Suggestions on how to document this and file a ticket ?
>
> I agree with the rest of your conclusions, but going to numerical 
> approximations then trying to somehow “recognize” the algebraics they are 
> approximations of somehow denies the whole point of working in QQbar…
>
> Looking at the example a bit: you'd be forcing sage to work with a 
>> huge compositum if you're actually getting a 3x3 matrix with 
>> non-rational 
>> algebraic entries: even if they are just independent quadratics, you'd 
>> end 
>> up in an extension of degree 2^9. This will only work in very limited 
>> cases.
>>
>> One way to get this kind of thing to work is to work with 
>> high-precision floats, use numerically (fairly) stable methods to 
>> compute 
>> the desired answer, and then try to recognize it as algebraic. You 
>> probably 
>> only care if it is one of fairly low height. You can then try to turn 
>> your 
>> computation into proof, possibly by tracing through height bounds and 
>> showing your precision was sufficient to identify the right solution 
>> uniquely.
>>
>> You could work on automating this kind of thing, but I doubt you'd 
>> ever get it to work on a reasonable range of examples; just because the 
>> height bounds would be rather ill-behaved.
>>
>> You can still trace the root cause further on this and perhaps 
>> improve arithmetic in AA a bit, but the general shape of the problem 
>> you're 
>> trying to deal with does not look promising for generally performant 
>> methods. 
>>
> ​
>


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/0103d0cd-ae31-4e6f-861f-ccbbbda26830n%40googlegroups.com.


[sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-02-05 Thread &#x27;Alan Stafford&#x27; via sage-support
M.eigenvalues() never returns.
On Saturday, February 5, 2022 at 11:48:47 AM UTC Emmanuel Charpentier wrote:

> What exactly fails in the example ?
>
> Le vendredi 4 février 2022 à 13:20:26 UTC+1, alan_thoma...@yahoo.co.uk a 
> écrit :
>
>>
>> On Apple Mac the example above runs on the 9.4 kernel using either the 
>> 9.4 or 9.5  interface but not on the 9.5 kernel from either Interface.
>> On Thursday, February 3, 2022 at 6:44:47 AM UTC Emmanuel Charpentier 
>> wrote:
>>
>>> Le mercredi 2 février 2022 à 22:15:00 UTC+1, Nils Bruin a écrit :
>>>
>>> On Monday, 31 January 2022 at 15:19:49 UTC-8 Emmanuel Charpentier wrote:

> As advertised, an atempt at a minimal (non-)working example :
>
> # Reproducible minimal example
> with seed(0): M = matrix(AA, 3, 3, lambda u,v: AA.random_element())
> # Working ring
> WR = M.base_ring().algebraic_closure()
> # A variable to carry the eigenvalues
> l = SR.var("l")
> # Vector of unknowns for the eigenvectors
> V =vector(list(var("v", n=2))+[SR(1)])
> # M.eigenvalues does not return. Get them by hand
>
> Actually, for me on 9.5beta9, `M.eigenvalues()` works just fine.

>>> Hmmm… You may have obtained a “less pathological” M than I did, due to 
>>> possible differences in random numbers generation (notwithstanding my 
>>> attempt at reproducibility…). 
>>>
>>> What do you get for M ? I have :
>>>
>>> sage: with seed(0): M = matrix(AA, 3, 3, lambda u,v: AA.random_element())
>>> sage: M.apply_map(lambda u:u.radical_expression())
>>> [   -sqrt(2) - 1-1/4  -2*sqrt(3)]
>>> [1/2  1/8*sqrt(33) + 1/8 -1/5*sqrt(29) + 3/5]
>>> [  0 1/4 1/2]
>>>
>>> So the problem is perhaps just platform-dependent, or there is a very 
 recent change that affected this (my M gets just integer entries from 
 {-2..2})

>>> Okay. We have a problem in reproducibility : with seed(0): should 
>>> entail a reproducible, platform-independent result. It did not. BTW, what 
>>> is your platform ?
>>>
>>> Suggestions on how to document this and file a ticket ?
>>>
>>> I agree with the rest of your conclusions, but going to numerical 
>>> approximations then trying to somehow “recognize” the algebraics they are 
>>> approximations of somehow denies the whole point of working in QQbar…
>>>
>>> Looking at the example a bit: you'd be forcing sage to work with a huge 
 compositum if you're actually getting a 3x3 matrix with non-rational 
 algebraic entries: even if they are just independent quadratics, you'd end 
 up in an extension of degree 2^9. This will only work in very limited 
 cases.

 One way to get this kind of thing to work is to work with 
 high-precision floats, use numerically (fairly) stable methods to compute 
 the desired answer, and then try to recognize it as algebraic. You 
 probably 
 only care if it is one of fairly low height. You can then try to turn your 
 computation into proof, possibly by tracing through height bounds and 
 showing your precision was sufficient to identify the right solution 
 uniquely.

 You could work on automating this kind of thing, but I doubt you'd ever 
 get it to work on a reasonable range of examples; just because the height 
 bounds would be rather ill-behaved.

 You can still trace the root cause further on this and perhaps improve 
 arithmetic in AA a bit, but the general shape of the problem you're trying 
 to deal with does not look promising for generally performant methods. 

>>> ​
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/92849dec-4de0-4685-84bb-46e044e421e2n%40googlegroups.com.


[sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-02-04 Thread &#x27;Alan Stafford&#x27; via sage-support

On Apple Mac the example above runs on the 9.4 kernel using either the 9.4 
or 9.5  interface but not on the 9.5 kernel from either Interface.
On Thursday, February 3, 2022 at 6:44:47 AM UTC Emmanuel Charpentier wrote:

> Le mercredi 2 février 2022 à 22:15:00 UTC+1, Nils Bruin a écrit :
>
> On Monday, 31 January 2022 at 15:19:49 UTC-8 Emmanuel Charpentier wrote:
>>
>>> As advertised, an atempt at a minimal (non-)working example :
>>>
>>> # Reproducible minimal example
>>> with seed(0): M = matrix(AA, 3, 3, lambda u,v: AA.random_element())
>>> # Working ring
>>> WR = M.base_ring().algebraic_closure()
>>> # A variable to carry the eigenvalues
>>> l = SR.var("l")
>>> # Vector of unknowns for the eigenvectors
>>> V =vector(list(var("v", n=2))+[SR(1)])
>>> # M.eigenvalues does not return. Get them by hand
>>>
>>> Actually, for me on 9.5beta9, `M.eigenvalues()` works just fine.
>>
> Hmmm… You may have obtained a “less pathological” M than I did, due to 
> possible differences in random numbers generation (notwithstanding my 
> attempt at reproducibility…). 
>
> What do you get for M ? I have :
>
> sage: with seed(0): M = matrix(AA, 3, 3, lambda u,v: AA.random_element())
> sage: M.apply_map(lambda u:u.radical_expression())
> [   -sqrt(2) - 1-1/4  -2*sqrt(3)]
> [1/2  1/8*sqrt(33) + 1/8 -1/5*sqrt(29) + 3/5]
> [  0 1/4 1/2]
>
> So the problem is perhaps just platform-dependent, or there is a very 
>> recent change that affected this (my M gets just integer entries from 
>> {-2..2})
>>
> Okay. We have a problem in reproducibility : with seed(0): should entail 
> a reproducible, platform-independent result. It did not. BTW, what is your 
> platform ?
>
> Suggestions on how to document this and file a ticket ?
>
> I agree with the rest of your conclusions, but going to numerical 
> approximations then trying to somehow “recognize” the algebraics they are 
> approximations of somehow denies the whole point of working in QQbar…
>
> Looking at the example a bit: you'd be forcing sage to work with a huge 
>> compositum if you're actually getting a 3x3 matrix with non-rational 
>> algebraic entries: even if they are just independent quadratics, you'd end 
>> up in an extension of degree 2^9. This will only work in very limited cases.
>>
>> One way to get this kind of thing to work is to work with high-precision 
>> floats, use numerically (fairly) stable methods to compute the desired 
>> answer, and then try to recognize it as algebraic. You probably only care 
>> if it is one of fairly low height. You can then try to turn your 
>> computation into proof, possibly by tracing through height bounds and 
>> showing your precision was sufficient to identify the right solution 
>> uniquely.
>>
>> You could work on automating this kind of thing, but I doubt you'd ever 
>> get it to work on a reasonable range of examples; just because the height 
>> bounds would be rather ill-behaved.
>>
>> You can still trace the root cause further on this and perhaps improve 
>> arithmetic in AA a bit, but the general shape of the problem you're trying 
>> to deal with does not look promising for generally performant methods. 
>>
> ​
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/5075f1d9-b060-49e7-ba30-216df60a2336n%40googlegroups.com.


[sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-02-02 Thread &#x27;Alan Stafford&#x27; via sage-support
Do you mean, V =vector(list(var("v0", n=2))+[SR(1)])
Also, what is E0?
On Wednesday, February 2, 2022 at 6:08:20 PM UTC Emmanuel Charpentier wrote:

> See lines #7-8 of the "Minimal example" :
>
> Le mercredi 2 février 2022 à 11:57:41 UTC+1, alan_thoma...@yahoo.co.uk a 
> écrit :
>
>>
>> What is v0? When I run the above it isn't defined.
>> On Monday, January 31, 2022 at 11:19:49 PM UTC Emmanuel Charpentier wrote:
>>
>>> As advertised, an atempt at a minimal (non-)working example :
>>>
>>> # Reproducible minimal example
>>> with seed(0): M = matrix(AA, 3, 3, lambda u,v: AA.random_element())
>>> # Working ring
>>> WR = M.base_ring().algebraic_closure()
>>> # A variable to carry the eigenvalues
>>> l = SR.var("l")
>>>
>>>
> Here is the definition you seek : 
>
>>
>>> # Vector of unknowns for the eigenvectors
>>> V =vector(list(var("v", n=2))+[SR(1)])
>>>
>>>
> Is that clearer ?
>  
>
>>
>>> # M.eigenvalues does not return. Get them by hand
>>> # Equation determining the eigenspace
>>> ESE = M-l*identity_matrix(WR, 3)
>>> # Eigenvalues
>>> EVa = ESE.det().roots(ring=WR)
>>> # M.eigenvectors_left() doesn't return.
>>> # Set up a system of equations whose roots define the eigenvectors.
>>> Sys = ESE*V
>>> # Solve for each eigenvalue
>>> # solve([u.subs(l==EVa[0][0]) for u in Sys],list(V[:2])) fails.
>>> # Try to solve manually by substitution
>>> # First equation, first variable.
>>> # solve(Sys[0].subs(l==EVa[0][0]), v0) fails.
>>> # Try to solve by explicit algebraic manipulation
>>> E00 = Sys[0].subs(l==EVa[0][0])
>>> # Isolate v0
>>> V00=E0/E00.coefficient(v0) # fast
>>>
>>> At this point, tryoing to proint V00‘s value “never returns”. However, 
>>> a forst interruption (C-C) prints :
>>>
>>> sage: V00
>>>   C-c 
>>> C-c---
>>> AttributeErrorTraceback (most recent call last)
>>> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
>>>  in minpoly(self)
>>>4492 try:
>>> -> 4493 return self._minimal_polynomial
>>>4494 except AttributeError:
>>>
>>> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/structure/element.pyx
>>>  in sage.structure.element.Element.__getattr__ 
>>> (build/cythonized/sage/structure/element.c:4754)()
>>> 493 """
>>> --> 494 return self.getattr_from_category(name)
>>> 495 
>>>
>>> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/structure/element.pyx
>>>  in sage.structure.element.Element.getattr_from_category 
>>> (build/cythonized/sage/structure/element.c:4866)()
>>> 506 cls = P._abstract_element_class
>>> --> 507 return getattr_from_other_class(self, cls, name)
>>> 508 
>>>
>>> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/cpython/getattr.pyx
>>>  in sage.cpython.getattr.getattr_from_other_class 
>>> (build/cythonized/sage/cpython/getattr.c:2633)()
>>> 360 dummy_error_message.name = name
>>> --> 361 raise AttributeError(dummy_error_message)
>>> 362 attribute = attr
>>>
>>> AttributeError: 'AlgebraicNumber' object has no attribute 
>>> '_minimal_polynomial'
>>>
>>> During handling of the above exception, another exception occurred:
>>>
>>> KeyboardInterrupt Traceback (most recent call last)
>>> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/structure/element.pyx
>>>  in sage.structure.element.Element.__richcmp__ 
>>> (build/cythonized/sage/structure/element.c:10418)()
>>>1110 return (self)._richcmp_(other, op)
>>> else:
>>> -> 1112 return coercion_model.richcmp(self, other, op)
>>>1113 
>>>1114 cpdef _richcmp_(left, right, int op):
>>>
>>> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/structure/coerce.pyx
>>>  in sage.structure.coerce.CoercionModel.richcmp 
>>> (build/cythonized/sage/structure/coerce.c:20625)()
>>>1979 assert not (isinstance(x, Element) and
>>>1980 
>>> (x)._parent.get_flag(Parent_richcmp_element_without_coercion))
>>> -> 1981 return PyObject_RichCompare(x, y, op)
>>>1982 
>>>1983 # Comparing with coercion didn't work, try something else.
>>>
>>> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/structure/element.pyx
>>>  in sage.structure.element.Element.__richcmp__ 
>>> (build/cythonized/sage/structure/element.c:10394)()
>>>1108 # an instance of Element. The explicit casts below make
>>>1109 # Cython generate optimized code for this call.
>>> -> 1110 return (self)._richcmp_(other, op)
>>> else:
>>>1112 return coercion_model.richcmp(self, other, op)
>>>
>>> /usr/local/sage-9/

[sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-02-02 Thread &#x27;Alan Stafford&#x27; via sage-support

What is v0? When I run the above it isn't defined.
On Monday, January 31, 2022 at 11:19:49 PM UTC Emmanuel Charpentier wrote:

> As advertised, an atempt at a minimal (non-)working example :
>
> # Reproducible minimal example
> with seed(0): M = matrix(AA, 3, 3, lambda u,v: AA.random_element())
> # Working ring
> WR = M.base_ring().algebraic_closure()
> # A variable to carry the eigenvalues
> l = SR.var("l")
> # Vector of unknowns for the eigenvectors
> V =vector(list(var("v", n=2))+[SR(1)])
> # M.eigenvalues does not return. Get them by hand
> # Equation determining the eigenspace
> ESE = M-l*identity_matrix(WR, 3)
> # Eigenvalues
> EVa = ESE.det().roots(ring=WR)
> # M.eigenvectors_left() doesn't return.
> # Set up a system of equations whose roots define the eigenvectors.
> Sys = ESE*V
> # Solve for each eigenvalue
> # solve([u.subs(l==EVa[0][0]) for u in Sys],list(V[:2])) fails.
> # Try to solve manually by substitution
> # First equation, first variable.
> # solve(Sys[0].subs(l==EVa[0][0]), v0) fails.
> # Try to solve by explicit algebraic manipulation
> E00 = Sys[0].subs(l==EVa[0][0])
> # Isolate v0
> V00=E0/E00.coefficient(v0) # fast
>
> At this point, tryoing to proint V00‘s value “never returns”. However, a 
> forst interruption (C-C) prints :
>
> sage: V00
>   C-c 
> C-c---
> AttributeErrorTraceback (most recent call last)
> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
>  in minpoly(self)
>4492 try:
> -> 4493 return self._minimal_polynomial
>4494 except AttributeError:
>
> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/structure/element.pyx
>  in sage.structure.element.Element.__getattr__ 
> (build/cythonized/sage/structure/element.c:4754)()
> 493 """
> --> 494 return self.getattr_from_category(name)
> 495 
>
> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/structure/element.pyx
>  in sage.structure.element.Element.getattr_from_category 
> (build/cythonized/sage/structure/element.c:4866)()
> 506 cls = P._abstract_element_class
> --> 507 return getattr_from_other_class(self, cls, name)
> 508 
>
> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/cpython/getattr.pyx
>  in sage.cpython.getattr.getattr_from_other_class 
> (build/cythonized/sage/cpython/getattr.c:2633)()
> 360 dummy_error_message.name = name
> --> 361 raise AttributeError(dummy_error_message)
> 362 attribute = attr
>
> AttributeError: 'AlgebraicNumber' object has no attribute 
> '_minimal_polynomial'
>
> During handling of the above exception, another exception occurred:
>
> KeyboardInterrupt Traceback (most recent call last)
> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/structure/element.pyx
>  in sage.structure.element.Element.__richcmp__ 
> (build/cythonized/sage/structure/element.c:10418)()
>1110 return (self)._richcmp_(other, op)
> else:
> -> 1112 return coercion_model.richcmp(self, other, op)
>1113 
>1114 cpdef _richcmp_(left, right, int op):
>
> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/structure/coerce.pyx
>  in sage.structure.coerce.CoercionModel.richcmp 
> (build/cythonized/sage/structure/coerce.c:20625)()
>1979 assert not (isinstance(x, Element) and
>1980 
> (x)._parent.get_flag(Parent_richcmp_element_without_coercion))
> -> 1981 return PyObject_RichCompare(x, y, op)
>1982 
>1983 # Comparing with coercion didn't work, try something else.
>
> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/structure/element.pyx
>  in sage.structure.element.Element.__richcmp__ 
> (build/cythonized/sage/structure/element.c:10394)()
>1108 # an instance of Element. The explicit casts below make
>1109 # Cython generate optimized code for this call.
> -> 1110 return (self)._richcmp_(other, op)
> else:
>1112 return coercion_model.richcmp(self, other, op)
>
> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/structure/element.pyx
>  in sage.structure.element.Element._richcmp_ 
> (build/cythonized/sage/structure/element.c:10500)()
>1112 return coercion_model.richcmp(self, other, op)
>1113 
> -> 1114 cpdef _richcmp_(left, right, int op):
>1115 r"""
>1116 Basic default implementation of rich comparisons for elements 
> with
>
> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
>  in _richcmp_(self, other, op)
>  

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

2022-02-02 Thread &#x27;Alan Stafford&#x27; 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, 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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/e5a7612b-662c-4f13-914d-525936401f6cn%40googlegroups.com.


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

2022-02-01 Thread &#x27;Alan Stafford&#x27; via sage-support
I have run the Recommended_9_5.pkg file.

On Monday, January 31, 2022 at 5:51:38 PM UTC Marc Culler wrote:

> It sounds to me like you do not have the SageMath 9.5 Jupyter kernel 
> installed in /usr/local.  That gets installed when you run the Installer 
> package that is included on the disk image.  Did you perhaps forget to run 
> that installer after dragging the app to /Applications?
>
> - Marc
>
> On Monday, January 31, 2022 at 9:09:42 AM UTC-6 alan_thoma...@yahoo.co.uk 
> wrote:
>
>>
>> I have downloaded both the SageMath 9.5 beta and 9.4 SageMath releases 
>> from git. I do not get widgets should I start the 9.4 or 9.5 kernel using 
>> the 9.5 interface, but I do when I use the 9.4 interface.
>> On Monday, January 31, 2022 at 12:45:31 PM UTC dim...@gmail.com wrote:
>>
>>> On Mon, Jan 31, 2022 at 3:59 AM 'Alan Stafford' via sage-support 
>>>  wrote: 
>>> > 
>>> > I have found that it doesn't work if I launch from the SageMath 9.5 
>>> icon for any kernel 9.4 or 9.5. If I launch from the SageMath 9.4 interface 
>>> it works for either kernel. 
>>>
>>> I am not sure I follow here. How do you install Sage? 
>>>
>>> The basic thing that should work is starting Sage from terminal, as 
>>>
>>> sage -n 
>>>
>>> The macOS GUI we used to have is quite broken, and was removed, the 
>>> one we currently recommend is 
>>> https://github.com/3-manifolds/Sage_macOS/releases 
>>>
>>>
>>> > 
>>> >>> 
>>> >>> 
>>> > -- 
>>> > You received this message because you are subscribed to the Google 
>>> Groups "sage-support" group. 
>>> > To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to sage-support...@googlegroups.com. 
>>> > To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/sage-support/7b98180b-e489-411b-a046-a8f30269d3f2n%40googlegroups.com.
>>>  
>>>
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/da329e7a-b28e-4028-b6ff-301e546f6e05n%40googlegroups.com.


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

2022-01-31 Thread &#x27;Alan Stafford&#x27; via sage-support

I have downloaded both the SageMath 9.5 beta and 9.4 SageMath releases from 
git. I do not get widgets should I start the 9.4 or 9.5 kernel using the 
9.5 interface, but I do when I use the 9.4 interface.
On Monday, January 31, 2022 at 12:45:31 PM UTC dim...@gmail.com wrote:

> On Mon, Jan 31, 2022 at 3:59 AM 'Alan Stafford' via sage-support
>  wrote:
> >
> > I have found that it doesn't work if I launch from the SageMath 9.5 icon 
> for any kernel 9.4 or 9.5. If I launch from the SageMath 9.4 interface it 
> works for either kernel.
>
> I am not sure I follow here. How do you install Sage?
>
> The basic thing that should work is starting Sage from terminal, as
>
> sage -n
>
> The macOS GUI we used to have is quite broken, and was removed, the
> one we currently recommend is
> https://github.com/3-manifolds/Sage_macOS/releases
>
>
> >
> >>>
> >>>
> > --
> > You received this message because you are subscribed to the Google 
> Groups "sage-support" group.
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to sage-support...@googlegroups.com.
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/7b98180b-e489-411b-a046-a8f30269d3f2n%40googlegroups.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/f5918c71-e7c1-4235-907c-8e3fd732ce56n%40googlegroups.com.


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

2022-01-30 Thread &#x27;Alan Stafford&#x27; via sage-support
I have found that it doesn't work if I launch from the SageMath 9.5 icon 
for any kernel 9.4 or 9.5. If I launch from the SageMath 9.4 interface it 
works for either kernel.


>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/7b98180b-e489-411b-a046-a8f30269d3f2n%40googlegroups.com.


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

2022-01-29 Thread &#x27;Alan Stafford&#x27; via sage-support
Exactly the same using Google Chrome.

On Saturday, January 29, 2022 at 8:09:36 PM UTC dim...@gmail.com wrote:

> On Sat, Jan 29, 2022 at 8:05 PM 'Alan Stafford' via sage-support
>  wrote:
> >
> > I only used Safari. Safari supports widgets at Cocalc so I can't think 
> that it won't support them should I run it locally. Interact has worked on 
> previous versions of SageMath. I am hoping the Mac support team will look 
> into this.
>
> Cocalc has its own implementation for handling ipython notebooks. No
> wonder that it might be totally different locally, with different code
> handling notebook.
>
> Can you try with Chrome?
>
> >
> > On Saturday, January 29, 2022 at 6:40:10 PM UTC dim...@gmail.com wrote:
> >>
> >> On Sat, Jan 29, 2022 at 6:28 PM kcrisman  wrote:
> >> >
> >> > Just for data points, which browsers did you try on this? Thanks for 
> reporting.
> >>
> >> for what's worth, the interact works on Linux with Firefox.
> >>
> >> >
> >> > On Friday, January 28, 2022 at 1:02:57 PM UTC-5 
> alan_thoma...@yahoo.co.uk wrote:
> >> >>
> >> >> Interact just calls the function but no Interact widgets appear.
> >> >>
> >> >> Example attached. It works at Cocalc.
> >> >
> >> > --
> >> > You received this message because you are subscribed to the Google 
> Groups "sage-support" group.
> >> > To unsubscribe from this group and stop receiving emails from it, 
> send an email to sage-support...@googlegroups.com.
> >> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/e0a15937-dcd4-49aa-9dce-cda82b3e3fa0n%40googlegroups.com
> .
> >
> > --
> > You received this message because you are subscribed to the Google 
> Groups "sage-support" group.
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to sage-support...@googlegroups.com.
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/8f13034e-c737-4e4a-bc58-ceb6d7177281n%40googlegroups.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/3697bc17-3e05-45b0-940a-97c054928617n%40googlegroups.com.


[sage-support] Interact broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-01-28 Thread &#x27;Alan Stafford&#x27; via sage-support
Interact just calls the function but no Interact widgets appear.

Example attached. It works at Cocalc.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/9c27e3a4-cf05-4121-b13a-a2e00d1a8a72n%40googlegroups.com.


Interact.ipynb
Description: Binary data


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

2022-01-27 Thread &#x27;Alan Stafford&#x27; 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 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 particular the comment "On macOS, the *spawn* start method is now 
>>> the default" and https://bugs.python.org/issue33725.)
>>>
>>>
>> Thank you John for pointing this!
>>
>> Alan, could you try to run your notebook after having added the following 
>> lines at the top of it?
>>
>> import multiprocessing as mp
>> mp.set_start_method('fork')
>>
>> Eric.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/e6b8a0fd-999e-49a8-b9af-cd12192d1762n%40googlegroups.com.


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

2022-01-27 Thread &#x27;Alan Stafford&#x27; 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 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 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 https://bugs.python.org/issue33725.)
>>>
>>>
>> Thank you John for pointing this!
>>
>> Alan, could you try to run your notebook after having added the following 
>> lines at the top of it?
>>
>> import multiprocessing as mp
>> mp.set_start_method('fork')
>>
>> Eric.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/a79f263b-9f52-416a-a341-15eb2452753en%40googlegroups.com.


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

2022-01-27 Thread &#x27;Alan Stafford&#x27; 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:

> 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 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 https://bugs.python.org/issue33725.)
>>>
>>>
>> Thank you John for pointing this!
>>
>> Alan, could you try to run your notebook after having added the following 
>> lines at the top of it?
>>
>> import multiprocessing as mp
>> mp.set_start_method('fork')
>>
>> Eric.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/d8095765-4b6a-480f-8d00-c240b7c4b97fn%40googlegroups.com.


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

2022-01-27 Thread &#x27;Alan Stafford&#x27; 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 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 https://bugs.python.org/issue33725.)
>>
>>
> Thank you John for pointing this!
>
> Alan, could you try to run your notebook after having added the following 
> lines at the top of it?
>
> import multiprocessing as mp
> mp.set_start_method('fork')
>
> Eric.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/ffb5cbc1-fa62-416f-84e7-825524894acan%40googlegroups.com.


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

2022-01-27 Thread &#x27;Alan Stafford&#x27; 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) 
(/private/var/tmp/sage-9.5-current/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/rings/number_field/number_field.py)
 
Process SpawnPoolWorker-3:
On Wednesday, January 26, 2022 at 1:45:41 PM UTC Alan Stafford wrote:

> 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, 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 
>>>
>>> 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 https://bugs.python.org/issue33725.)
>>>
>>>
>>>
>>> On Tuesday, January 25, 2022 at 12:34:07 PM UTC-8 
>>> alan_thoma...@yahoo.co.uk wrote:
>>>
 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 
 "/private/var/tmp/sage-9.5-current/local/var/lib/sage/venv-python3.9.9/lib/python3.9/multiprocessing/process.py",
  
 line 108, in run self._target(*self._args, **self._kwargs) File 
 "/private/var/tmp/sage-9.5-current/local/var/lib/sage/venv-python3.9.9/lib/python3.9/multiprocessing/pool.py",
  
 line 114, in worker task = get() File 
 "/private/var/tmp/sage-9.5-current/local/var/lib/sage/venv-python3.9.9/lib/python3.9/multiprocessing/queues.py",
  
 line 368, in get return _ForkingPickler.loads(res) File 
 "/private/var/tmp/sage-9.5-current/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/manifolds/differentiable/chart.py",
  
 line 36, in 
 On Tuesday, January 25, 2022 at 8:13:20 PM UTC egourg...@gmail.com 
 wrote:

> 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 
>> *
>>
>
> Your notebook works well with tpar=4 on my Ubuntu computer running 
> Sage 9.5.rc4.
> What kind of error do you get?
>
> Eric.
>


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/d0782dd6-41d5-48da-8b8b-e00bc356e9b6n%40googlegroups.com.


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

2022-01-26 Thread &#x27;Alan Stafford&#x27; 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, 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 
>>
>> 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 https://bugs.python.org/issue33725.)
>>
>>
>>
>> On Tuesday, January 25, 2022 at 12:34:07 PM UTC-8 
>> alan_thoma...@yahoo.co.uk wrote:
>>
>>> 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 
>>> "/private/var/tmp/sage-9.5-current/local/var/lib/sage/venv-python3.9.9/lib/python3.9/multiprocessing/process.py",
>>>  
>>> line 108, in run self._target(*self._args, **self._kwargs) File 
>>> "/private/var/tmp/sage-9.5-current/local/var/lib/sage/venv-python3.9.9/lib/python3.9/multiprocessing/pool.py",
>>>  
>>> line 114, in worker task = get() File 
>>> "/private/var/tmp/sage-9.5-current/local/var/lib/sage/venv-python3.9.9/lib/python3.9/multiprocessing/queues.py",
>>>  
>>> line 368, in get return _ForkingPickler.loads(res) File 
>>> "/private/var/tmp/sage-9.5-current/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/manifolds/differentiable/chart.py",
>>>  
>>> line 36, in 
>>> On Tuesday, January 25, 2022 at 8:13:20 PM UTC egourg...@gmail.com 
>>> wrote:
>>>
 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 
> *
>

 Your notebook works well with tpar=4 on my Ubuntu computer running Sage 
 9.5.rc4.
 What kind of error do you get?

 Eric.

>>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/5faf7db9-9fa5-4a8a-9b42-36b06d927accn%40googlegroups.com.


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

2022-01-26 Thread &#x27;Alan Stafford&#x27; 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 
>
> 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 https://bugs.python.org/issue33725.)
>
>
>
> On Tuesday, January 25, 2022 at 12:34:07 PM UTC-8 
> alan_thoma...@yahoo.co.uk wrote:
>
>> 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 
>> "/private/var/tmp/sage-9.5-current/local/var/lib/sage/venv-python3.9.9/lib/python3.9/multiprocessing/process.py",
>>  
>> line 108, in run self._target(*self._args, **self._kwargs) File 
>> "/private/var/tmp/sage-9.5-current/local/var/lib/sage/venv-python3.9.9/lib/python3.9/multiprocessing/pool.py",
>>  
>> line 114, in worker task = get() File 
>> "/private/var/tmp/sage-9.5-current/local/var/lib/sage/venv-python3.9.9/lib/python3.9/multiprocessing/queues.py",
>>  
>> line 368, in get return _ForkingPickler.loads(res) File 
>> "/private/var/tmp/sage-9.5-current/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/manifolds/differentiable/chart.py",
>>  
>> line 36, in 
>> On Tuesday, January 25, 2022 at 8:13:20 PM UTC egourg...@gmail.com wrote:
>>
>>> 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 
 *

>>>
>>> Your notebook works well with tpar=4 on my Ubuntu computer running Sage 
>>> 9.5.rc4.
>>> What kind of error do you get?
>>>
>>> Eric.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/fa566de4-5ac7-4f78-9064-2ac2bb450337n%40googlegroups.com.


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

2022-01-25 Thread &#x27;Alan Stafford&#x27; 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 
"/private/var/tmp/sage-9.5-current/local/var/lib/sage/venv-python3.9.9/lib/python3.9/multiprocessing/process.py",
 
line 108, in run self._target(*self._args, **self._kwargs) File 
"/private/var/tmp/sage-9.5-current/local/var/lib/sage/venv-python3.9.9/lib/python3.9/multiprocessing/pool.py",
 
line 114, in worker task = get() File 
"/private/var/tmp/sage-9.5-current/local/var/lib/sage/venv-python3.9.9/lib/python3.9/multiprocessing/queues.py",
 
line 368, in get return _ForkingPickler.loads(res) File 
"/private/var/tmp/sage-9.5-current/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/manifolds/differentiable/chart.py",
 
line 36, in 
On Tuesday, January 25, 2022 at 8:13:20 PM UTC egourg...@gmail.com wrote:

> 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 
>> *
>>
>
> Your notebook works well with tpar=4 on my Ubuntu computer running Sage 
> 9.5.rc4.
> What kind of error do you get?
>
> Eric.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/1970b34d-f705-4efc-aa1b-54ca0c902dc2n%40googlegroups.com.


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

2022-01-25 Thread &#x27;Alan Stafford&#x27; via sage-support

Are you saying I should remove the lines above and just use the 
SAGE_NUM_THREADS environment variable?

Alan
On Tuesday, January 25, 2022 at 1:06:42 PM UTC dim...@gmail.com wrote:

> Attached is converted to .rst notebook, just in case. And the
> problematic part is here:
>
> var('tpar','lpar')
>
> tpar=1 #I want to set to greater than 1 but it will not work for
> Sage 9.5. Works with Sage 9.1 if I hack ncpus to return 4.
> lpar=4
>
> Parallelism().set('tensor',tpar)
> Parallelism().set('linbox',lpar)
> show(Parallelism())
> sage.parallel.ncpus.ncpus()
>
> On Tue, Jan 25, 2022 at 11:55 AM 'Alan Stafford' via sage-support
>  wrote:
> >
> > 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
> >
> > Regards
> >
> > Alan
> >
> > --
> > You received this message because you are subscribed to the Google 
> Groups "sage-support" group.
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to sage-support...@googlegroups.com.
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/d4e24e6b-0421-4f46-8535-9a493a8fa8d4n%40googlegroups.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/694d5ba3-57ad-4fab-9d1c-59e5345a21a8n%40googlegroups.com.


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

2022-01-25 Thread &#x27;Alan Stafford&#x27; via sage-support
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*

Regards 

Alan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/d4e24e6b-0421-4f46-8535-9a493a8fa8d4n%40googlegroups.com.


[sage-support] Re: multiprocessing_sage

2020-06-13 Thread &#x27;Alan Stafford&#x27; via sage-support
I was able to run this but I have hacked ncpus.py to give the correct 
result 4 for my laptop (2 core hyper-threaded).  I think it causes problems 
with the multiprocessing interface even though one doesn't explicitly call 
it.

sage src ncpus.py .

*def* ncpus():

"""

Detects the number of effective CPUs in the system. 


EXAMPLES::


sage: sage.parallel.ncpus.ncpus()  # random output -- depends on 
machine. 

2

"""

Hacked out test script/ documentation stuff.

# Support Sage environment variable SAGE_NUM_THREADS

# NOTE: while doctesting, this is forced to be 2 by the

# sage-runtests script

#MacOS X

#deprecated: return int(os.popen2("sysctl -n hw.ncpu")[1].read())

process = subprocess.Popen("sysctl -n hw.ncpu", shell=*True*, 
stdin=subprocess.PIPE, stdout = subprocess.PIPE, stderr=subprocess.PIPE, 
close_fds=*True*)

*return* int(process.stdout.read())

 

#return the default value

*return* 1



I am not sure what code is required for other non-mac computers but ncpus 
shouldn't always return 1.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/7abc610a-3cec-4d97-be21-8136ac6b8825o%40googlegroups.com.


[sage-support] Re: Multiprocessing for Tensors is not working for Macintosh. (SageMath 9.0)

2020-05-30 Thread &#x27;Alan Stafford&#x27; via sage-support
I have just updated to SageMath 9.1 and updated my OS. I see that ncpus.py 
has been changed. 
I have tested the multiprocessing with the file enclosed above and others 
and it is  working. Thank you all for fixing this.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/669d07a0-9b87-4f47-ab17-691a21dde5d6%40googlegroups.com.


[sage-support] Re: Multiprocessing for Tensors is not working for Macintosh. (SageMath 9.0)

2020-05-30 Thread &#x27;Alan Stafford&#x27; via sage-support
How do I make sure the changes I have made to the code are present.
Do I need to restart sage or even recompile it? Or just restart the Kernel?
The change I have made is to ncpus.py .

Indeed Mac OS has no hasattr(os, "sysconf"): . 

It should execute "sysctl -n hw.ncpu" which on my machine returns 4.

I can't quite follow the code as I am not used to indentation level 
affecting code semantics. I know ncpus always returns 1.


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/b8a51fb5-40af-4787-8d8e-472c5baee34c%40googlegroups.com.


[sage-support] Re: Cotton Tensor gives wrong result.

2020-05-30 Thread &#x27;Alan Stafford&#x27; via sage-support

>
> It is the Schouten Tensor that has a dimension dependent definition not 
> the Cotton Tensor. 
>
The logical conventions are defined by Rij = Rkikj and the condition that 
the Euclidean n-sphere has R > 0. 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/23fadc71-20e7-42f4-addc-a495a3b6%40googlegroups.com.


[sage-support] Re: Multiprocessing for Tensors is not working for Macintosh. (SageMath 9.0)

2020-05-29 Thread &#x27;Alan Stafford&#x27; via sage-support
I have an inkling that it is the code to probe the number of processors 
present that is at fault. It uses the right command but doesn't use the 
result and always returns one. This causes problems with the interface to 
maxima if one has set the number of cores for tensor computations to other 
than one. I will try this out by changing the code the I get some time.


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/c774b401-ecf4-4f9b-9461-7f08b039a042%40googlegroups.com.


[sage-support] Multiprocessing for Tensors is not working for Macintosh. (SageMath 9.0)

2020-05-24 Thread &#x27;Alan Stafford&#x27; via sage-support
Multiprocessing of Tensors is not working for Macintosh.

show(version())
#MacBook Pro dual core i5, hyper-threaded. Should support 4 ply 
multiprocessing.

%display latex  # LaTeX rendering turned on

Parallelism().set('tensor',4)  #Only works if set to one.
Parallelism().set('linbox',4) 
Parallelism()

M = Manifold(4, 'M')
MChart = M.open_subset('MChart')
Chart.   = MChart.chart(r'u:(-oo,+oo) v:(-oo,+oo) x:(-oo,+oo) 
y:(-oo,+oo)') 

gT= MChart.riemannian_metric('gT')
var('du','dv','dx','dy')

dsds= -du*dv+dx*dx+dy*dy+e^(x*y)*du*du


dsds=dsds.expand()
g00=dsds.coefficient(du,2)
g11=dsds.coefficient(dv,2)
g22=dsds.coefficient(dx,2)
g33=dsds.coefficient(dy,2)
g01=dsds.coefficient(du*dv,1)
g01=g01/2
g10=g01

gT[0,0] = g00.factor() #du du
gT[1,1] = g11.factor() #dv dv
gT[2,2] = g22.factor() #dx dx
gT[3,3] = g33.factor() #dy dy
gT[0,1] = g01.factor() #du dv 
%display latex
show(gT.display())

Metric=gT

Nabla = Metric.connection()

#https://arxiv.org/pdf/gr-qc/0309008.pdf equation 54
%time 
Bach=(Nabla(Metric.cotton()).up(Metric,3)['^u_aub'])+((Metric.schouten().up(Metric))*(Metric.weyl().down(Metric)))['^uv_aubv']
show(Bach.display())
%time 
Bach=Nabla(Nabla(Metric.weyl().down(Metric))).up(Metric,4).up(Metric,5)['^bd_abcd']-(1/2)*((Metric.ricci().up(Metric))*(Metric.weyl().down(Metric)))['^bd_abcd']
show(Bach.display())
%time 
Bach=-(Metric.schouten()*(Metric.weyl().down(Metric))).up(Metric,1).up(Metric,2)['^cd_cdab']
 
- Nabla(Nabla(Metric.schouten())).up(Metric,3)['^c_cab'] + 
Nabla(Nabla(Metric.schouten())).up(Metric,3)['^c_abc']

Cotton=-Nabla(Metric.ricci())['_i[jk]']-1/(2*(4-1))*Nabla(Metric.ricci_scalar()*Metric)['_i[kj]']

%time 
Bach=(Nabla(Cotton).up(Metric,3)['^u_aub'])+((Metric.schouten().up(Metric))*(Metric.weyl().down(Metric)))['^uv_aubv']
show(Bach.display())

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/3720394c-2f01-47f5-a838-56946d0adda3%40googlegroups.com.


BachTensor.ipynb
Description: Binary data


[sage-support] Cotton Tensor gives wrong result.

2020-05-19 Thread &#x27;Alan Stafford&#x27; via sage-support
If I compute the Bach Tensor using the definition via the cotton tensor I 
get a different result to that using an alternative definition.

M = Manifold(4, 'M')
MChart = M.open_subset('MChart')
Chart.   = MChart.chart(r'u:(-oo,+oo) v:(-oo,+oo) x:(-oo,+oo) 
y:(-oo,+oo)') 

gT= MChart.riemannian_metric('gT')
var('du','dv','dx','dy')

dsds= -du*dv+dx*dx+dy*dy+e^(x*y)*du*du


dsds=dsds.expand()
g00=dsds.coefficient(du,2)
g11=dsds.coefficient(dv,2)
g22=dsds.coefficient(dx,2)
g33=dsds.coefficient(dy,2)
g01=dsds.coefficient(du*dv,1)
g01=g01/2
g10=g01

gT[0,0] = g00.factor() #du du
gT[1,1] = g11.factor() #dv dv
gT[2,2] = g22.factor() #dx dx
gT[3,3] = g33.factor() #dy dy
gT[0,1] = g01.factor() #du dv 
%display latex
show(gT.display())

Metric=gT

Nabla = Metric.connection()

#https://arxiv.org/pdf/gr-qc/0309008.pdf equation 54
Bach=(Nabla(Metric.cotton()).up(Metric,3)['^u_aub'])+((Metric.schouten().up(Metric))*(Metric.weyl().down(Metric)))['^uv_aubv']

Bach.display()

This gives: 1/2*(x^4 + 2*x^2*y^2 + y^4 + 8*x*y + 4)*e^(x*y) du*du

But 

Bach=Nabla(Nabla(Metric.weyl().down(Metric))).up(Metric,4).up(Metric,5)['^bd_abcd']-(1/2)*((Metric.ricci().up(Metric))*(Metric.weyl().down(Metric)))['^bd_abcd']
 
Bach.display()

Gives: -1/4*(x^4 + 2*x^2*y^2 + y^4 + 8*x*y + 4)*e^(x*y) du*du

This agrees with the Maple example Bach Tensor computation at. 
https://www.maplesoft.com/support/help/Maple/view.aspx?path=DifferentialGeometry/Tensor/BachTensor

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/3321d4ef-b712-47bb-a501-edcabead339e%40googlegroups.com.


BachTensor.ipynb
Description: Binary data