On Sun, Jan 29, 2012 at 02:53:49AM -0800, Dima Pasechnik wrote: > Here is an experiment I just tried on ARM: > create linear code from the example in LinearCode? (it's the same as in > pickle_jar.tar.bz2) > > Pickle it: > sage: sage.structure.sage_object.picklejar(C,dir='/tmp/jj') > Quit Sage. > > Start Sage and unpickle it: > sage: sage.structure.sage_object.unpickle_all('/tmp/jj/') > Successfully unpickled 1 objects. > Failed to unpickle 0 objects. > > Now try unpickling this pickle on x86: > sage: sage.structure.sage_object.unpickle_all('/tmp/jj/') > * unpickle failure: > load('/tmp/jj//_class__sage_coding_linear_code_LinearCode__.sobj') > Failed: > _class__sage_coding_linear_code_LinearCode__.sobj > Successfully unpickled 0 objects. > Failed to unpickle 1 objects. > > > Thus, there is a genuine pickle/unpickle bug on ARM.... > (FYI, I've uploaded the pickle produced on ARM)
Displaying the actual unpickle exception, I get: ('value too large to convert to char', <built-in function unpickle_matrix_mod2_dense_v1>, (4, 7, [137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 7, 0, 0, 0, 4, 1, 3, 0, 0, 0, 120, 8, 183, 62, 0, 0, 0, 6, 80, 76, 84, 69, 0, 0, 0, 255, 255, 255, 165, 217, 159, 221, 0, 0, 0, 16, 73, 68, 65, 84, 8, 153, 99, 144, 99, 72, 99, 88, 197, 160, 3, 0, 5, 2, 1, 91, 3, 248, 139, 52, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130], 91)) So this is the same issue with char being unsigned on your platform. Specifically, it seems the corresponding __reduce__ function converts a char array into a list of python ints, which has range 0-255 for you, instead of the -128-127 on x86. And the unpickle function has the opposite issue. I wonder how many of these are around, and if there is any general fix for them. -Willem Jan -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org