On Wednesday, November 2, 2016 at 6:53:41 AM UTC, Paul Leopardi wrote: > > Hi Dima, > Thanks. By the way, should gap.set_global and gap.get_global do the same > sort of things as libgap.set_global and libgap.get_global? If not, why not? >
I must say I don't know why these libgap.set_global and get_global are needed. But there are more differences; in general libgap is designed so that potentially every GAP command Blah is callable as libgap.Blah, but in gap-interface (which is much older) you need to do more to achieve this. Dima > > On 2 November 2016 7:41:11 AM AEDT, Dima Pasechnik <dim...@gmail.com > <javascript:>> wrote: >> >> Right, this looks like a recent regression. AFAIR, it used to work. >> >> If you use gap.* rather than libgap.*, things seem to work for me, e.g. >> >> sage: gap.load_package('grape') >> sage: gap.eval('GG:=JohnsonGraph(5,2);') >> 'rec( adjacencies := [ [ 2, 3, 4, 5, 6, 7 ] ], group := Group([ >> (1,5,8,10,4)\n (2,6,9,3,7), (2,5)(3,6)(4,7) ]), isGraph := true, isSimple >> := true, \n names := [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ], [ 1, 5 ], [ 2, 3 ], [ >> 2, 4 ], \n [ 2, 5 ], [ 3, 4 ], [ 3, 5 ], [ 4, 5 ] ], order := 10, \n >> representatives := [ 1 ], schreierVector := [ -1, 2, 2, 1, 1, 1, 2, 1, 1, >> 1 \n ] )' >> sage: gap.eval('AutGroupGraph(GG);') >> 'Group([ (3,4)(6,7)(8,9), (2,3)(5,6)(9,10), (2,5)(3,6)(4,7), >> (1,2)(6,8)(7,9) ])' >> sage: >> >> (whereas if I use libgap.* I end up with the same error as you) >> >> This is now >> https://trac.sagemath.org/ticket/21794 >> >> >> On Tuesday, November 1, 2016 at 12:48:05 PM UTC, Paul Leopardi wrote: >>> >>> >>> >>> On Tuesday, 25 October 2016 06:02:06 UTC+11, Dima Pasechnik wrote: >>>> >>>> I would do a check using GAP's Grape package, which allows for checking >>>> isomorphisms >>>> (it uses nauty as the backend) >>>> While there is no ready function to call Grape from Sage, this should >>>> be easy to write using e.g. >>>> libgap.function_factory() >>>> >>> >>> I finally managed to figure out how to get graphs from Sage to Grape, >>> but now Grape can't find nauty. What do I need to do to configure Grape >>> properly? >>> >>> sage: GG=libgap.eval('GG := Graph( G, [1..16], OnPoints, function(x,y) >>> return MCG[x][y] = 1; end,true );') >>> sage: GG >>> rec( adjacencies := [ [ 2, 3, 5, 7, 10, 11 ], [ 1, 4, 6, 7, 10, 12 ], [ >>> 1, 4, 5, 8, 11, 13 ], [ 2, 3, 6, 8, 12, 13 ], [ 1, 3, 6, 9, 11, 14 ], [ 2, >>> 4, 5, 9, 12, 14 ], [ 1, 2, 8, 9, 10, 15 ], [ 3, 4, 7, 9, 13, 15 ], [ 5, 6, >>> 7, 8, 14, 15 ], [ 1, 2, 7, 13, 14, 16 ], [ 1, 3, 5, 12, 15, 16 ], [ 2, 4, >>> 6, 11, 15, 16 ], [ 3, 4, 8, 10, 14, 16 ], [ 5, 6, 9, 10, 13, 16 ], [ 7, 8, >>> 9, 11, 12, 16 ], [ 10, 11, 12, 13, 14, 15 ] ], group := Group(()), isGraph >>> := true, names := [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 >>> ], order := 16, representatives := [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, >>> 13, 14, 15, 16 ], schreierVector := [ -1, -2, -3, -4, -5, -6, -7, -8, -9, >>> -10, -11, -12, -13, -14, -15, -16 ] ) >>> sage: HH=libgap.eval('HH := Graph( G, [1..16], OnPoints, function(x,y) >>> return MLG[x][y] = 1; end,true );') >>> sage: HH >>> rec( adjacencies := [ [ 2, 3, 5, 7, 10, 11 ], [ 1, 4, 6, 7, 10, 12 ], [ >>> 1, 4, 5, 8, 11, 13 ], [ 2, 3, 6, 8, 12, 13 ], [ 1, 3, 6, 9, 11, 14 ], [ 2, >>> 4, 5, 9, 12, 14 ], [ 1, 2, 8, 9, 10, 15 ], [ 3, 4, 7, 9, 13, 15 ], [ 5, 6, >>> 7, 8, 14, 15 ], [ 1, 2, 7, 13, 14, 16 ], [ 1, 3, 5, 12, 15, 16 ], [ 2, 4, >>> 6, 11, 15, 16 ], [ 3, 4, 8, 10, 14, 16 ], [ 5, 6, 9, 10, 13, 16 ], [ 7, 8, >>> 9, 11, 12, 16 ], [ 10, 11, 12, 13, 14, 15 ] ], group := Group(()), isGraph >>> := true, names := [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 >>> ], order := 16, representatives := [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, >>> 13, 14, 15, 16 ], schreierVector := [ -1, -2, -3, -4, -5, -6, -7, -8, -9, >>> -10, -11, -12, -13, -14, -15, -16 ] ) >>> sage: >>> libgap.eval('GraphIsomorphism(GG,HH)') >>> >>> >>> >>> --------------------------------------------------------------------------- >>> ValueError Traceback (most recent call >>> last) >>> <ipython-input-80-325cd83b9cf4> in <module>() >>> ----> 1 libgap.eval('GraphIsomorphism(GG,HH)') >>> >>> /home/leopardi/opt/sage/sage-7.2/src/sage/libs/gap/libgap.pyx in >>> sage.libs.gap.libgap.Gap.eval >>> (/home/leopardi/opt/sage/sage-7.2/src/build/cythonized/sage/libs/gap/libgap.c:4183)() >>> 429 if not isinstance(gap_command, basestring): >>> 430 gap_command = str(gap_command._gap_init_()) >>> --> 431 return make_any_gap_element(self, gap_eval(gap_command)) >>> 432 >>> 433 @cached_method >>> >>> /home/leopardi/opt/sage/sage-7.2/src/sage/libs/gap/util.pyx in >>> sage.libs.gap.util.gap_eval >>> (/home/leopardi/opt/sage/sage-7.2/src/build/cythonized/sage/libs/gap/util.c:4947)() >>> 286 sig_off() >>> 287 except RuntimeError as msg: >>> --> 288 raise ValueError('libGAP: '+str(msg).strip()) >>> 289 >>> 290 if libGAP_Symbol != libGAP_S_SEMICOLON: >>> >>> ValueError: libGAP: d >>> $1n16g >>> 2 >>> 3 >>> 5 >>> 7 >>> 10 >>> 11; >>> 1 >>> 4 >>> 6 >>> 7 >>> 10 >>> 12; >>> 1 >>> 4 >>> 5 >>> 8 >>> 11 >>> 13; >>> 2 >>> 3 >>> 6 >>> 8 >>> 12 >>> 13; >>> 1 >>> 3 >>> 6 >>> 9 >>> 11 >>> 14; >>> 2 >>> 4 >>> 5 >>> 9 >>> 12 >>> 14; >>> 1 >>> 2 >>> 8 >>> 9 >>> 10 >>> 15; >>> 3 >>> 4 >>> 7 >>> 9 >>> 13 >>> 15; >>> 5 >>> 6 >>> 7 >>> 8 >>> 14 >>> 15; >>> 1 >>> 2 >>> 7 >>> 13 >>> 14 >>> 16; >>> 1 >>> 3 >>> 5 >>> 12 >>> 15 >>> 16; >>> 2 >>> 4 >>> 6 >>> 11 >>> 15 >>> 16; >>> 3 >>> 4 >>> 8 >>> 10 >>> 14 >>> 16; >>> 5 >>> 6 >>> 9 >>> 10 >>> 13 >>> 16; >>> 7 >>> 8 >>> 9 >>> 11 >>> 12 >>> 16; >>> 10 >>> 11 >>> 12 >>> 13 >>> 14 >>> 15. >>> > /tmp/tmd2qUpq/ftmp1 p,cx >>> >> /tmp/tmd2qUpq/ftmp2 bq >>> 16 >>> Error, cannot find output produced by `dreadnaut' >>> >>> > -- > Paul Leopardi https://sites.google.com/site/paulleopardi/ > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.