From b505d2997ed5aae5418c06fd5b11528701e63fd6 Mon Sep 17 00:00:00 2001 From: jjenista Date: Fri, 29 Jan 2010 01:23:09 +0000 Subject: [PATCH] a tiny test exposing a bug, we think might be memory conflict queue related --- Robust/src/Tests/mlp/tinyTest/test.java | 51 ++++++++++++++----------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/Robust/src/Tests/mlp/tinyTest/test.java b/Robust/src/Tests/mlp/tinyTest/test.java index 3b8fd609..dc43c25c 100644 --- a/Robust/src/Tests/mlp/tinyTest/test.java +++ b/Robust/src/Tests/mlp/tinyTest/test.java @@ -14,37 +14,42 @@ public class Test { int s = doSomeWork( x, f ); int t = moreWork( x, f ); int r = s+t; - System.out.println( "s+t="+r ); + System.out.println( "s = "+s+ + ", t = "+t+ + ", r = "+r ); } public static int doSomeWork( int x, Foo f ) { - int total = 0; - float delta = 0.0f; + float delta = 1.0f; + int out = 0; + return out; + } - for( int i = 0; i < 10; ++i ) { - sese parallel { - int[] d = new int[1]; - d[0] = 2*i; - //int d = 2*i; + public static int moreWork( int x, Foo f ) { + int total = 0; + for( int j = 0; j < x; ++j ) { + sese doe { + Foo g = new Foo( j ); + int prod = 1; } - sese waste { - if( true ) { - total = total + 1 + d[0]; - //total = total + 1 + d; + sese rae { + if( j % 7 == 0 ) { + prod = prod * j; } - - for( int j=0; j < 1; ++j ) { - if( true ) { - delta += 1.0f; - } + g.z = prod / x; + } + sese mi { + g.z = g.z + f.z; + } + if( j % 3 == 0 ) { + sese fa { + prod = prod / 2; } } - } - int temp = 100 + total + (int)delta; - return x + temp; - } - public static int moreWork( int x, Foo f ) { - return f.z - 9000; + total = total + prod - g.z; + } + + return total; } } -- 2.34.1