From a242f627ed257f6530839d54d8c394555ed73328 Mon Sep 17 00:00:00 2001 From: jzhou Date: Thu, 7 May 2009 18:28:06 +0000 Subject: [PATCH] updates for multicore version runtime, temporarily disable math operations in multicore version --- Robust/src/IR/Flat/BuildCode.java | 2 + Robust/src/IR/Flat/BuildCodeMultiCore.java | 42 +++--- Robust/src/IR/State.java | 1 + Robust/src/Main/Main.java | 2 + Robust/src/Runtime/GenericHashtable.c | 8 +- Robust/src/Runtime/file.c | 40 +++++- Robust/src/Runtime/math.c | 142 ++++++++++++++++++++- Robust/src/Runtime/multicoreruntime.c | 16 ++- Robust/src/Runtime/multicoretask.c | 40 ++++-- Robust/src/Runtime/runtime.h | 2 + Robust/src/Runtime/socket.c | 13 +- Robust/src/buildscript | 13 +- 12 files changed, 276 insertions(+), 45 deletions(-) diff --git a/Robust/src/IR/Flat/BuildCode.java b/Robust/src/IR/Flat/BuildCode.java index ea2363f0..c476478a 100644 --- a/Robust/src/IR/Flat/BuildCode.java +++ b/Robust/src/IR/Flat/BuildCode.java @@ -393,6 +393,8 @@ public class BuildCode { } if(state.MULTICORE) { outmethod.println("#include \"task.h\""); + outmethod.println("#include \"multicoreruntime.h\""); + outmethod.println("#include \"runtime_arch.h\""); } if (state.THREAD||state.DSM||state.SINGLETM) outmethod.println("#include "); diff --git a/Robust/src/IR/Flat/BuildCodeMultiCore.java b/Robust/src/IR/Flat/BuildCodeMultiCore.java index 42a67be0..c6dabfc5 100644 --- a/Robust/src/IR/Flat/BuildCodeMultiCore.java +++ b/Robust/src/IR/Flat/BuildCodeMultiCore.java @@ -645,25 +645,37 @@ public class BuildCodeMultiCore extends BuildCode { /* generate print information for RAW version */ output.println("#ifdef MULTICORE"); - output.println("{"); - output.println("int tmpsum = 0;"); - output.println("char * taskname = \"" + task.getSymbol() + "\";"); - output.println("int tmplen = " + task.getSymbol().length() + ";"); - output.println("int tmpindex = 1;"); - output.println("for(;tmpindex < tmplen; tmpindex++) {"); - output.println(" tmpsum = tmpsum * 10 + *(taskname + tmpindex) - '0';"); - output.println("}"); + if(this.state.RAW) { + output.println("{"); + output.println("int tmpsum = 0;"); + output.println("char * taskname = \"" + task.getSymbol() + "\";"); + output.println("int tmplen = " + task.getSymbol().length() + ";"); + output.println("int tmpindex = 1;"); + output.println("for(;tmpindex < tmplen; tmpindex++) {"); + output.println(" tmpsum = tmpsum * 10 + *(taskname + tmpindex) - '0';"); + output.println("}"); + } output.println("#ifdef RAWPATH"); - output.println("BAMBOO_DEBUGPRINT(0xAAAA);"); - output.println("BAMBOO_DEBUGPRINT_REG(tmpsum);"); - output.println("BAMBOO_DEBUGPRINT(BAMBOO_GET_EXE_TIME());"); + if(this.state.RAW) { + output.println("BAMBOO_DEBUGPRINT(0xAAAA);"); + output.println("BAMBOO_DEBUGPRINT_REG(tmpsum);"); + } else { + output.println("tprintf(\"Process %x(%d): task %s\\n\", corenum, corenum, \"" + task.getSymbol() + "\");"); + } + output.println("BAMBOO_DEBUGPRINT((int)BAMBOO_GET_EXE_TIME());"); output.println("#endif"); output.println("#ifdef DEBUG"); - output.println("BAMBOO_DEBUGPRINT(0xAAAA);"); - output.println("BAMBOO_DEBUGPRINT_REG(tmpsum);"); - output.println("#endif"); - output.println("}"); + if(this.state.RAW) { + output.println("BAMBOO_DEBUGPRINT(0xAAAA);"); + output.println("BAMBOO_DEBUGPRINT_REG(tmpsum);"); + } else { + output.println("tprintf(\"Process %x(%d): task %s\\n\", corenum, corenum, \"" + task.getSymbol() + "\");"); + } output.println("#endif"); + if(this.state.RAW) { + output.println("}"); + } + output.println("#endif"); for(int i = 0; i < fm.numParameters(); ++i) { TempDescriptor temp = fm.getParameter(i); diff --git a/Robust/src/IR/State.java b/Robust/src/IR/State.java index aec08257..011a1756 100644 --- a/Robust/src/IR/State.java +++ b/Robust/src/IR/State.java @@ -66,6 +66,7 @@ public class State { public String OWNERSHIPALIASFILE=null; public boolean OPTIONAL=false; public boolean ARRAYBOUNDARYCHECK=true; + public boolean RAW=false; public boolean SCHEDULING=false; public boolean USEPROFILE=false; public boolean THREAD=false; diff --git a/Robust/src/Main/Main.java b/Robust/src/Main/Main.java index d70417c9..ec102337 100644 --- a/Robust/src/Main/Main.java +++ b/Robust/src/Main/Main.java @@ -135,6 +135,8 @@ public class Main { state.OPTIMIZE=true; else if (option.equals("-dcopts")) state.DCOPTS=true; + else if (option.equals("-raw")) + state.RAW=true; else if (option.equals("-scheduling")) state.SCHEDULING=true; else if (option.equals("-distributioninfo")) diff --git a/Robust/src/Runtime/GenericHashtable.c b/Robust/src/Runtime/GenericHashtable.c index 83a65b63..f8255f39 100755 --- a/Robust/src/Runtime/GenericHashtable.c +++ b/Robust/src/Runtime/GenericHashtable.c @@ -1,7 +1,9 @@ #include #include +#ifndef MULTICORE #include #include +#endif #include #include @@ -138,7 +140,7 @@ void * gengettable(struct genhashtable *ht, void * key) { return ptr->object; ptr=ptr->next; } -#ifndef RAW +#ifndef MULTICORE printf("XXXXXXXXX: COULDN'T FIND ENTRY FOR KEY %p\n",key); #endif return NULL; @@ -154,7 +156,7 @@ void * getnext(struct genhashtable *ht, void * key) { return NULL; ptr=ptr->next; } -#ifndef RAW +#ifndef MULTICORE printf("XXXXXXXXX: COULDN'T FIND ENTRY FOR KEY %p...\n Likely concurrent removal--bad user!!!\n",key); #endif return NULL; @@ -211,7 +213,7 @@ void genfreekey(struct genhashtable *ht, void * key) { } ptr=ptr->next; } -#ifndef RAW +#ifndef MULTICORE printf("XXXXXXXXX: COULDN'T FIND ENTRY FOR KEY %p\n",key); #endif } diff --git a/Robust/src/Runtime/file.c b/Robust/src/Runtime/file.c index cf4e3ee7..bf6c2d3d 100644 --- a/Robust/src/Runtime/file.c +++ b/Robust/src/Runtime/file.c @@ -1,53 +1,80 @@ +#ifndef MULTICORE #include -#include #include #include +#endif +#include #include "structdefs.h" #include "mem.h" #include "runtime.h" void CALL34(___FileOutputStream______nativeWrite____I__AR_B_I_I, int fd, int off, int len, int fd, struct ArrayObject * ___array___, int off, int len) { +#ifdef MULTICORE +#else char * string= (((char *)&VAR(___array___)->___length___)+sizeof(int)); int status=write(fd, &string[off], len); +#endif } void CALL11(___FileOutputStream______nativeClose____I, int fd, int fd) { +#ifdef MULTICORE +#else close(fd); +#endif } void CALL11(___FileOutputStream______nativeFlush____I, int fd, int fd) { // not supported in RAW version -#ifndef RAW +#ifdef MULTICORE +#else fsync(fd); #endif } int CALL01(___FileOutputStream______nativeOpen_____AR_B, struct ArrayObject * ___filename___) { +#ifdef MULTICORE + return 0; +#else int length=VAR(___filename___)->___length___; char* filename= (((char *)&VAR(___filename___)->___length___)+sizeof(int)); int fd=open(filename, O_WRONLY|O_CREAT|O_TRUNC, S_IRWXU); return fd; +#endif } int CALL01(___FileOutputStream______nativeAppend_____AR_B, struct ArrayObject * ___filename___) { +#ifdef MULTICORE + return 0; +#else int length=VAR(___filename___)->___length___; char* filename= (((char *)&VAR(___filename___)->___length___)+sizeof(int)); int fd=open(filename, O_WRONLY|O_CREAT|O_APPEND, S_IRWXU); return fd; +#endif } int CALL01(___FileInputStream______nativeOpen_____AR_B, struct ArrayObject * ___filename___) { +#ifdef MULTICORE + return 0; +#else int length=VAR(___filename___)->___length___; char* filename= (((char *)&VAR(___filename___)->___length___)+sizeof(int)); int fd=open(filename, O_RDONLY, 0); return fd; +#endif } void CALL11(___FileInputStream______nativeClose____I, int fd, int fd) { +#ifdef MULTICORE +#else close(fd); +#endif } int CALL23(___FileInputStream______nativeRead____I__AR_B_I, int fd, int numBytes, int fd, struct ArrayObject * ___array___, int numBytes) { +#ifdef MULTICORE + return -1; +#else int toread=VAR(___array___)->___length___; char* string= (((char *)&VAR(___array___)->___length___)+sizeof(int)); int status; @@ -57,9 +84,13 @@ int CALL23(___FileInputStream______nativeRead____I__AR_B_I, int fd, int numBytes status=read(fd, string, toread); return status; +#endif } int CALL11(___FileInputStream______nativePeek____I, int fd, int fd) { +#ifdef MULTICORE + return 0; +#else int status; char string[1]; status=read(fd, string, 1); @@ -69,12 +100,17 @@ int CALL11(___FileInputStream______nativePeek____I, int fd, int fd) { } lseek(fd, -1, SEEK_CUR); return string[0]; +#endif } long long CALL01(___File______nativeLength_____AR_B, struct ArrayObject * ___pathname___) { +#ifdef MULTICORE + return 0; +#else int length=VAR(___pathname___)->___length___; char* filename= (((char *)&VAR(___pathname___)->___length___)+sizeof(int)); struct stat st; stat(filename, &st); return st.st_size; +#endif } diff --git a/Robust/src/Runtime/math.c b/Robust/src/Runtime/math.c index 183fb6b8..95a03f1c 100644 --- a/Robust/src/Runtime/math.c +++ b/Robust/src/Runtime/math.c @@ -1,79 +1,219 @@ #include "runtime.h" +#ifdef MULTICORE +#ifdef RAW #include "math.h" +#endif +#else +#include "math.h" +#endif #include "structdefs.h" - +#if 0 double CALL11(___Math______cos____D, double ___a___, double ___a___) { +#ifdef MULTICORE + return 1; +#ifdef RAW + return cos(___a___); +#endif +#else return cos(___a___); +#endif } double CALL11(___Math______sin____D, double ___a___, double ___a___) { +#ifdef MULTICORE + return 1; +#ifdef RAW return sin(___a___); +#endif +#else + return sin(___a___); +#endif } double CALL11(___Math______tan____D, double ___a___, double ___a___) { +#ifdef MULTICORE + return 1; +#ifdef RAW + return tan(___a___); +#endif +#else return tan(___a___); +#endif } double CALL11(___Math______acos____D, double ___a___, double ___a___) { +#ifdef MULTICORE + return 1; +#ifdef RAW return acos(___a___); +#endif +#else + return acos(___a___); +#endif } double CALL11(___Math______asin____D, double ___a___, double ___a___) { +#ifdef MULTICORE + return 1; +#ifdef RAW + return asin(___a___); +#endif +#else return asin(___a___); +#endif } double CALL11(___Math______atan____D, double ___a___, double ___a___) { +#ifdef MULTICORE + return 1; +#ifdef RAW + return atan(___a___); +#endif +#else return atan(___a___); +#endif } double CALL22(___Math______atan2____D_D, double ___a___, double ___b___, double ___a___, double ___b___) { +#ifdef MULTICORE + return 1; +#ifdef RAW return atan2(___a___,___b___); +#endif +#else + return atan2(___a___,___b___); +#endif } double CALL11(___Math______log____D, double ___a___, double ___a___) { +#ifdef MULTICORE + return 1; +#ifdef RAW + return log(___a___); +#endif +#else return log(___a___); +#endif } double CALL11(___Math______exp____D, double ___a___, double ___a___) { +#ifdef MULTICORE + return 1; +#ifdef RAW return exp(___a___); +#endif +#else + return exp(___a___); +#endif } double CALL11(___Math______sqrt____D, double ___a___, double ___a___) { +#ifdef MULTICORE + return -1; +#ifdef RAW + return sqrt(___a___); +#endif +#else return sqrt(___a___); +#endif } double CALL22(___Math______pow____D_D, double ___a___, double ___b___, double ___a___, double ___b___) { +#ifdef MULTICORE + return 1; +#ifdef RAW + return pow(___a___); +#endif +#else return pow(___a___,___b___); +#endif } double CALL11(___Math______ceil____D, double ___a___, double ___a___) { +#ifdef MULTICORE + return 1; +#ifdef RAW + return ceil(___a___); +#endif +#else return ceil(___a___); +#endif } double CALL11(___Math______floor____D, double ___a___, double ___a___) { +#ifdef MULTICORE + return 1; +#ifdef RAW return floor(___a___); +#endif +#else + return floor(___a___); +#endif } float CALL11(___Math______cosf____F, float ___a___, float ___a___) { +#ifdef MULTICORE + return 1; +#ifdef RAW + return cosf(___a___); +#endif +#else return cosf(___a___); +#endif } float CALL11(___Math______sinf____F, float ___a___, float ___a___) { +#ifdef MULTICORE + return 1; +#ifdef RAW return sinf(___a___); +#endif +#else + return sinf(___a___); +#endif } float CALL11(___Math______expf____F, float ___a___, float ___a___) { +#ifdef MULTICORE + return 1; +#ifdef RAW + return expf(___a___); +#endif +#else return expf(___a___); +#endif } float CALL11(___Math______sqrtf____F, float ___a___, float ___a___) { +#ifdef MULTICORE + return 1; +#ifdef RAW + return sqrtf(___a___); +#endif +#else return sqrtf(___a___); +#endif } float CALL11(___Math______logf____F, float ___a___, float ___a___) { +#ifdef MULTICORE + return 1; +#ifdef RAW return logf(___a___); +#endif +#else + return logf(___a___); +#endif } float CALL22(___Math______powf____F_F, float ___a___, float ___b___, float ___a___, float ___b___) { +#ifdef MULTICORE + return 1; +#ifdef RAW + return powf(___a___,___b___); +#endif +#else return powf(___a___,___b___); +#endif } +#endif diff --git a/Robust/src/Runtime/multicoreruntime.c b/Robust/src/Runtime/multicoreruntime.c index 5f25575f..2836a4e3 100644 --- a/Robust/src/Runtime/multicoreruntime.c +++ b/Robust/src/Runtime/multicoreruntime.c @@ -1,10 +1,11 @@ #include "runtime.h" #include "structdefs.h" -#include #include "mem.h" +#ifndef MULTICORE #include #include #include +#endif #ifndef RAW #include #endif @@ -14,13 +15,13 @@ //#include "option.h" extern int classsize[]; +#ifndef MULTICORE jmp_buf error_handler; int instructioncount; char *options; int injectfailures=0; float failurechance=0; -int debugtask=0; int errors=0; int injectinstructionfailures; int failurecount; @@ -30,6 +31,9 @@ int instaccum=0; #ifdef DMALLOC #include "dmalloc.h" #endif +#endif + +int debugtask=0; #ifdef MULTICORE void initializeexithandler() { @@ -167,7 +171,7 @@ struct ArrayObject * allocate_newarray(void * ptr, int type, int length) { //v->numlocks = 0; v->lock = NULL; if (length<0) { -#ifndef RAW +#ifndef MULTICORE printf("ERROR: negative array\n"); #endif return NULL; @@ -244,14 +248,20 @@ void failedboundschk() { exit(-1); #endif #else +#ifndef MULTICORE + printf("Array out of bounds\n"); longjmp(error_handler,2); #endif +#endif } /* Abort task call */ void abort_task() { #ifdef TASK +#ifndef MULTICORE + printf("Aborting\n"); longjmp(error_handler,4); +#endif #else printf("Aborting\n"); exit(-1); diff --git a/Robust/src/Runtime/multicoretask.c b/Robust/src/Runtime/multicoretask.c index 4becf4ef..93a16e92 100644 --- a/Robust/src/Runtime/multicoretask.c +++ b/Robust/src/Runtime/multicoretask.c @@ -672,7 +672,7 @@ void tagclear(struct ___Object___ * obj, struct ___TagDescriptor___ * tagd) { if ((struct ___TagDescriptor___ *)tagptr==tagd) obj->___tags___=NULL; else -#ifndef RAW +#ifndef MULTICORE printf("ERROR 1 in tagclear\n"); #else ; @@ -692,7 +692,7 @@ void tagclear(struct ___Object___ * obj, struct ___TagDescriptor___ * tagd) { goto PROCESSCLEAR; } } -#ifndef RAW +#ifndef MULTICORE printf("ERROR 2 in tagclear\n"); #endif } @@ -703,7 +703,7 @@ PROCESSCLEAR: if (tagset==obj) tagd->flagptr=NULL; else -#ifndef RAW +#ifndef MULTICORE printf("ERROR 3 in tagclear\n"); #else ; @@ -723,7 +723,7 @@ PROCESSCLEAR: goto ENDCLEAR; } } -#ifndef RAW +#ifndef MULTICORE printf("ERROR 4 in tagclear\n"); #endif } @@ -2432,6 +2432,7 @@ void myhandler(int sig, siginfo_t *info, void *uap) { } #endif +#ifndef MULTICORE fd_set readfds; int maxreadfd; struct RuntimeHash *fdtoobject; @@ -2450,6 +2451,7 @@ void removereadfd(int fd) { maxreadfd--; } } +#endif #ifdef PRECISE_GC #define OFFSET 2 @@ -2500,7 +2502,9 @@ void executetasks() { /* Zero fd set */ FD_ZERO(&readfds); #endif +#ifndef MULTICORE maxreadfd=0; +#endif #if 0 fdtoobject=allocateRuntimeHash(100); #endif @@ -2511,7 +2515,11 @@ void executetasks() { #endif newtask: +#ifdef MULTICORE + while(hashsize(activetasks)>0) { +#else while((hashsize(activetasks)>0)||(maxreadfd>0)) { +#endif #ifdef DEBUG BAMBOO_DEBUGPRINT(0xe990); @@ -2726,7 +2734,7 @@ newtask: ObjectHashget(pw->objectset, (int) parameter, (int *) &next, (int *) &enterflags, &UNUSED, &UNUSED2); ObjectHashremove(pw->objectset, (int)parameter); if (enterflags!=NULL) - free(enterflags); + RUNFREE(enterflags); // release grabbed locks for(j = 0; j < locklen; ++j) { int * lock = (int *)(locks[j]->redirectlock); @@ -2781,11 +2789,12 @@ parameterpresent: //void ** checkpoint=makecheckpoint(currtpd->task->numParameters, currtpd->parameterArray, forward, reverse); #endif #endif // #if 0: for recovery +#ifndef MULTICORE if (x=setjmp(error_handler)) { //int counter; /* Recover */ #ifdef DEBUG -#ifndef RAW +#ifndef MULTICORE printf("Fatal Error=%d, Recovering!\n",x); #endif #endif @@ -2802,6 +2811,7 @@ parameterpresent: BAMBOO_DEBUGPRINT_REG(x); BAMBOO_EXIT(0xa020); } else { +#endif #if 0 if (injectfailures) { if ((((double)random())/RAND_MAX)task->name, (instaccum-instructioncount)); +#ifndef MULTICORE + printf("ENTER %s count=%d\n",currtpd->task->name, (instaccum-instructioncount)); #endif ((void(*) (void **))currtpd->task->taskptr)(taskpointerarray); -#ifndef RAW +#ifndef MULTICORE printf("EXIT %s count=%d\n",currtpd->task->name, (instaccum-instructioncount)); #endif } else { @@ -2894,7 +2904,9 @@ execute: } } } +#ifndef MULTICORE } +#endif #ifdef DEBUG BAMBOO_DEBUGPRINT(0xe99b); #endif @@ -3013,7 +3025,7 @@ void printdebug() { } for(i=0; iname); #endif for(j=0; jnumParameters; j++) { @@ -3021,7 +3033,7 @@ void printdebug() { struct parameterwrapper *parameter=param->queue; struct ObjectHash * set=parameter->objectset; struct ObjectIterator objit; -#ifndef RAW +#ifndef MULTICORE printf(" Parameter %d\n", j); #endif ObjectHashiterator(set, &objit); @@ -3032,13 +3044,13 @@ void printdebug() { int numflags=Objdata3(&objit); int flags=Objdata2(&objit); Objnext(&objit); -#ifndef RAW +#ifndef MULTICORE printf(" Contains %lx\n", obj); printf(" flag=%d\n", obj->flag); #endif if (tagptr==NULL) { } else if (tagptr->type==TAGTYPE) { -#ifndef RAW +#ifndef MULTICORE printf(" tag=%lx\n",tagptr); #else ; @@ -3047,7 +3059,7 @@ void printdebug() { int tagindex=0; struct ArrayObject *ao=(struct ArrayObject *)tagptr; for(; tagindex___cachedCode___; tagindex++) { -#ifndef RAW +#ifndef MULTICORE printf(" tag=%lx\n",ARRAYGET(ao, struct ___TagDescriptor___*, tagindex)); #else ; diff --git a/Robust/src/Runtime/runtime.h b/Robust/src/Runtime/runtime.h index 7480746b..76c16926 100644 --- a/Robust/src/Runtime/runtime.h +++ b/Robust/src/Runtime/runtime.h @@ -1,9 +1,11 @@ #ifndef RUNTIME #define RUNTIME +#ifndef MULTICORE #include extern jmp_buf error_handler; extern int instructioncount; extern int failurecount; +#endif #ifdef DSTM #include "dstm.h" #endif diff --git a/Robust/src/Runtime/socket.c b/Robust/src/Runtime/socket.c index 564e7428..cb7b77e9 100644 --- a/Robust/src/Runtime/socket.c +++ b/Robust/src/Runtime/socket.c @@ -1,14 +1,14 @@ #include "runtime.h" #include "structdefs.h" -#include #ifndef MULTICORE +#include #include #include #include #include #include -#endif #include +#endif #include "SimpleHash.h" #include "GenericHashtable.h" @@ -342,6 +342,8 @@ int CALL02(___ServerSocket______nativeaccept____L___Socket___,struct ___ServerSo } void CALL24(___Socket______nativeWrite_____AR_B_I_I, int offset, int length, struct ___Socket___ * ___this___, struct ArrayObject * ___b___, int offset, int length) { +#ifdef MULTICORE +#else int fd=VAR(___this___)->___fd___; char * charstr=((char *)&VAR(___b___)->___length___)+sizeof(int)+offset; while(1) { @@ -356,16 +358,18 @@ void CALL24(___Socket______nativeWrite_____AR_B_I_I, int offset, int length, str } if (length!=0) { -#ifndef MULTICORE perror("ERROR IN NATIVEWRITE"); printf("error=%d remaining bytes %d\n",errno, length); -#endif } break; } +#endif } int CALL02(___Socket______nativeRead_____AR_B, struct ___Socket___ * ___this___, struct ArrayObject * ___b___) { +#ifdef MULTICORE + return -1; +#else int fd=VAR(___this___)->___fd___; int length=VAR(___b___)->___length___; @@ -412,6 +416,7 @@ int CALL02(___Socket______nativeRead_____AR_B, struct ___Socket___ * ___this___, #endif #endif return byteread; +#endif } void CALL01(___Socket______nativeClose____, struct ___Socket___ * ___this___) { diff --git a/Robust/src/buildscript b/Robust/src/buildscript index a23e2eb1..c43dbe3f 100755 --- a/Robust/src/buildscript +++ b/Robust/src/buildscript @@ -34,6 +34,7 @@ echo -printscheduling print out scheduling graphs echo -printschedulesim print out scheduling simulator result graphs echo -abcclose close the array boundary check echo "-tilera generate tilera version binary (should be used together with -multicore" +echo "-tileraconfig config tilera simulator/pci as nxm (should be used together with -tilera)" echo "-raw generate raw version binary (should be used together with -multicore)" echo "-rawconfig config raw simulator as 4xn (should be used together with -raw)" echo -threadsimulate generate multi-thread simulate version binary @@ -74,6 +75,7 @@ MLPDEBUG=false MULTICOREFLAG=false RAWFLAG=false TILERAFLAG=false +TILERACONFIG='' CACHEFLUSHFLAG=false RAWCONFIG='' DEBUGFLAG=false @@ -206,9 +208,14 @@ shift elif [[ $1 = '-raw' ]] then RAWFLAG=true +JAVAOPTS="$JAVAOPTS -raw" elif [[ $1 = '-tilera' ]] then TILERAFLAG=true +elif [[ $1 = '-tileraconfig' ]] +then +TILERACONFIG="$2" +shift elif [[ $1 = '-cacheflush' ]] then CACHEFLUSHFLAG=true @@ -486,7 +493,8 @@ make elif $TILERAFLAG then # TILERAFLAG TILERADIR="$CURDIR/tilera" -MAKEFILE="Makefile.tilera" +MAKEFILE="Makefile.tilera.$TILERACONFIG" +SIMHVC="sim.hvc.$TILERACONFIG" mkdir $TILERADIR cd $TILERADIR make clean @@ -525,6 +533,7 @@ TILERACFLAGS="${TILERACFLAGS} -DINTERRUPT" fi #INTERRUPT version cp $ROBUSTROOT/Runtime/Tilera/$MAKEFILE ./Makefile +cp $ROBUSTROOT/Runtime/Tilera/$SIMHVS ./sim.hvc cp ../Runtime/multicoretask.c ./ cp ../Runtime/multicoreruntime.c ./ cp ../Runtime/Queue.c ./ @@ -535,8 +544,6 @@ cp ../Runtime/GenericHashtable.c ./ cp ../Runtime/SimpleHash.c ./ cp ../Runtime/ObjectHash.c ./ cp ../Runtime/socket.c ./ -cp ../Runtime/taskdefs.c ./ -cp ../Runtime/methods.c ./ cp ../Runtime/mem.c ./ cp ../Runtime/GenericHashtable.h ./ cp ../Runtime/mem.h ./ -- 2.34.1