gap_packages

123 views
Skip to first unread message

enriqu...@gmail.com

unread,
Mar 26, 2025, 4:19:26 PM3/26/25
to sage-devel
I have opened https://github.com/sagemath/sage/pull/39783. The immediate goal is to add a recent gap package. There are several points tangentially related with this PR that I wanted to share to the community:
  1. Is there a reason to do not add some other packages? Long time ago, I think someone told me that they may interfere with other sage packages, but it is not clear to me since they must be loaded explicitely.
  2. The compilation of gap_packages takes quite a while. Taking out sdh_make -j1 in spkg-install.in allows to compile in parallel each packages, but I wonder if there was a reason to avoid parallelism. In the same ideas, since there are several packages to be built, it could be a good idea to allow parallelism at the level of packages, but I do not how to do it.
  3. The third one is related with the use of gap functions. One option is to add more functions to gap_functions.py, but I do not know if adding too much functions may affect to the memory. A second option is to use libgap.function_factory; it is OK. My issue is how to pass options to gap functions. I have not found how to do it. In order to use libgap.eval, I do not know for example how to produce a gap string from a sage group.
Thanks, Enrique.

François Bissey

unread,
Mar 26, 2025, 8:22:09 PM3/26/25
to sage-...@googlegroups.com
the xgap package was the guilty party causing trouble if my memory serves me right from all those years ago. It was automatically loaded too.
I cannot remember how I figured it out now. xgap would not load by itself these days, if it still exists.

François
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sage-devel/4a3dfcff-70bb-4785-ad59-b00c1ffb2152n%40googlegroups.com.

Antonio Rojas

unread,
Mar 27, 2025, 3:36:42 AM3/27/25
to sage-devel
The browse package is also causing trouble, simply having it installed makes doctesting hang (as it is automatically loaded by the standard ctbllib package if present).

enriqu...@gmail.com

unread,
Mar 29, 2025, 5:24:29 AM3/29/25
to sage-devel
Thank you. I have a couple of installations, one with system gap (with package browser), the other one gap is inside sage. Loading ctbllib is possible in both cases but it only loads browse in the first case. Anyway, it seems better to exclude xgap and browse (which do not seem very useful in sage at first sight). 
Do you have any ideas about how to solve the issue concerning passing options? Enrique.

enriqu...@gmail.com

unread,
Apr 25, 2025, 10:59:27 AM4/25/25
to sage-devel
I found a way to pass options to functions in gap (looking at the use of function_factory in permgroup.py); I guess it can be improved and I do not know how to make it more useful. I put an example. In LINS package there is a function called LowIndexNormalSubs; without options, applied to a group G and a number n, it gives all the normal subgroups of G of index at most n; if one is only interested in n-index subgroups one has to pass the option allSubgroups as false; if only these subgroups are needed it is much faster than computing all of them and filter. The following seams to work
low_index_normal_subgroups_exact = libgap.function_factory("""function(G, n) return LowIndexNormalSubs(G, n : allSubgroups := false); end; """)

Reply all
Reply to author
Forward
0 new messages