gap
gap copied to clipboard
"make check" requires network access (4.12.0)
Since #4652, IsomorphismGroups
uses atlasrep
via IsomorphismSimpleGroups
. This makes the install test at https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/grp/basic.tst#L488 hit the network to download a script. Maybe setting NoPrecomputedData
is an acceptable solution for install tests? The full list of test method calls which seem to use the network is:
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/grp/basic.tst#L488 (the example above)
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/grp/perf.tst#L99
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/grpperm.tst#L67 (takes at least ten minutes to run, so I just didn't run it to completion)
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/grpperm.tst#L71
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/grpperm.tst#L88
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/onecohom.tst#L18
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/onecohom.tst#L21
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/onecohom.tst#L22
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/opers/FrattiniSubgroup.tst#L54
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/opers/FrattiniSubgroup.tst#L66
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/opers/MinimalNormalSubgroups.tst#L41
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/opers/MinimalNormalSubgroups.tst#L61
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/opers/MinimalNormalSubgroups.tst#L86
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/opers/MinimalNormalSubgroups.tst#L92
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/opers/MinimalNormalSubgroups.tst#L101
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/opers/Socle.tst#L80
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/opers/StructureDescription.tst#L33
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/opers/StructureDescription.tst#L39
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/opers/StructureDescription.tst#L58
- https://github.com/gap-system/gap/blob/v4.12.0/tst/testinstall/opers/StructureDescription.tst#L60
Observed behaviour
When running make check
, an error like the following is thrown for each of the calls above:
testing: /nix/store/7ndv2h39f0cfrj5c9xh6fqfd0bgshsbr-gap-4.12.0/include/gap/src/tst/testinstall/grp/basic.tst
########> Diff in /nix/store/7ndv2h39f0cfrj5c9xh6fqfd0bgshsbr-gap-4.12.0/include/gap/src/tst/testinstall/grp/basic.tst:488
# Input is:
IsomorphismGroups(Stabilizer(MathieuGroup(23),23), MathieuGroup(22)) <> fail;
# Expected output:
true
# But found:
Error, <string> must be a nonempty string
Error, was not in any namespace
########
781 ms (222 ms GC) and 109MB allocated for grp/basic.tst
Copy and paste GAP banner (to tell us about your setup)
┌───────┐ GAP 4.12.0 of 2022-08-18
│ GAP │ https://www.gap-system.org
└───────┘ Architecture: x86_64-pc-linux-gnu-default64-kv8
Configuration: gmp 6.2.1, GASMAN, readline
Loading the library and packages ...
Packages: Alnuth 3.2.1, AtlasRep 2.1.4, AutPGrp 1.11, CRISP 1.4.5, CTblLib 1.3.4, FactInt 1.6.3, FGA 1.4.0, GAPDoc 1.6.6, IRREDSOL 1.4.3, LAGUNA 3.9.5, Polycyclic 2.16, PrimGrp 3.4.2, SmallGrp 1.5, Sophus 1.27, TomLib 1.2.9, TransGrp 3.6.3
Try '??help' for help. See also '?copyright', '?cite' and '?authors'
Relatedly, SageMath now also requires network access for testing, or it fails with errors such as the one below.
**********************************************************************
File "/nix/store/npl7dfa572s2ykdrhsh3p3hrdc1rbzlm-sage-src-9.7/src/doc/en/thematic_tutorials/group_theory.rst", line 984, in doc.en.thematic_tutorials.group_theory
Failed example:
subgroups = G.conjugacy_classes_subgroups()
Exception raised:
Traceback (most recent call last):
File "/nix/store/x68lklkfp56jr36r0in9wx6a4zlvg8n6-python3-3.10.6-env/lib/python3.10/site-packages/sage/doctest/forker.py", line 695, in _run
self.compile_and_execute(example, compiler, test.globs)
File "/nix/store/x68lklkfp56jr36r0in9wx6a4zlvg8n6-python3-3.10.6-env/lib/python3.10/site-packages/sage/doctest/forker.py", line 1101, in compile_and_execute
exec(compiled, globs)
File "<doctest doc.en.thematic_tutorials.group_theory[1]>", line 1, in <module>
subgroups = G.conjugacy_classes_subgroups()
File "/nix/store/x68lklkfp56jr36r0in9wx6a4zlvg8n6-python3-3.10.6-env/lib/python3.10/site-packages/sage/groups/perm_gps/permgroup.py", line 3542, in conjugacy_classes_subgroups
cl = self._libgap_().ConjugacyClassesSubgroups()
File "sage/libs/gap/element.pyx", line 2678, in sage.libs.gap.element.GapElement_MethodProxy.__call__ (build/cythonized/sage/libs/gap/element.c:20971)
return GapElement_Function.__call__(self, self.first_argument)
File "sage/libs/gap/element.pyx", line 2524, in sage.libs.gap.element.GapElement_Function.__call__ (build/cythonized/sage/libs/gap/element.c:19907)
sig_on()
sage.libs.gap.util.GAPError: Error, <string> must be a nonempty string
Error, was not in any namespace
That seems to me a case of "works as intended" ? You described what happens, but not in how far this is an issue?
Given the mention of "nix", I believe the nix package tester doesn't allow remote connections. However, as @fingolfin says, I think this is "as intended", we want to test that this downloading works, as users will be using it in practice.
Sorry, I should have been more specific. My main motivation has already been explained by @ChrisJefferson: Nix (a package repository/Linux distribution) sandboxes package builds and does not allow remote connections during building or testing. Patching out the GAP tests is easy, but patching out the SageMath tests which trigger GAP network access is slightly more annoying.
As far as I understand it, however, this also results in errors in normal usage for users with no internet connectivity. Is there a way to fall back to local computation, or to pre-download the needed data for cases where there is no fallback? This would be useful for reproducibility reasons (think "file format changes in X years" or "server goes offline"), as well as helping people with bad connectivity, even if such fallback is disabled by default (or disabled for "make check").
Edit: Unfortunately, extracting http://www.math.rwth-aachen.de/~Thomas.Breuer/atlasrep/atlasrepdata.tar.gz into pkg/
does not provide the data "make check" downloads.
Perhaps @ThomasBreuer would like to comment?
Other than two _SHA.json files (http://www.math.rwth-aachen.de/~mfer/mfertoc_SHA.json and http://www.math.rwth-aachen.de/~Thomas.Breuer/ctblocks/ctblockstoc_SHA.json), I only see queries for these three files when running make check
or Sage tests:
- http://atlas.math.rwth-aachen.de/Atlas/spor/M11/words/M11G1-find1
- http://atlas.math.rwth-aachen.de/Atlas/spor/M22/words/M22G1-find1
- http://atlas.math.rwth-aachen.de/Atlas/spor/M24/words/M24G1-find1
All of these three files are in the archive. The problem is that an error when downloding the _SHA.json files immediately results in an error instead of using the pre-downloaded file.
@collares aha! that definitely sounds like an issue with the atlasrep package then: it sounds to me as if it should also bundle those _SHA.json
files. Well, let's see what @ThomasBreuer (the author) has to say :-)
I do not catch the point (yet). Perhaps there are at least two problems.
Concerning the error message shown in the first comment above: When I run GAP 4.12.0 with AtlasRep 2.1.4 or 2.1.5 in offline mode, entering
IsomorphismGroups(Stabilizer(MathieuGroup(23),23), MathieuGroup(22));
yields the isomorphism.
The attempt to download the file M22G1-find1
fails, but then IsomorphismSimpleGroups
proceeds without this information.
If you can reproduce the error message mentioned above then it would be interesting to switch on some info messages with
SetInfoLevel( InfoMorph, 1 );
SetInfoLevel( InfoAtlasRep, 2 );
before calling IsomorphismGroups
.
Thank you for taking the time to look at this! I can reproduce the error. With the io
package installed, I get:
┌───────┐ GAP 4.12.0 of 2022-08-18
│ GAP │ https://www.gap-system.org
└───────┘ Architecture: x86_64-pc-linux-gnu-default64-kv8
Configuration: gmp 6.2.1, GASMAN, readline
Loading the library and packages ...
Packages: Alnuth 3.2.1, AtlasRep 2.1.4, AutPGrp 1.11, CRISP 1.4.5, CTblLib 1.3.4, FactInt 1.6.3, FGA 1.4.0, GAPDoc 1.6.6, IO 4.7.2, IRREDSOL 1.4.3, LAGUNA 3.9.5, Polycyclic 2.16,
PrimGrp 3.4.2, SmallGrp 1.5, Sophus 1.27, TomLib 1.2.9, TransGrp 3.6.3
Try '??help' for help. See also '?copyright', '?cite' and '?authors'
gap> SetInfoLevel( InfoMorph, 1 );
gap> SetInfoLevel( InfoAtlasRep, 2 );
gap> IsomorphismGroups(Stabilizer(MathieuGroup(23),23), MathieuGroup(22));
#I AtlasOfGroupRepresentationsNotifyData:
#I use the local directory instead of the remote one for 'internal'
#I calling 'SingleHTTPRequest' with domain 'www.math.rwth-aachen.de' and uri '/~mfer/mfertoc_SHA.json'
#I SingleHTTPRequest failed with status
#I OpenHTTPConnection: cannot find hostname
Error, <string> must be a nonempty string at /nix/store/sfh55vz77y42fh1yfbsdrhlqf9zg8j9v-gap-4.12.0/include/gap/src/pkg/atlasrep/gap/json.g:452 called from
AGR.GapObjectOfJsonText( body ) at /nix/store/sfh55vz77y42fh1yfbsdrhlqf9zg8j9v-gap-4.12.0/include/gap/src/pkg/atlasrep/gap/access.gi:3166 called from
AtlasOfGroupRepresentationsNotifyData( filename, id ); at /nix/store/sfh55vz77y42fh1yfbsdrhlqf9zg8j9v-gap-4.12.0/include/gap/src/pkg/atlasrep/gap/types.g:3892 called from
<function "unknown">( <arguments> )
called from read-eval loop at /nix/store/sfh55vz77y42fh1yfbsdrhlqf9zg8j9v-gap-4.12.0/include/gap/src/pkg/atlasrep/gap/types.g:3897
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
Without it, the output is:
┌───────┐ GAP 4.12.0 of 2022-08-18
│ GAP │ https://www.gap-system.org
└───────┘ Architecture: x86_64-pc-linux-gnu-default64-kv8
Configuration: gmp 6.2.1, GASMAN, readline
Loading the library and packages ...
Packages: Alnuth 3.2.1, AtlasRep 2.1.4, AutPGrp 1.11, CRISP 1.4.5, CTblLib 1.3.4, FactInt 1.6.3, FGA 1.4.0, GAPDoc 1.6.6, IRREDSOL 1.4.3, LAGUNA 3.9.5, Polycyclic 2.16, PrimGrp 3.4.2,
SmallGrp 1.5, Sophus 1.27, TomLib 1.2.9, TransGrp 3.6.3
Try '??help' for help. See also '?copyright', '?cite' and '?authors'
gap> SetInfoLevel( InfoMorph, 1 );
gap> SetInfoLevel( InfoAtlasRep, 2 );
gap> IsomorphismGroups(Stabilizer(MathieuGroup(23),23), MathieuGroup(22));
#I AtlasOfGroupRepresentationsNotifyData:
#I use the local directory instead of the remote one for 'internal'
#I calling 'wget' with url 'http://www.math.rwth-aachen.de/~mfer/mfertoc_SHA.json'
#I 'wget' failed to fetch 'http://www.math.rwth-aachen.de/~mfer/mfertoc_SHA.json'
Error, <string> must be a nonempty string at /nix/store/5grwc994zz8y6jn49j1ikglac0w6slaa-gap-4.12.0/include/gap/src/pkg/atlasrep/gap/json.g:452 called from
AGR.GapObjectOfJsonText( body ) at /nix/store/5grwc994zz8y6jn49j1ikglac0w6slaa-gap-4.12.0/include/gap/src/pkg/atlasrep/gap/access.gi:3166 called from
AtlasOfGroupRepresentationsNotifyData( filename, id ); at /nix/store/5grwc994zz8y6jn49j1ikglac0w6slaa-gap-4.12.0/include/gap/src/pkg/atlasrep/gap/types.g:3892 called from
<function "unknown">( <arguments> )
called from read-eval loop at /nix/store/5grwc994zz8y6jn49j1ikglac0w6slaa-gap-4.12.0/include/gap/src/pkg/atlasrep/gap/types.g:3897
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
Ah, truly sorry! With this stack trace available, I now see that this was already reported as #5015 and fixed in atlasrep 2.1.5. I haven't tested it yet, but I am confident that the bug is fixed so I will close the issue now and reopen the issue if an unexpected error appears.
Can confirm that everything is working now. Thanks again!
Great! Then it will be fixed in 4.12.1 which will bundled the latest atlasrep, and should be released soon (my plan would be to release it during the GAP Days in mid October)