From: adash Date: Wed, 16 Dec 2009 22:38:01 +0000 (+0000) Subject: more changes for ecoop submission X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a25f96aa343a4606bafa844c34363323dbcc4891;p=IRC.git more changes for ecoop submission --- diff --git a/Robust/src/Benchmarks/Prefetch/ManualPrefetch/KMeans/KMeans.java b/Robust/src/Benchmarks/Prefetch/ManualPrefetch/KMeans/KMeans.java index 40bce005..4cc419fb 100644 --- a/Robust/src/Benchmarks/Prefetch/ManualPrefetch/KMeans/KMeans.java +++ b/Robust/src/Benchmarks/Prefetch/ManualPrefetch/KMeans/KMeans.java @@ -184,10 +184,10 @@ public class KMeans extends Thread { id = threadid; tmp_g_args = g_args; short[] offsets = new short[4]; - offsets[0] = getoffset{GlobalArgs, clusters}; + offsets[0] = getoffset{GlobalArgs, feature}; offsets[1] = (short) 0; offsets[2] = (short) 0; - offsets[3] = (short) min_nclusters; + offsets[3] = (short) (g_args.nfeatures); System.rangePrefetch(g_args, offsets); } //Add Manual prefetch for diff --git a/Robust/src/Benchmarks/Prefetch/ManualPrefetch/KMeans/Normal.java b/Robust/src/Benchmarks/Prefetch/ManualPrefetch/KMeans/Normal.java index 16945206..939d9ec8 100644 --- a/Robust/src/Benchmarks/Prefetch/ManualPrefetch/KMeans/Normal.java +++ b/Robust/src/Benchmarks/Prefetch/ManualPrefetch/KMeans/Normal.java @@ -109,18 +109,17 @@ public class Normal { int index, start, stop; start = myId * CHUNK; - //args.feature[start-> stop] + //manual prefetch args.feature[start-> stop] short[] offsets = new short[4]; - offsets[0] = getoffset{GlobalArgs, feature}; + offsets[0] = getoffset{GlobalArgs, clusters}; offsets[1] = (short) 0; - offsets[2] = (short) start; - offsets[3] = (short) (10*CHUNK); + offsets[2] = (short) 0; + offsets[3] = (short) nclusters; System.rangePrefetch(args, offsets); atomic { nclusters = args.nclusters; npoints = args.npoints; - feature = args.feature; nfeatures = args.nfeatures; membership = args.membership; @@ -169,6 +168,7 @@ public class Normal { } else { break; } + //l=(short)(l+(short)(t*CHUNK)); } atomic { diff --git a/Robust/src/Benchmarks/Prefetch/SOR/javasingle/makefile b/Robust/src/Benchmarks/Prefetch/SOR/javasingle/makefile index 7df86ee1..23473b06 100644 --- a/Robust/src/Benchmarks/Prefetch/SOR/javasingle/makefile +++ b/Robust/src/Benchmarks/Prefetch/SOR/javasingle/makefile @@ -17,7 +17,6 @@ FLAGS2=-thread -optimize -mainclass ${MAINCLASS2} -o ${MAINCLASS2} FLAGS=-thread -optimize -mainclass ${MAINCLASS} -o ${MAINCLASS} default: -# ../../../../buildscript ${FLAGS} ${SRC1} ../../../../buildscript ${FLAGS2} ${SRC2} clean: diff --git a/Robust/src/Benchmarks/SingleTM/KMeans/KMeans.java b/Robust/src/Benchmarks/SingleTM/KMeans/KMeans.java index ecdabd5a..a78a20e8 100644 --- a/Robust/src/Benchmarks/SingleTM/KMeans/KMeans.java +++ b/Robust/src/Benchmarks/SingleTM/KMeans/KMeans.java @@ -318,7 +318,7 @@ public class KMeans extends Thread { km.isBinaryFile = new Integer(args[i++]).intValue(); } } else if(arg.equals("-z")) { - km.use_zscore_transform=0; + km.use_zscore_transform=0; } else if(arg.equals("-nthreads")) { if(i < args.length) { km.nthreads = new Integer(args[i++]).intValue(); diff --git a/Robust/src/ClassLibrary/String.java b/Robust/src/ClassLibrary/String.java index abbbaf3b..08458623 100644 --- a/Robust/src/ClassLibrary/String.java +++ b/Robust/src/ClassLibrary/String.java @@ -387,7 +387,7 @@ public class String { int i; int cnt =0; - // skip fisrt spaces + // skip first spaces for(i = 0; i< count;i++) { if(value[i+offset] != '\n' && value[i+offset] != '\t' && value[i+offset] != ' ') break; diff --git a/Robust/src/IR/Flat/BuildCode.java b/Robust/src/IR/Flat/BuildCode.java index de3ee767..a1337ed6 100644 --- a/Robust/src/IR/Flat/BuildCode.java +++ b/Robust/src/IR/Flat/BuildCode.java @@ -385,10 +385,13 @@ public class BuildCode { outmethod.println("printf(\"nchashSearch= %d\\n\", nchashSearch);"); outmethod.println("printf(\"nmhashSearch= %d\\n\", nmhashSearch);"); outmethod.println("printf(\"nprehashSearch= %d\\n\", nprehashSearch);"); + outmethod.println("printf(\"ndirtyCacheObj= %d\\n\", ndirtyCacheObj);"); outmethod.println("printf(\"nRemoteReadSend= %d\\n\", nRemoteSend);"); - outmethod.println("printf(\"getResponse= %d\\n\", getResponse);"); outmethod.println("printf(\"bytesSent= %d\\n\", bytesSent);"); outmethod.println("printf(\"bytesRecv= %d\\n\", bytesRecv);"); + outmethod.println("printf(\"totalObjSize= %d\\n\", totalObjSize);"); + outmethod.println("printf(\"sendRemoteReq= %d\\n\", sendRemoteReq);"); + outmethod.println("printf(\"getResponse= %d\\n\", getResponse);"); } else if (state.SINGLETM) { outmethod.println("printf(\"nSoftAbortAbort= %d\\n\", nSoftAbortAbort);"); outmethod.println("printf(\"nSoftAbortCommit= %d\\n\", nSoftAbortCommit);"); @@ -934,10 +937,13 @@ public class BuildCode { outclassdefs.print("extern int nchashSearch;\n"); outclassdefs.print("extern int nmhashSearch;\n"); outclassdefs.print("extern int nprehashSearch;\n"); + outclassdefs.print("extern int ndirtyCacheObj;\n"); outclassdefs.print("extern int nRemoteSend;\n"); + outclassdefs.print("extern int sendRemoteReq;\n"); outclassdefs.print("extern int getResponse;\n"); outclassdefs.print("extern int bytesSent;\n"); outclassdefs.print("extern int bytesRecv;\n"); + outclassdefs.print("extern int totalObjSize;\n"); outclassdefs.print("extern void handle();\n"); } else if (state.SINGLETM) { outclassdefs.println("extern int nSoftAbortAbort;"); @@ -2934,7 +2940,8 @@ public class BuildCode { /* Have to generate flat globalconv */ if (fgcn.getMakePtr()) { if (state.DSM) { - output.println("TRANSREAD("+generateTemp(fm, fgcn.getSrc(),lb)+", (unsigned int) "+generateTemp(fm, fgcn.getSrc(),lb)+");"); + //DEBUG: output.println("TRANSREAD("+generateTemp(fm, fgcn.getSrc(),lb)+", (unsigned int) "+generateTemp(fm, fgcn.getSrc(),lb)+",\" "+fm+":"+fgcn+"\");"); + output.println("TRANSREAD("+generateTemp(fm, fgcn.getSrc(),lb)+", (unsigned int) "+generateTemp(fm, fgcn.getSrc(),lb)+");"); } else { if ((dc==null)||!state.READSET&&dc.getNeedTrans(lb, fgcn)||state.READSET&&dc.getNeedWriteTrans(lb, fgcn)) { //need to do translation @@ -3696,7 +3703,8 @@ public class BuildCode { //} else { output.println(dst+"="+ src +"->"+field+ ";"); //output.println("if ("+dst+"&0x1) {"); - output.println("TRANSREAD("+dst+", (unsigned int) "+dst+");"); + //DEBUG: output.println("TRANSREAD("+dst+", (unsigned int) "+dst+",\""+fm+":"+ffn+"\");"); + output.println("TRANSREAD("+dst+", (unsigned int) "+dst+");"); //output.println(src+"->"+field+"="+src+"->"+field+";"); //output.println("}"); //} @@ -3711,6 +3719,7 @@ public class BuildCode { String dst=generateTemp(fm, ffn.getDst(),lb); output.println(dst+"="+ src +"->"+field+ ";"); if (locality.getAtomic(lb).get(ffn).intValue()>0) + //DEBUG: output.println("TRANSREAD("+dst+", (unsigned int) "+dst+",\""+fm+":"+ffn+"\");"); output.println("TRANSREAD("+dst+", (unsigned int) "+dst+");"); } else output.println(generateTemp(fm, ffn.getDst(),lb)+"="+ generateTemp(fm,ffn.getSrc(),lb)+"->"+ ffn.getField().getSafeSymbol()+";"); @@ -3862,6 +3871,7 @@ public class BuildCode { String dst=generateTemp(fm, fen.getDst(),lb); if (elementtype.isPtr()) { output.println(dst +"=(("+ type+"*)(((char *) &("+ generateTemp(fm,fen.getSrc(),lb)+"->___length___))+sizeof(int)))["+generateTemp(fm, fen.getIndex(),lb)+"];"); + //DEBUG: output.println("TRANSREAD("+dst+", "+dst+",\""+fm+":"+fen+"\");"); output.println("TRANSREAD("+dst+", "+dst+");"); } else { output.println(dst +"=(("+ type+"*)(((char *) &("+ generateTemp(fm,fen.getSrc(),lb)+"->___length___))+sizeof(int)))["+generateTemp(fm, fen.getIndex(),lb)+"];");