Closed 6bbcde06-8197-41f1-b9a3-c998bb839000 closed 2 years ago
Branch pushed to git repo; I updated commit sha1. New commits:
6cb376a | get_main_globals() to inject variables in FMatrix |
Branch pushed to git repo; I updated commit sha1. New commits:
ad55199 | refuse to create FMatrix in non-multiplicity-free case |
Branch pushed to git repo; I updated commit sha1. New commits:
b664aed | bugfix r-matrix method |
Branch pushed to git repo; I updated commit sha1. New commits:
2e6e804 | doctest revision in f_matrix.py, fusion_label flexibility for FusionRings |
Branch pushed to git repo; I updated commit sha1. New commits:
beac8e7 | add braid method in fusion_ring.py |
Branch pushed to git repo; I updated commit sha1. New commits:
c635db9 | work on doctests |
Branch pushed to git repo; I updated commit sha1. New commits:
7d96da9 | doctests added, and braid group representations |
Branch pushed to git repo; I updated commit sha1. New commits:
614a639 | fixed get_order issue in fusion_ring doctests |
Branch pushed to git repo; I updated commit sha1. New commits:
4b7684f | docstring revisions |
Branch pushed to git repo; I updated commit sha1. New commits:
74a2d76 | FusionRing bugfix in weyl_characters: cast level as Integer |
Branch pushed to git repo; I updated commit sha1. New commits:
7f738aa | no default picking, case-by-case determination of field |
Branch pushed to git repo; I updated commit sha1. New commits:
6ceb6d9 | f_matrix documentation added to reference manual |
Changed work issues from Doctests are needed to none
Work Issues: Needs rebasing to recent develop branch
Branch pushed to git repo; I updated commit sha1. New commits:
3202a1f | correct BaKi2001 reference in f_matrix.py |
With rebasing to the development branch, we currently have a segfault due to #30537:
sage: fm=FMatrix(FusionRing("A1",4,fusion_labels="a",inject_variables=True))
sage: fm.find_orthogonal_solution()
Computing F-symbols for The Fusion Ring of Type A1 and level 4 with
Integer Ring coefficients with 238 variables...
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/local/Cellar/python@3.9/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/local/Cellar/python@3.9/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/Cellar/python@3.9/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 576, in _handle_results
task = get()
File "/usr/local/Cellar/python@3.9/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/connection.py", line 256, in recv
return _ForkingPickler.loads(buf.getbuffer())
File "sage/structure/factory.pyx", line 714, in sage.structure.factory.generic_factory_unpickle (build/cythonized/sage/structure/factory.c:4331)
File "sage/structure/factory.pyx", line 371, in sage.structure.factory.UniqueFactory.get_object (build/cythonized/sage/structure/factory.c:3187)
File "sage/structure/factory.pyx", line 406, in sage.structure.factory.UniqueFactory.get_object (build/cythonized/sage/structure/factory.c:2465)
File "sage/misc/weak_dict.pyx", line 702, in sage.misc.weak_dict.WeakValueDictionary.__getitem__ (build/cythonized/sage/misc/weak_dict.c:3712)
File "sage/rings/real_lazy.pyx", line 1379, in sage.rings.real_lazy.LazyNamedUnop.__hash__ (build/cythonized/sage/rings/real_lazy.c:15866)
File "sage/rings/real_lazy.pyx", line 803, in sage.rings.real_lazy.LazyFieldElement.__complex__ (build/cythonized/sage/rings/real_lazy.c:10067)
File "sage/rings/real_lazy.pyx", line 1333, in sage.rings.real_lazy.LazyNamedUnop.eval (build/cythonized/sage/rings/real_lazy.c:15306)
File "sage/rings/real_lazy.pyx", line 1110, in sage.rings.real_lazy.LazyBinop.eval (build/cythonized/sage/rings/real_lazy.c:12998)
File "sage/rings/real_lazy.pyx", line 1111, in sage.rings.real_lazy.LazyBinop.eval (build/cythonized/sage/rings/real_lazy.c:13010)
File "sage/rings/real_lazy.pyx", line 1628, in sage.rings.real_lazy.LazyAlgebraic.eval (build/cythonized/sage/rings/real_lazy.c:18284)
File "sage/rings/real_lazy.pyx", line 1654, in sage.rings.real_lazy.LazyAlgebraic.eval (build/cythonized/sage/rings/real_lazy.c:18435)
File "sage/rings/polynomial/polynomial_element.pyx", line 7943, in sage.rings.polynomial.polynomial_element.Polynomial.roots (build/cythonized/sage/rings/polynomial/polynomial_element.c:64135)
File "/Users/bump/sagemath/sage/local/lib/python3.9/site-packages/sage/rings/polynomial/complex_roots.py", line 258, in complex_roots rts = cfac.roots(multiplicities=False)
File "sage/rings/polynomial/polynomial_element.pyx", line 7849, in sage.rings.polynomial.polynomial_element.Polynomial.roots (build/cythonized/sage/rings/polynomial/polynomial_element.c:61466)
File "sage/rings/polynomial/polynomial_element.pyx", line 6127, in sage.rings.polynomial.polynomial_element.Polynomial.__pari__ (build/cythonized/sage/rings/polynomial/polynomial_element.c:49925)
File "sage/rings/polynomial/polynomial_element.pyx", line 6180, in sage.rings.polynomial.polynomial_element.Polynomial._pari_with_name (build/cythonized/sage/rings/polynomial/polynomial_element.c:50330)
File "sage/rings/complex_mpfr.pyx", line 1393, in sage.rings.complex_mpfr.ComplexNumber.__pari__ (build/cythonized/sage/rings/complex_mpfr.c:14704)
File "sage/rings/real_mpfr.pyx", line 3383, in sage.rings.real_mpfr.RealNumber.__pari__ (build/cythonized/sage/rings/real_mpfr.c:24175)
cysignals.signals.SignalError: Segmentation Fault
Branch pushed to git repo; I updated commit sha1. New commits:
3406d76 | Merge branch 'public/new_fmatrix-30423' of git://trac.sagemath.org/sage into public/new_fmatrix-30423 |
Changed work issues from Needs rebasing to recent develop branch to Fix segfault from #30537
Thanks for the ping from #30537. This almost certainly comes from the enabling of threads in pari. While it has been applied for a while in distros you must have come to a point where it is important in the interface.
We have seen crashes from combining Python multiprocessing together with libraries' use of threads in many circumstances, in particular in the parallel docbuild, see #31344, #30351, #28483.
Branch pushed to git repo; I updated commit sha1. New commits:
5559e96 | changes to avoid segfault form #30537 |
Here is a minimal example of the problem caused by ticket #30537
from multiprocessing import Pool, set_start_method
def problem_child(chil_id):
return pari(2)
if __name__ == '__main__':
set_start_method('fork')
pool = Pool()
recv = pool.map(problem_child, range(pool._processes))
print("success!")
This runs with older versions of sage but not beta8 or later. The latest version of the code in the public/new_fmatrix-30423 branch contains a workaround but it would be better not to have to do this.
If we instead do
def problem_child(chil_id):
pari(2)
return 5
then there is no problem. We can also pass something from the parent process to the child process without a segfault.
Branch pushed to git repo; I updated commit sha1. New commits:
3429f25 | docstring revisions |
New commits:
3429f25 | docstring revisions |
Changed work issues from Fix segfault from #30537 to none
Branch pushed to git repo; I updated commit sha1. New commits:
49e27ef | Add CW2015 to index.rst |
Branch pushed to git repo; I updated commit sha1. New commits:
c178754 | testing push to trac |
Branch pushed to git repo; I updated commit sha1. New commits:
0b24ef9 | faster doctests, full coverage |
Branch pushed to git repo; I updated commit sha1. New commits:
7c4ecb2 | make tests in fast_parallel_fusion_ring_braid_repn.pyx long to avoid excessive test time. |
The FusionRing and its methods contain nearly complete information about the underlying modular tensor category. However information is lost about the associator, and this is captured by the F-matrix or 6j symbols. This ticket adds a method to compute the F-matrices.
This may be tested on the rank <=4 examples in the paper of Rowell, Stong and Wang (arXiv:0712.1377). It is able to compute F-matrices for these examples except the last one, G2 at level 2.
CC: @tscrim @sagetrac-sage-combinat @dwbump @willieab @physicstravels
Component: combinatorics
Keywords: Fusion Ring, F-matrix
Author: Daniel Bump, Guillermo Aboumrad, Galit Anikeeva
Branch:
57825e9
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/30423