Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to ACE 4.1 ? #8

Open
fingolfin opened this issue Dec 16, 2016 · 11 comments · May be fixed by #36
Open

Update to ACE 4.1 ? #8

fingolfin opened this issue Dec 16, 2016 · 11 comments · May be fixed by #36

Comments

@fingolfin
Copy link
Member

The GAP ACE package is based on ACE 3.001 from 2001. But George released version 4.1 in 2014, and it seems to have many nice improvements.

So it would be nice if we could upgrade the GAP package to use that. Of course, this may be difficult to do, depending on how much changed in ACE.

@fingolfin fingolfin reopened this Mar 19, 2018
@dimpase
Copy link
Member

dimpase commented Mar 11, 2023

Can this be closed?

@fingolfin
Copy link
Member Author

It isn't done, so why should it be closed?

@dimpase
Copy link
Member

dimpase commented Mar 11, 2023

Oh, do you mean ACE the program version, not ACE the GAP package version?
I can look at it.

@dimpase
Copy link
Member

dimpase commented Mar 11, 2023

ok, I can get the tarball, I can compile 4.1 (more precisely, https://staff.itee.uq.edu.au/havas/ace4100.tar.gz)
after dropping in its src/ into the src/ of GAP package, and renaming make.linux to Makefile.
I get a warning for a bug:

gcc -std=c99 -pedantic -Wall -O2 -DB8S4C4 -DCLK64 -o ace ace.c cmdloop.c parser.c postproc.c util2.c control.c util1.c coinc.c enum.c util0.c
postproc.c: In function ‘al2_normcl’:
postproc.c:361:13: warning: pointer ‘lelt’ used after ‘free’ [-Wuse-after-free]
  361 |         lelt->word[1] = -k;
      |         ~~~~^~~~~~
postproc.c:356:44: note: call to ‘free’ here
  356 |           al1_emptywl(list);  free(list);  free(lelt);
      |                                            ^~~~~~~~~~

which should be easy to fix.

@dimpase
Copy link
Member

dimpase commented Mar 11, 2023

Without fixing this bug, if I launch enumeration from GAP, it apparently finishes, but the interface does not return, it hangs.

Will look into it later today

PS. The hang is in

^CError, user interrupt in
  moreOfline := ReadLine( iostream ); at /home/scratch/scratch2/dimpase/sage/sage/local/share/gap/lib/streams.gi:1478 called from 
ReadAllLine( iostream, nofail, function ( line )
      return 0 < Length( line ) and line[Length( line )] = '\n';
  end ) at /home/scratch/scratch2/dimpase/sage/sage/local/share/gap/lib/streams.gi:1498 called from
ReadAllLine( iostream, true ) at /users/dimpase/.gap/pkg/ace-5.6.2/gap/streams.gi:40 called from
readline( iostream ) at /users/dimpase/.gap/pkg/ace-5.6.2/gap/streams.gi:61 called from
FLUSH_ACE_STREAM_UNTIL( datarec.stream, 3, 3, ACE_READ_NEXT_LINE, function ( line )
      return IsMatchingSublist( line, "name", 3 );
  end ); at /users/dimpase/.gap/pkg/ace-5.6.2/gap/general.gi:124 called from
CALL_ACE( "ACECosetTableFromGensAndRels", arg[1], arg[2], arg[3] ) at /users/dimpase/.gap/pkg/ace-5.6.2/gap/interact.gi:2290 called from
...  at g33343.g:23
you can 'return;'

and remains here if I comment out the causing the warning free() as above.

@dimpase
Copy link
Member

dimpase commented Mar 11, 2023

OK, this bug is easy to fix, it's due to
AL2_HINFO flag removed, and machine name p/out removed. Note added to sys change in ACE 4,
whereas the GAP interface parses ACE output looking for name of the host, which just never comes.

However, on an easy presentation I get a segfault in the new ACE - which somehow brings down the whole GAP session. Unless I'm doing something silly, it seems it's time to talk to upstream here. I just need to reproduce it on a stand alone ACE.

@dimpase
Copy link
Member

dimpase commented Mar 11, 2023

The segfault is most certainly caused by the GAP package interface bug, not by ACE (I tried generating the input for ACE that causes this bug, it's below, and no, ACE4 runs just fine on it in the standalone mode),
but it's trickier than necessary to find as GAP (4.12.2) just segfaults - not something I see often.

@fingolfin - I presume this by itself is a GAP bug, no?

Group Generators: abcdew;
Group Relators: b^2,c^2,d^2,e^2,(b*c)^3,(b*d)^2,(b*e)^2,(c*d)^4,(c*e)^2,(d*e)^3,w^2,(w*a)^3,(w*b)^2,(w*c)^2,(w*d)^2,(w*e)^2,(a*b^-1*c^-1*d*c*b*e^-1*d^-1*c*d*e)^4,a^2,(a*b)^3,(a*c)^2,(a*d)^2,(a*e)^2;
Subgroup Generators: a,b,c,d,e;
Start;
Print Table;
st;
cy;

@dimpase
Copy link
Member

dimpase commented Mar 11, 2023

Is there a facility in GAP to trace all function calls?
With TraceAllMethods(); I can't easily narrow the location of the trouble. I've built GAP with --enable-debug, and now see gap: src/intobj.h:117: INT_INTOBJ: Assertion IS_INTOBJ(o)' failed.` and the dump then.

...
#I  ReadAllLine: iostream,boolean at /mnt/opt/gap/lib/streams.gi:1494
#I  ReadAllLine: iostream,boolean,function at /mnt/opt/gap/lib/streams.gi:1466
#I  FileDescriptorOfStream at /mnt/opt/gap/lib/streams.gi:1692
#I  ReadLine: iostream at /mnt/opt/gap/lib/streams.gi:1441
#I  SplitString: for three strings at /mnt/opt/gap/lib/string.gi:541
#I  Int: for strings at /mnt/opt/gap/lib/string.gi:348
#I  Int: for strings at /mnt/opt/gap/lib/string.gi:348
#I  Int: for strings at /mnt/opt/gap/lib/string.gi:348
#I  Int: for strings at /mnt/opt/gap/lib/string.gi:348
#I  Int: for strings at /mnt/opt/gap/lib/string.gi:348
#I  Int: for strings at /mnt/opt/gap/lib/string.gi:348
#I  Int: for strings at /mnt/opt/gap/lib/string.gi:348
#I  Int: for strings at /mnt/opt/gap/lib/string.gi:348
#I  Int: for strings at /mnt/opt/gap/lib/string.gi:348
#I  Int: for strings at /mnt/opt/gap/lib/string.gi:348
#I  Int: for strings at /mnt/opt/gap/lib/string.gi:348
#I  Int: for strings at /mnt/opt/gap/lib/string.gi:348
#I  CloseStream: iostream at /mnt/opt/gap/lib/streams.gi:1646
#I  IsMatchingSublist: list, sub at /mnt/opt/gap/lib/list.gi:1901
#I  IsMatchingSublist: list,sub,pos at /mnt/opt/gap/lib/list.gi:1889
gap: src/intobj.h:117: INT_INTOBJ: Assertion `IS_INTOBJ(o)' failed.
Abort
./gap(+0x75060)[0x56361be1c060]
/lib64/libc.so.6(+0x37950)[0x7f1db1e1a950]
...

@dimpase
Copy link
Member

dimpase commented Mar 12, 2023

OK, I haven't found the GAP bug, but I found a way to avoid it, now all seems to work.
Basically, before ACE prints the table, one now has to call Standard; on it, otherwise it might unclean output.
(more cosets than there are). It was not needed in ACE3, apparently.

PR is coming.

@dimpase dimpase linked a pull request Mar 13, 2023 that will close this issue
@dimpase
Copy link
Member

dimpase commented Mar 14, 2023

Please review #36

@dimpase
Copy link
Member

dimpase commented Mar 15, 2023

perhaps the ability to reconfigure memory model of the ACE binary to use multi-gigabyte RAM better should be mentoned in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants