MAINCLASS=MatrixMultiply
SRC1=${MAINCLASS}N.java
SRC2=${MAINCLASS}Nrun.java
-FLAGS=-dsm -dsmcaching -prefetch -optimize -excprefetch MatrixMultiply.main -excprefetch MMul.setValues -excprefetch MMul.transpose -mainclass ${MAINCLASS} -trueprob 0.98
+SRC3=${MAINCLASS}D.java \
+ ../../../../ClassLibrary/JavaDSM/Barrier.java
+SRC4=${MAINCLASS}D2.java \
+ ../../../../ClassLibrary/JavaDSM/Barrier.java
+SRC5=${MAINCLASS}D3.java \
+ ../../../../ClassLibrary/JavaDSM/Barrier.java
+FLAGS=-dsm -dsmcaching -optimize -prefetch -excprefetch MatrixMultiply.main -excprefetch MMul.setValues -excprefetch MMul.transpose -mainclass ${MAINCLASS} -trueprob 0.98
FLAGS1=-dsm -optimize -dsmcaching -mainclass ${MAINCLASS}
FLAGS2=-dsm -optimize -mainclass ${MAINCLASS}
default:
- ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NPNC ${SRC1}
- ../../../../buildscript ${FLAGS1} -o ${MAINCLASS}NPC ${SRC1}
- ../../../../buildscript ${FLAGS} -o ${MAINCLASS}N ${SRC1}
+ ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NPNC ${SRC3}
+# ../../../../buildscript ${FLAGS1} -o ${MAINCLASS}NPC ${SRC1}
+ ../../../../buildscript ${FLAGS} -o ${MAINCLASS}N ${SRC3}
# ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NPNC200 ${SRC2}
# ../../../../buildscript ${FLAGS} -o ${MAINCLASS}N200 ${SRC2}
private Object nextlockobject;
private Object prevlockobject;
+ // temporary extra unused int filed to align objects for Java
+ int wkhqwemnbmwnb;
+
public int hashCode() {
if (!cachedHash) {
cachedCode=nativehashCode();
//Prefetch tuning paramters
//#define RETRYINTERVAL 20 //N (For Em3d, SOR, Moldyn benchmarks)
//#define SHUTDOWNINTERVAL 3 //M
-#define RETRYINTERVAL 100 //N (For MatrixMultiply, 2DFFT benchmarks)
+#define RETRYINTERVAL 75 //N (For MatrixMultiply, 2DFFT benchmarks)
#define SHUTDOWNINTERVAL 1 //M
#include <stdlib.h>
if ((val>=tmpbegin)&(val<tmpend)) {
prehashlistnode_t *tmp=curr->next=next->next;
free(next);
- next=tmp;
+ next=curr;
//loop condition is broken now...need to check before incrementing
- if (next==NULL)
- break;
+ // if (next==NULL)
+ // break;
}
}
{
#define STALE_MINTHRESHOLD 10 //minimum size
-#define STALE_MAXTHRESHOLD 30 //ugly hack..if you make this too small things
+#define STALE_MAXTHRESHOLD 40 //ugly hack..if you make this too small things
// will fail in odd subtle ways
#define DEFAULT_OBJ_STORE_SIZE (4194304-16) //just a little less the 4MB
-#define PREFETCH_FLUSH_THRESHOLD 20 //MINIMUM SIZE BEFORE FLUSHING
+#define PREFETCH_FLUSH_THRESHOLD 30 //MINIMUM SIZE BEFORE FLUSHING
#define STALL_THRESHOLD 15 //number of prefetches stores before we can start freeing old ones
objheader_t *headerObj;
int size;
GETSIZE(size, objcopy);
- if((headerObj = prefetchobjstrAlloc(size + sizeof(objheader_t))) == NULL) {
+ if((headerObj = prefetchobjstrAlloc(size+sizeof(objheader_t))) == NULL) {
printf("%s(): Error in getting memory from prefetch cache at %s, %d\n", __func__,
__FILE__, __LINE__);
pthread_mutex_unlock(&prefetchcache_mutex);
prehashInsert(oid, headerObj);
}
#endif
-
return &objcopy[1];
#else
return objcopy;