sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.16k stars 216 forks source link

Provide a recent GAP with all its standard packages #791

Closed haraldschilly closed 5 years ago

haraldschilly commented 8 years ago

In this reply to a tweet: https://twitter.com/gap_system/status/762714846513233920 a user reports that

[running the following command in GAP on CoCalc]

Filtered(RecNames(GAPInfo.PackagesInfo),s->LoadPackage(s)=fail);

reports that hapcryst package is not loadable

One question is: how can this be automated in a script or simple call for a test?

haraldschilly commented 8 years ago

output for the new compute environment is like this:

$ gap
 ┌───────┐   GAP 4.8.3, 19-Mar-2016, build of 2016-07-17 15:12:30 (UTC)
 │  GAP  │   http://www.gap-system.org
 └───────┘   Architecture: x86_64-pc-linux-gnu-gcc-default64
 Libs used:  gmp, readline
 Loading the library and packages ...
 Components: trans 1.0, prim 2.1, small* 1.0, id* 1.0
 Packages:   Alnuth 3.0.0, AtlasRep 1.5.0, AutPGrp 1.6, CTblLib 1.2.2, FactInt 1.5.3, GAPDoc 1.5.1, LAGUNA 3.7.0, Polycyclic 2.11, TomLib 1.2.5
 Try '?help' for help. See also  '?copyright' and  '?authors'
