[Aldor-l] Partitions

Martin Rubey martin.rubey at univie.ac.at
Sat Feb 10 03:47:11 EST 2007


Dear aldor experts,

I'm forwarding this since there is at least one compiler message which looks
very strange:

#3 (Fatal Error) Storage allocation error (atempt to free unknown space).

Is this a known compiler bug?

Furthermore, how come

#8 (Fatal Error) Looking for `bracket' with code `44492043' in `^G^A^B^A'. 
Export of `^G^A^B^A' not found.

is produced with -q2 and -q3 but not with weaker optimization settings?

Dear Ralf,

I give up. The results of the test below depend on which version you use!  It
seems that if you first access the first generating series g1, then both g1 and
g2 contain the right coefficients, no matter how you generate the series.
Also, if you don't multiply the series with q=1/k everything is OK.

The sum is never working.

This bug is reproducible with debug and ordinary at -q1

Looks like an interesting :-( bug. I hope it is not yet another compiler bug...

There are more problems, by the way:

-------------------------------------------------------------------------------
-- compiling with debug at -q0:

/home/martin/aldor/linux/1.0.3/bin/aldor -Y
/home/martin/combinat2/trunk/combinat/src -Y . -Y
/home/martin/aldor/linux/1.0.3/lib -I
/home/martin/combinat2/trunk/combinat/include -I
/home/martin/aldor/linux/1.0.3/include -lcombinatd                   -dDEBUG
-q0 -lalgebrad -laldord -fao -dMacrosCombinat -Mno-mactext -M2 -Mno-abbrev
csseries.as
#3 (Fatal Error) Storage allocation error (atempt to free unknown space).
-------------------------------------------------------------------------------
-- compiling with ordinary at -q0:

segfault when starting testsuite
-------------------------------------------------------------------------------
-- compiling with debug or ordinary at -q2 or -q3:

Compiling csspecies.as ...
/home/martin/aldor/linux/1.0.3/bin/aldor -Y
/home/martin/combinat2/trunk/combinat/src -Y . -Y
/home/martin/aldor/linux/1.0.3/lib -I
/home/martin/combinat2/trunk/combinat/include -I
/home/martin/aldor/linux/1.0.3/include -lcombinatd                   -dDEBUG
-q2 -lalgebrad -laldord -fao -dMacrosCombinat -Mno-mactext -M2 -Mno-abbrev
csspecies.as
#8 (Fatal Error) Looking for `bracket' with code `44492043' in `^G^A^B^A'. 
Export of `^G^A^B^A' not found.
-------------------------------------------------------------------------------

Martin

<<test CharacteristicSpecies>>=
testCharacteristicSpecies4(): () == 
BugWorkaround(CycleIndexSeries has with {sum: Generator % -> %}) {
        setS: CycleIndexSeries := cycleIndexSeries$SetSpecies(Integer);
        set1s: DataStream P := stream generator(setS::DataStream P);
        set1s.0 := 0;
        set1: CycleIndexSeries := set1s::CycleIndexSeries;
        
        set2s: DataStream P := stretch(set1, 2)::DataStream(P);
        set2s := map((p: P): P +-> inv(2)*p)(set2s);
        set2: CycleIndexSeries := set2s::CycleIndexSeries;
        
        assertEquals(Array P, 
            [0, x(1), inv(2)*x(1,2)+inv(2)*x(2),
                inv(6)*x(1,3)+inv(2)*x(1)*x(2)+inv(3)*x(3)],
            [coefficient(set1, n) for n: MachineInteger in 0..3]);
        
        assertEquals(Array P, 
            [0, 0, inv(2)*x(2),0, inv(4)*x(2,2)+inv(4)*x(4)],
            [coefficient(set2, n) for n: MachineInteger in 0..4]);
        
        g: Generator CycleIndexSeries := generate {
                for k: I in 1..2 repeat {
                        q: Q := inv(k::Z);
#if V1
                        d: DataStream(P) := stretch(set1, k)::DataStream(P);
                        s: DataStream(P) := map((p: P): P +-> q*p)(d);
#else
                        d: CycleIndexSeries := stretch(set1, k);
                        s: DataStream(P) := stream(q*m for m in coefficients d);
#endif
                        yield s::CycleIndexSeries;
                }
        }
        
        g1 := next! g;
#if OK        
        assertEquals(Array P, 
            [coefficient(g1, n) for n: MachineInteger in 0..3],        
            [coefficient(set1, n) for n: MachineInteger in 0..3]);        
#endif        
        g2 := next! g;        
        
        assertEquals(Array P, 
            [coefficient(g2, n) for n: MachineInteger in 0..3],
            [coefficient(set2, n) for n: MachineInteger in 0..3]);                
        
        assertEquals(Array P, 
            [coefficient(g1, n) for n: MachineInteger in 0..3],        
            [coefficient(set1, n) for n: MachineInteger in 0..3]);        
        
--        set12 := sum(generate {yield set1; yield set2; });
--        g12 := sum g;        
--        
--        assertEquals(Array P, 
--            [coefficient(set12, n) for n: MachineInteger in 0..3],
--            [coefficient(g12, n) for n: MachineInteger in 0..3]);         
        
}
@
%TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT




More information about the Aldor-l mailing list