matmul Star algorithm crashes in Phase 15
Bugzilla Link | 1107 |
Created on | Jan 08, 2014 22:31 |
Version | svn |
OS | Linux |
Architecture | PC |
Attachments | bug1107redux.sac, 1107.sac |
Extended Description
sac2c -V sac2c v1.00-beta (Haggis And Apple) developer rev 18415 linux-gnu_x86_64 (Wed Jan 8 09:37:41 EST 2014 by sac) cat bugrc.sac use Array:all; inline double[+] plusdotmpyDDDStar(double[+]x, double[+]y) { /* CDC STAR-100 APL Algorithm for inner product */ rowsx = drop([-1],shape(x)); colsx = shape(x)[[dim(x)-1]]; colsy = shape(y)[[dim(y)-1]]; Zrow = genarray([colsy],0.0d); /* Parallel over rows of x */ z = with { (. <= [row] <= .) { Crow = with { ( [0] <= col < [colsy]) { newrow = x[row] * y[col]; StdIO::show(newrow); } : newrow; } : fold( +, Zrow); StdIO::show(Crow); } : Crow; }: genarray( rowsx, Zrow); return(z); } int main() { siz = 5; x = reshape( [siz,siz], 0.50* tod(iota(siz*siz))); y = reshape( [siz,siz], 0.75* tod(iota(siz*siz))); A_31=plusdotmpyDDDStar(x, y); r = sum( A_31); StdIO::print( r); r = ( r== 732904294933574912.000000) ? 0 : 1; return(r); } sac2c bugrc.sac -v1 **** Optimizing reference counting instructions ... TRAVERSE ERROR: node of type 31:N_id found where 32:N_num was expected! Compiling with -maxwlur 1 makes this crash not happen.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information