gap> Filtered(RecNames(GAPInfo.PackagesInfo),s->LoadPackage(s)=fail);
----------------------------------------------------------------
Loading  polymaking 0.8.1
(A package for using polymake in GAP)
by Marc Roeder
----------------------------------------------------------------
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Loading  Cryst 4.1.12 (Computing with crystallographic groups)
by Bettina Eick (http://www.icm.tu-bs.de/~beick/),
   Franz Gähler (http://www.math.uni-bielefeld.de/~gaehler/), and
   Werner Nickel (http://www.mathematik.tu-darmstadt.de/~nickel/).
Homepage: http://www.math.uni-bielefeld.de/~gaehler/gap45/packages.php
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Loading  CrystCat 1.1.6 (The crystallographic groups catalog)
by Volkmar Felsch (http://www.math.rwth-aachen.de/~Volkmar.Felsch/) and
   Franz Gähler (http://www.math.uni-bielefeld.de/~gaehler/).
Homepage: http://www.math.uni-bielefeld.de/~gaehler/gap45/packages.php
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Loading  AClib 1.2 (Almost Crystallographic Groups - A Library and Algorithms)
by Karel Dekimpe (http://www.kulak.ac.be/~dekimpe) and
   Bettina Eick (http://www.icm.tu-bs.de/~beick).
Homepage: http://www.icm.tu-bs.de/~beick/so.html
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
#I  MakeReadOnlyGlobal: GradedAlgebraPresentationType no value bound
Loading HAP 1.11.13 ...
----------------------------------------------------------------
This is HAPcryst version 0.1.11
by Marc Roeder
----------------------------------------------------------------

This is CRIME, Version 1.4
"Obviously crime pays, or there'd be no crime".
                                G. Gordon Liddy

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Loading  GRAPE 4.7 (GRaph Algorithms using PErmutation groups)
by Leonard H. Soicher (http://www.maths.qmul.ac.uk/~leonard/).
Homepage: http://www.maths.qmul.ac.uk/~leonard/grape/
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Loading  DESIGN 1.6 (The Design Package for GAP)
by Leonard H. Soicher (http://www.maths.qmul.ac.uk/~leonard/).
Homepage: http://www.designtheory.org/software/gap_design/
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
#I  You may wish to install the xgap package
#I  and enjoy the graphic capabilities of SONATA.

  ___________________________________________________________________________
 /        ___
||       /   \                 /\    Version2.8
||      ||   ||  |\    |      /  \               /\       Erhard Aichinger
 \___   ||   ||  |\\   |     /____\_____________/__\      Franz Binder
     \  ||   ||  | \\  |    /      \     ||    /    \     Juergen Ecker
     ||  \___/   |  \\ |   /        \    ||   /      \    Peter Mayr
     ||          |   \\|  /          \   ||               Christof Noebauer
 \___/           |    \|                 ||

 System    Of   Nearrings     And      Their Applications
 Info: http://www.algebra.uni-linz.ac.at/Sonata/

   ____                          |
  /            \           /   --+--  Version 3.13
 /      |    | |\\        //|    |
|    _  |    | | \\      // |     GUAVA Group
|     \ |    | |--\\    //--|
 \     ||    | |   \\  //   |
  \___/  \___/ |    \\//    |

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Loading  HAPprime 0.6 (A small prime-power group extension to HAP)
by Paul Smith (http://www.cs.st-andrews.ac.uk/~pas).
Homepage: http://www.maths.nuigalway.ie/~pas/CHA/HAPprime/
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Loading  toric 1.8 (toric variety package)
by David Joyner (http://opensourcemath.org/toric/).
Homepage: http://www.opensourcemath.org/toric/
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[  ]
gap>
williamstein commented 8 years ago

Can this ticket be made clearer? Of course there are bugs in gap packages, so the answer to "do all GAP packages work?" is always "no"...

slel commented 6 years ago

A proper title for this ticket would be: "Provide GAP with all its standard packages".

This would be a GAP installation independent from SageMath's one, until GAP 4.9 is out and makes it into SageMath -- see discussion at Sage #22626: Upgrade to GAP 4.9.

It is easy to do such an installation in a CoCalc project, see https://cocalc.com/share/acf3855b-c4e1-46dc-b895-ec496577848b/install-gap-4-8-9.bash.ipynb?viewer=share

Hopefully a system-wide install is just as easy... @haraldschilly please give it a try.

slel commented 6 years ago

Could the dockerfiles for the various GAP Docker images help script the installation?

https://hub.docker.com/r/gapsystem/gap-container/ https://hub.docker.com/r/gapsystem/gap-docker-base/ https://hub.docker.com/r/gapsystem/gap-docker/ https://hub.docker.com/r/gapsystem/gap-docker-stable/ https://hub.docker.com/r/gapsystem/gap-docker-master/ https://hub.docker.com/r/gapsystem/gap-docker-jupyter/

https://github.com/gap-system/gap-container/blob/master/Dockerfile https://github.com/gap-system/gap-docker-base/blob/master/Dockerfile https://github.com/gap-system/gap-docker/blob/master/Dockerfile https://github.com/gap-system/gap-docker-stable/blob/master/Dockerfile https://github.com/gap-system/gap-docker-master/blob/master/Dockerfile https://github.com/gap-system/gap-docker-jupyter/blob/master/Dockerfile

haraldschilly commented 6 years ago

I made a bit of progress. After restarting your project, can you please check what's in ls /ext/gap/latest ? There is also a new gap4 script available. I guess you'll also want to have this available as a jupyter kernel...

slel commented 6 years ago

Thanks, this is fantastic.

Here is the output of ls /ext/gap/latest:

~$ ls /ext/gap/latest
CITATION         INSTALL.md  Makefile            Makefile.in  appveyor.yml  cnf         config.status  configure.in  etc     gap.ini  grp  pkg   small  sysinfo.gap            sysinfo.in  trans
CONTRIBUTING.md  LICENSE     Makefile-default64  README.md    bin           config.log  configure      doc           extern  gap.shi  lib  prim  src    sysinfo.gap-default64  test_gap.g  tst

and when I launch gap4 I get GAP 4.8.9

~$ gap4
 ┌───────┐   GAP 4.8.9, 18-Dec-2017, build of 2018-01-04 13:54:09 (UTC)
 │  GAP  │   https://www.gap-system.org
 └───────┘   Architecture: x86_64-pc-linux-gnu-gcc-default64
 Libs used:  gmp, readline
 Loading the library and packages ...
 Components: trans 1.0, prim 2.1, small* 1.0, id* 1.0
 Packages:   AClib 1.2, Alnuth 3.1.0, AtlasRep 1.5.1, AutPGrp 1.8, Browse 1.8.7, CRISP 1.4.4, Cryst 4.1.12, CrystCat 1.1.6, CTblLib 1.2.2, FactInt 1.6.0, FGA 1.3.1, GAPDoc 1.6.1, IO 4.5.0,
             IRREDSOL 1.4, LAGUNA 3.8.0, Polenta 1.3.8, Polycyclic 2.11, RadiRoot 2.7, ResClasses 4.7.0, Sophus 1.23, SpinSym 1.5, TomLib 1.2.6, utils 0.49
 Try '??help' for help. See also '?copyright', '?cite' and '?authors'
gap>  

while launching gap gives me GAP 4.8.6 with fewer packages (the one currently in SageMath).

~$ gap
 ┌───────┐   GAP 4.8.6, 12-Nov-2016, build of 2017-12-08 23:40:57 (UTC)
 │  GAP  │   http://www.gap-system.org
 └───────┘   Architecture: x86_64-pc-linux-gnu-gcc-default64
 Libs used:  gmp, readline
 Loading the library and packages ...
 Components: trans 1.0, prim 2.1, small* 1.0, id* 1.0
 Packages:   GAPDoc 1.5.1
 Try '??help' for help. See also '?copyright', '?cite' and '?authors'

Making this available as a Jupyter kernel would be the icing on the cake. That would use the current GAP Jupyter kernel, like the one that points to Sage's GAP. It is available from: https://github.com/gap-packages/jupyter-kernel-gap The readme says it is deprecated, but it is the best option, since the new GAP Jupyter kernel will only be compatible with GAP 4.9 which is still in the works.

slel commented 6 years ago

May I suggest making it so that gap launches the full latest GAP, instead of Sage's GAP, and have gap-sage launch Sage's GAP?

slel commented 6 years ago

Would it be possible to repeat the procedure with GAP 4.8.10 instead of GAP 4.8.9? Should go very much the same way.

Then make it so gap launches the full GAP 4.8.10 (installed with all its standard packages) and gap-sage launches the GAP in Sage.

Installing the GAP Jupyter notebook on top of GAP 4.8.10 should be easy.

slel commented 6 years ago

Other GAP-related tickets should be made easier by this one, such as:

nthiery commented 6 years ago

For information: I am in St Andrews with the GAP dev. GAP 4.9.2 should be out late June, and will come with the official Jupyter kernel as standard package.

slel commented 6 years ago

CoCalc now provides GAP 4.9.3 system-wide, and also makes the corresponding Jupyter kernel available under the name GAP Native [broken]. The "[broken]" indication reflects the fact that it does not work with CoCalc's Jupyter, but it will work with the plain Jupyter or plain JupyterLab, which you can run as follows: in a CoCalc project, go to the project's settings, and at the very bottom right, click "Plain Jupyter Server"; this will open a new browser tab in your browser, with a url ending in /tree showing Jupyter's file explorer view; there you can click on "New" to pop up a menu where you can create a Jupyter worksheet (.ipynb file) for the kernel of your choice, including this "GAP Native" kernel, which will now work. Or you could manually change the /tree ending of the url by /lab and work in JupyterLab modulo some warnings.

williamstein commented 6 years ago

The "[broken]" indication reflects the fact that it does not work with CoCalc's Jupyter, but it will work with the plain Jupyter or plain JupyterLab,

I think you're wrong about that. It's really broken. Perhaps you don't know how to break it, so it seemed to work in your testing. It breaks badly whenever the user makes a slight mistake, and there is no way out. You can see this with jupyter console...

slel commented 6 years ago

Oh, okay. Hopefully the new version that will come with GAP 4.10 will work nicely. If all goes well GAP 4.10 should be out in very early November.

slel commented 5 years ago

I see GAP 4.10.0 is now installed on CoCalc. It seems that since then, GAP's JupyterKernel went from "working until you divide by zero" to "not giving any output". Can someone diagnose the problem, and open corresponding issues here or upstream as appropriate?

cc @markuspf @alex-konovalov @embray

slel commented 5 years ago

Follow-up at #1706 for GAP's JupyterKernel.