gap-packages / cryst

Computing with crystallographic groups
https://www.math.uni-bielefeld.de/~gaehler/gap/packages.php#Cryst
Other
3 stars 6 forks source link

Diffs in tests under GAP stable-4.9 branch #7

Closed olexandr-konovalov closed 5 years ago

olexandr-konovalov commented 6 years ago

When all packages are loaded, there are diffs in the tests: see e.g. https://travis-ci.org/gap-system/gap-docker-pkg-tests-stable-4.9/jobs/392042838

testing: /home/gap/inst/gap-stable-4.9/pkg/cryst/tst/cryst.tst
########> Diff in /home/gap/inst/gap-stable-4.9/pkg/cryst/tst/cryst.tst:175
# Input is:
g := PreImage(iso, h);
# Expected output:
[ [ 1, 0, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, -1, 0, 0 ], [ -7/4, 5/4, 3/4, 1 ] ]
# But found:
[ [ 0, -1, 0, 0 ], [ -1, 0, 0, 0 ], [ 0, 0, -1, 0 ], [ -1/4, 3/4, 3/4, 1 ] ]
########
########> Diff in /home/gap/inst/gap-stable-4.9/pkg/cryst/tst/cryst.tst:314
# Input is:
NaturalHomomorphismByNormalSubgroup( G, K );
# Expected output:
CompositionMapping( [ g1, g2, g3, g4, g5, g6, g7 ] -> 
[ g1, g2, g3, g4, id, id, id ], 
[ [ [ 1, 0, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, -1, 0, 0 ], [ -7/4, 5/4, 3/4, 1 ] ]
    , [ [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 1, 0, 0, 0 ], [ 0, 0, 0, 1 ] ], 
  [ [ 1, 0, 0, 0 ], [ 0, -1, 0, 0 ], [ 0, 0, -1, 0 ], [ -1/2, -1/2, 1, 1 ] ]
    , 
  [ [ -1, 0, 0, 0 ], [ 0, -1, 0, 0 ], [ 0, 0, 1, 0 ], [ 1/2, 0, -1/2, 1 ] ],
  [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 1/2, 1/2, 1/2, 1 ] ], 
  [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 1, 0, 1 ] ], 
  [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 1, 1 ] ] ] -> 
[ g1, g2, g3, g4, g5, g6, g7 ] )
# But found:
CompositionMapping( [ g1, g2, g3, g4, g8, g5, g6, g7, g8^2, g9, g10 ] -> 
[ g1, g2, g3, g4, g5, id, id, id, id, id, id ], 
[ [ [ 0, -1, 0, 0 ], [ -1, 0, 0, 0 ], [ 0, 0, -1, 0 ], [ -1/4, 3/4, 3/4, 1 ] ]
    , [ [ 0, 0, 1, 0 ], [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 3, -2, 1, 1 ] ], 
  [ [ -1, 0, 0, 0 ], [ 0, -1, 0, 0 ], [ 0, 0, 1, 0 ], [ -7/2, 0, -3/2, 1 ] ], 
  [ [ -1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, -1, 0 ], [ 0, -3/2, -7/2, 1 ] ], 
  [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 1, 0, 1 ] ], 
  [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 1, 0, 0, 1 ] ], 
  [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 1, 1 ] ], 
  [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ -3/2, -3/2, -3/2, 1 ] ],
  [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, -3, 0, 1 ] ], 
  [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ -3, 0, 0, 1 ] ] ] -> 
[ g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 ] )
########
########> Diff in /home/gap/inst/gap-stable-4.9/pkg/cryst/tst/cryst.tst:330
# Input is:
NaturalHomomorphismByNormalSubgroup( G, K );
# Expected output:
CompositionMapping( [ g1, g2, g3, g4, g5, g6, g7, g8 ] -> 
[ g1, g2, g3, g4, g5, id, id, id ], 
[ [ [ -1, 0, 0, 0 ], [ 0, 1, 0, 1/2 ], [ 0, 0, 1, 1/2 ], [ 0, 0, 0, 1 ] ], 
  [ [ 0, 0, 1, 0 ], [ 0, 1, 0, 0 ], [ -1, 0, 0, 1/2 ], [ 0, 0, 0, 1 ] ], 
  [ [ 0, 0, 1, 0 ], [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 0, 1 ] ], 
  [ [ -1, 0, 0, 1/2 ], [ 0, 1, 0, 0 ], [ 0, 0, -1, 1/2 ], [ 0, 0, 0, 1 ] ], 
  [ [ -1, 0, 0, 1/2 ], [ 0, -1, 0, 1/2 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ], 
  [ [ 1, 0, 0, 1 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ], 
  [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 1 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ], 
  [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 1 ], [ 0, 0, 0, 1 ] ] ] -> 
[ g1, g2, g3, g4, g5, g6, g7, g8 ] )
# But found:
CompositionMapping( [ g1, g2, g3, g4, g5, g6, g7, g8, g9, g10, g11 ] -> 
[ g1, g2, g3, g4, g5, id, id, id, id, id, id ], 
[ [ [ 0, -1, 0, 1/2 ], [ -1, 0, 0, 1/2 ], [ 0, 0, -1, 1/2 ], [ 0, 0, 0, 1 ] ],
  [ [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 1, 0, 0, 0 ], [ 0, 0, 0, 1 ] ], 
  [ [ -1, 0, 0, 1/2 ], [ 0, -1, 0, 1/2 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ], 
  [ [ 1, 0, 0, 0 ], [ 0, -1, 0, 1/2 ], [ 0, 0, -1, 1/2 ], [ 0, 0, 0, 1 ] ], 
  [ [ -1, 0, 0, 0 ], [ 0, -1, 0, 0 ], [ 0, 0, -1, 0 ], [ 0, 0, 0, 1 ] ], 
  [ [ 1, 0, 0, 1 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ], 
  [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 1 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ], 
  [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 1 ], [ 0, 0, 0, 1 ] ], 
  [ [ 1, 0, 0, 3 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ], 
  [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 3 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ], 
  [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 3 ], [ 0, 0, 0, 1 ] ] ] -> 
[ g1, g2, g3, g4, g5, g6, g7, g8, g9, g10, g11 ] )
########
   45348 ms (2628 ms GC) and 2.87GB allocated for cryst.tst
testing: /home/gap/inst/gap-stable-4.9/pkg/cryst/tst/manual.tst
    1708 ms (328 ms GC) and 107MB allocated for manual.tst
testing: /home/gap/inst/gap-stable-4.9/pkg/cryst/tst/subgrp.tst
   21440 ms (1120 ms GC) and 1.50GB allocated for subgrp.tst
testing: /home/gap/inst/gap-stable-4.9/pkg/cryst/tst/wyckoff.tst
    7112 ms (508 ms GC) and 458MB allocated for wyckoff.tst
testing: /home/gap/inst/gap-stable-4.9/pkg/cryst/tst/zass.tst
    6204 ms (476 ms GC) and 402MB allocated for zass.tst
-----------------------------------
total     81812 ms (5060 ms GC) and 5.32GB allocated
#I  Errors detected while testing

If the output is mathematically correct, and the diff is due to some randomness involved, perhaps it's possible to suppress the output and check some properties of the result instead?

gaehler commented 6 years ago

I have suppressed this output for now. It is hard to believe that this can be triggered by merely a compiler change (NaturalHomomorphismByNormalSubgroup now expresses its result with a different, redundant set of generators).