sage-on-gentoo icon indicating copy to clipboard operation
sage-on-gentoo copied to clipboard

Problem with dev-gap/atlasrep, it tries to write on the system

Open kiwifb opened this issue 8 years ago • 4 comments

Various sage doctests related to atlasrep just fail mysteriously. It is possible that it tries to write in a system location rather than a user location.

sage: from sage.combinat.designs.twographs import twograph_descendant
sage: A=graphs.strongly_regular_graph(280,135,70)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-8-8e6a3c327166> in <module>()
----> 1 A=graphs.strongly_regular_graph(Integer(280),Integer(135),Integer(70))

/usr/lib64/python2.7/site-packages/sage/graphs/strongly_regular_db.pyx in sage.graphs.strongly_regular_db.strongly_regular_graph (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/graphs/strongly_regular_db.c:39268)()
   2826     if params in _small_srg_database:
   2827         val = _small_srg_database[params]
-> 2828         return True if existence else check_srg(val[0](*val[1:]))
   2829     if params_complement in _small_srg_database:
   2830         val = _small_srg_database[params_complement]

/usr/lib64/python2.7/site-packages/sage/graphs/strongly_regular_db.pyx in sage.graphs.strongly_regular_db.SRG_280_135_70_60 (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/graphs/strongly_regular_db.c:31970)()
   2220 
   2221     # A representation of J2 acting on a 3.PGL(2,9) it contains.
-> 2222     J2    = PermutationGroup(gap('AtlasGenerators("J2",2).generators'))
   2223     edges = J2.orbit((1,2),"OnSets")
   2224     g     = Graph()

/usr/lib64/python2.7/site-packages/sage/interfaces/interface.pyc in __call__(self, x, name)
    241 
    242         if isinstance(x, six.string_types):
--> 243             return cls(self, x, name=name)
    244         try:
    245             return self._coerce_from_special_method(x)

/usr/lib64/python2.7/site-packages/sage/interfaces/expect.pyc in __init__(self, parent, value, is_name, name)
   1325             except (RuntimeError, ValueError) as x:
   1326                 self._session_number = -1
-> 1327                 raise_(TypeError, x, sys.exc_info()[2])
   1328             except BaseException:
   1329                 self._session_number = -1

/usr/lib64/python2.7/site-packages/sage/interfaces/expect.pyc in __init__(self, parent, value, is_name, name)
   1320         else:
   1321             try:
-> 1322                 self._name = parent._create(value, name=name)
   1323             # Convert ValueError and RuntimeError to TypeError for
   1324             # coercion to work properly.

/usr/lib64/python2.7/site-packages/sage/interfaces/interface.pyc in _create(self, value, name)
    431     def _create(self, value, name=None):
    432         name = self._next_var_name() if name is None else name
--> 433         self.set(name, value)
    434         return name
    435 

/usr/lib64/python2.7/site-packages/sage/interfaces/gap.pyc in set(self, var, value)
   1358         """
   1359         cmd = ('%s:=%s;;' % (var, value)).replace('\n','')
-> 1360         self._eval_line(cmd, allow_use_file=True)
   1361 
   1362     def get(self, var, use_file=False):

/usr/lib64/python2.7/site-packages/sage/interfaces/gap.pyc in _eval_line(self, line, allow_use_file, wait_for_prompt, restart_if_needed)
    769                     return ''
    770             else:
--> 771                 raise RuntimeError(message)
    772 
    773         except KeyboardInterrupt:

TypeError: Gap produced error output
Error, Record Element: <rec> must be a record (not a boolean)

   executing \$sage1:=AtlasGenerators("J2",2).generators;;

or

sage: g = graphs.LivingstoneGraph()
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-11-83985c0d027b> in <module>()
----> 1 g = graphs.LivingstoneGraph()

/usr/lib64/python2.7/site-packages/sage/graphs/generators/smallgraphs.pyc in LivingstoneGraph()
   3600     from sage.groups.perm_gps.permgroup_named import JankoGroup
   3601     from sage.graphs.graph import Graph
-> 3602     G = JankoGroup(1)
   3603     edges = map(tuple,G.orbit((1,24),action="OnSets"))
   3604     return Graph(edges,name="Livingstone Graph")

/usr/lib64/python2.7/site-packages/sage/misc/classcall_metaclass.pyx in sage.misc.classcall_metaclass.ClasscallMetaclass.__call__ (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/misc/classcall_metaclass.c:1188)()
    327         """
    328         if cls.classcall is not None:
--> 329             return cls.classcall(cls, *args, **kwds)
    330         else:
    331             # Fast version of type.__call__(cls, *args, **kwds)

/usr/lib64/python2.7/site-packages/sage/misc/cachefunc.pyx in sage.misc.cachefunc.CachedFunction.__call__ (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/misc/cachefunc.c:5376)()
    971                 return self.cache[k]
    972         except KeyError:
--> 973             w = self.f(*args, **kwds)
    974             self.cache[k] = w
    975             return w

/usr/lib64/python2.7/site-packages/sage/groups/perm_gps/permgroup_named.pyc in __classcall__(cls, *args, **kwds)
    130                 domain = FiniteEnumeratedSet(domain)
    131             kwds['domain'] = domain
--> 132         return super(PermutationGroup_unique, cls).__classcall__(cls, *args, **kwds)
    133 
    134     def __eq__(self, other):

/usr/lib64/python2.7/site-packages/sage/misc/cachefunc.pyx in sage.misc.cachefunc.CachedFunction.__call__ (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/misc/cachefunc.c:5376)()
    971                 return self.cache[k]
    972         except KeyError:
--> 973             w = self.f(*args, **kwds)
    974             self.cache[k] = w
    975             return w

/usr/lib64/python2.7/site-packages/sage/structure/unique_representation.pyc in __classcall__(cls, *args, **options)
   1019             True
   1020         """
-> 1021         instance = typecall(cls, *args, **options)
   1022         assert isinstance( instance, cls )
   1023         if instance.__class__.__reduce__ == CachedRepresentation.__reduce__:

/usr/lib64/python2.7/site-packages/sage/misc/classcall_metaclass.pyx in sage.misc.classcall_metaclass.typecall (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/misc/classcall_metaclass.c:1614)()
    494             TypeError: Argument 'cls' has incorrect type (expected type, got classobj)
    495     """
--> 496     return (<PyTypeObject*>type).tp_call(cls, args, kwds)
    497 
    498 # Class for timing::

/usr/lib64/python2.7/site-packages/sage/groups/perm_gps/permgroup_named.pyc in __init__(self, n)
   1054         gap.load_package("atlasrep")
   1055         id = 'AtlasGroup("J%s")'%n
-> 1056         PermutationGroup_generic.__init__(self, gap_group=id)
   1057 
   1058     def _repr_(self):

/usr/lib64/python2.7/site-packages/sage/groups/perm_gps/permgroup.pyc in __init__(self, gens, gap_group, canonicalize, domain, category)
    411             if isinstance(gap_group, str):
    412                 gap_group = gap(gap_group)
--> 413             gens = [gen for gen in gap_group.GeneratorsOfGroup()]
    414 
    415         if domain is None:

/usr/lib64/python2.7/site-packages/sage/interfaces/interface.pyc in __call__(self, *args, **kwds)
    630 
    631     def __call__(self, *args, **kwds):
--> 632         return self._obj.parent().function_call(self._name, [self._obj] + list(args), kwds)
    633 
    634     def help(self):

/usr/lib64/python2.7/site-packages/sage/interfaces/gap.pyc in function_call(self, function, args, kwds)
    919             # We combine the two commands so we only run eval() once and the
    920             #   only output would be from the second command
--> 921             res = self.eval(marker+cmd)
    922         else:
    923             self.eval(marker)

/usr/lib64/python2.7/site-packages/sage/interfaces/gap.pyc in eval(self, x, newlines, strip, split_lines, **kwds)
    571             if not input_line.endswith(';'):
    572                 input_line += ';'
--> 573         result = Expect.eval(self, input_line, **kwds)
    574         if not newlines:
    575             result = result.replace("\\\n","")

/usr/lib64/python2.7/site-packages/sage/interfaces/expect.pyc in eval(self, code, strip, synchronize, locals, allow_use_file, split_lines, **kwds)
   1237                 elif split_lines:
   1238                     return '\n'.join([self._eval_line(L, allow_use_file=allow_use_file, **kwds)
-> 1239                                         for L in code.split('\n') if L != ''])
   1240                 else:
   1241                     return self._eval_line(code, allow_use_file=allow_use_file, **kwds)

/usr/lib64/python2.7/site-packages/sage/interfaces/gap.pyc in _eval_line(self, line, allow_use_file, wait_for_prompt, restart_if_needed)
    769                     return ''
    770             else:
--> 771                 raise RuntimeError(message)
    772 
    773         except KeyboardInterrupt:

RuntimeError: Gap produced error output
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `GeneratorsOfMagmaWithInverses' on 1 arguments

   executing __SAGE_LAST__:="__SAGE_LAST__";;GeneratorsOfGroup(\$sage6);;

kiwifb avatar Apr 05 '16 02:04 kiwifb

http://www.gap-system.org/Manuals/pkg/atlasrep/doc/chap4.html#X797694467B534D0E atlasrep/datagens and atlasrep/dataword need to be user writable by default.

kiwifb avatar Apr 05 '16 03:04 kiwifb

These don't fail in my prefix

sage: g = graphs.LivingstoneGraph()
sage: from sage.combinat.designs.twographs import twograph_descendant
sage: A=graphs.strongly_regular_graph(280,135,70)
sage: A
Graph on 280 vertices
sage: g
Livingstone Graph: Graph on 266 vertices

perhaps because the write issue may not be an issue there.

strogdon avatar Apr 07 '16 00:04 strogdon

Yes write issues are non-issues on prefix. There was a sage doctest trying to create a directory that was an issue on pure Gentoo system but not on prefix.

kiwifb avatar Apr 07 '16 00:04 kiwifb

The fix from debian is semi effective. I still get the errors above but I also have stuff created/touched in ~/.gap/pkg/atlasrep.

kiwifb avatar Nov 13 '16 21:11 kiwifb