5 echo -singleTM single machine committing transactions
6 echo -stmdebug STM debug
7 echo "-stmstats prints single machine commit (stm) statistics for the benchmark"
8 echo -fastmemcpy use fast memcpy
9 echo -sandbox sandbox transactions
10 echo -dcopts conflict optimizations for transactional memory
11 echo -transstats generates transaction stats on commits and aborts
12 echo -inlineatomic depth inline methods inside of transactions to specified depth
13 echo "-stmarray partial array treatment"
14 echo "-dualview dual view of arrays"
15 echo "-hybrid use fission only when it looks like a good choice"
16 echo "-numa numa aware"
17 echo "-eventmonitor turn on transaction event trace recording"
20 echo -dsm distributed shared memory
21 echo -abortreaders abort readers immediately
22 echo -trueprob double - probabiltiy of true branch
23 echo -dsmcaching -enable caching in dsm runtime
25 echo BAMBOO Multicore options
26 echo -scheduling do task scheduling
27 echo -multicore generate multi-core version binary
28 echo "-numcore set the number of cores (should be used together with -multicore), defaultly set as 1"
29 echo "-cacheflush enable cache flush in raw version binary (should be used togethere with -raw)"
30 echo "-interrupt generate raw version binary with interruption (should be used togethere with -raw)"
31 echo "-rawpath print out execute path information for raw version (should be used together with -raw)"
32 echo "-useprofile use profiling data for scheduling (should be used together with -raw)"
33 echo -printscheduling print out scheduling graphs
34 echo -printschedulesim print out scheduling simulator result graphs
35 echo -abcclose close the array boundary check
36 echo "-tilera_bme generate tilera version binary for Bare Mental Environment (should be used together with -multicore"
37 echo "-tilera_zlinux generate tilera version binary for Zero-Overhead Linux with multi-process mode (should be used together with -multicore"
38 echo "-tileraconfig config tilera simulator/pci as nxm (should be used together with -tilera)"
39 echo "-raw generate raw version binary (should be used together with -multicore)"
40 echo "-rawconfig config raw simulator as 4xn (should be used together with -raw)"
41 echo -multicoregc generate multi-core binary with garbage collection
42 echo "-numcore4gc set the number of cores for gc (should be used together with -multicoregc), defaultly set as 0"
43 echo "-gcmem_local set the gc shared memory allocation strategy as local (should be used together with -multicoregc)"
44 echo "-gcmem_fixed set the gc shared memory allocation strategy as fixed (should be used together with -multicoregc)"
45 echo "-gcmem_mixed set the gc shared memory allocation strategy as mixed (should be used together with -multicoregc)"
46 echo "-gcmem_global set the gc shared memory allocation strategy as global (should be used together with -multicoregc)"
47 echo "-gccache_local set the gc shared memory cache strategy as local (should be used together with -multicoregc)"
48 echo "-gccache_ran set the gc shared memory cache strategy as random (should be used together with -multicoregc)"
49 echo "-gccontroller_near set the gc shared memory to use the nearest controller for each core (should be used together with -multicoregc)"
50 echo "-gccontroller_remote set the gc shared memory to use a remote controller for each core (should be used together with -multicoregc)"
51 echo -gcprofile build with gcprofile options
52 echo -gcprofile_s build with gcprofile_s options
53 echo -accurateprofile build with accurate profile information including pre/post task processing info
54 echo "-useio use standard io to output profiling data (should be used together with -raw and -profile), it only works with single core version"
57 echo -builddir setup different build directory
58 echo -robustroot set up the ROBUSTROOT to directory other than default one
59 echo -readset turn on readset
60 echo -mac distributed shared memory mac support
61 echo -check generate check code
62 echo -dmalloc link in dmalloc
63 echo -64bit compile for 64 bit machine
64 echo -32bit compile for 32 bit machine
65 echo -joptimize java compiler optimizations
66 echo -recover compile task code
67 echo -fastcheck fast checkpointing for Bristlecone
68 echo -specdir directory
69 echo -printflat print out flat representation
70 echo -selfloop task - this task cannot self loop forever
71 echo "-excprefetch methoddescriptor - exclude prefetches for this method (specified as class.method)"
72 echo -taskstate do task state analysis
73 echo -tagstate do tag state analysis
74 echo -optional enable optional
75 echo -debug generate debug symbols
76 echo -prefetch do prefetch analysis
77 echo -garbagestats Print garbage collection statistics
78 echo -webinterface enable web interface
79 echo -runtimedebug printout runtime debug messages
80 echo "-thread use support for multiple threads"
81 echo "-optimize call gcc with -O9 (optimize)"
82 echo "-nooptimize call gcc with -O0 (do not optimize)"
83 echo -curdir directory
84 echo -mainclass class with main method
86 echo -nojava do not run bristlecone compiler
87 echo -instructionfailures inject code for instructionfailures
88 echo -profile build with profile options
89 echo "-enable-assertions execute assert statements during compilation"
90 echo -justanalyze exit after compiler analyses complete
91 echo "-distributioninfo execute to collect distribution info for simulated annealing in multi-core version"
92 echo "-disall execute to collect whole distribution"
93 echo "-disstart specify the start number of distribution information collection"
94 echo -assembly generate assembly
95 echo -recovery compile recovery code
96 echo -dsmtask support work and task class library
97 echo -recoverystats print out recovery record
101 tmpbuilddirectory="tmpbuilddirectory"
105 ROBUSTROOT=~/research/Robust/src
106 DSMRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface/
107 STMRUNTIME=$ROBUSTROOT/Runtime/STM/
108 DSMRECOVERYRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface_recovery/
109 REPAIRROOT=~/research/Repair/RepairCompiler/
127 TILERAZLINUXFLAG=false
136 ACCURATEPROFILEFLAG=false
139 THREADSIMULATEFLAG=false;
140 MULTICOREGCFLAG=false;
141 GCMEMLOCALFLAG=false;
142 GCMEMFIXEDFLAG=false;
143 GCMEMMIXEDFLAG=false;
144 GCMEMGLOBALFLAG=false;
145 GCCACHELOCALFLAG=false;
146 GCCACHERANFLAG=false;
147 GCCONTROLLERNEARFLAG=false;
148 GCCONTROLLERREMOTEFLAG=false;
159 EXITAFTERANALYSIS=false
163 TILERAN1COREFLAG=false
173 if [[ $1 = '-help' ]]
177 elif [[ $1 = '-justanalyze' ]]
179 EXITAFTERANALYSIS=true
180 elif [[ $1 = '-assembly' ]]
183 elif [[ $1 = '-abortreaders' ]]
186 EXTRAOPTIONS="$EXTRAOPTIONS -DABORTREADERS"
187 JAVAOPTS="$JAVAOPTS -abortreaders"
188 elif [[ $1 = '-sandbox' ]]
191 EXTRAOPTIONS="$EXTRAOPTIONS -DSANDBOX"
192 JAVAOPTS="$JAVAOPTS -sandbox"
193 elif [[ $1 = '-numa' ]]
195 EXTRAOPTIONS="$EXTRAOPTIONS -DAFFINITY -D_GNU_SOURCE"
197 elif [[ $1 = '-robustroot' ]]
201 elif [[ $1 = '-builddir' ]]
203 tmpbuilddirectory="$2"
205 elif [[ $1 = '-nojava' ]]
208 elif [[ $1 = '-eventmonitor' ]]
210 JAVAOPTS="$JAVAOPTS -eventmonitor"
212 EXTRAOPTIONS="$EXTRAOPTIONS -DEVENTMONITOR"
213 elif [[ $1 = '-garbagestats' ]]
215 EXTRAOPTIONS="$EXTRAOPTIONS -DGARBAGESTATS"
216 elif [[ $1 = '-64bit' ]]
218 EXTRAOPTIONS="$EXTRAOPTIONS -DBIT64 -m64"
219 elif [[ $1 = '-32bit' ]]
221 EXTRAOPTIONS="$EXTRAOPTIONS -m32"
222 elif [[ $1 = '-fastcheck' ]]
224 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTCHECK"
225 JAVAOPTS="$JAVAOPTS -fastcheck"
231 elif [[ $1 = '-mainclass' ]]
233 JAVAOPTS="$JAVAOPTS -mainclass $2"
235 elif [[ $1 = '-selfloop' ]]
237 JAVAOPTS="$JAVAOPTS -selfloop $2"
239 elif [[ $1 = '-excprefetch' ]]
241 JAVAOPTS="$JAVAOPTS -excprefetch $2"
243 elif [[ $1 = '-arraypad' ]]
245 JAVAOPTS="$JAVAOPTS -arraypad"
246 elif [[ $1 = '-dsm' ]]
248 JAVAOPTS="$JAVAOPTS -dsm"
250 elif [[ $1 = '-fastmemcpy' ]]
253 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTMEMCPY"
254 elif [[ $1 = '-singleTM' ]]
256 JAVAOPTS="$JAVAOPTS -singleTM"
257 EXTRAOPTIONS="$EXTRAOPTIONS -DSTM"
259 elif [[ $1 = '-stmarray' ]]
261 JAVAOPTS="$JAVAOPTS -stmarray"
262 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMARRAY"
264 elif [[ $1 = '-dualview' ]]
266 JAVAOPTS="$JAVAOPTS -dualview"
267 EXTRAOPTIONS="$EXTRAOPTIONS -DDUALVIEW"
269 elif [[ $1 = '-readset' ]]
271 JAVAOPTS="$JAVAOPTS -readset"
272 EXTRAOPTIONS="$EXTRAOPTIONS -DREADSET"
273 elif [[ $1 = '-stmdebug' ]]
275 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMDEBUG"
276 elif [[ $1 = '-stmstats' ]]
278 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMSTATS"
279 elif [[ $1 = '-stmlog' ]]
281 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMLOG"
282 elif [[ $1 = '-prefetch' ]]
284 JAVAOPTS="$JAVAOPTS -prefetch"
285 elif [[ $1 = '-transstats' ]]
287 EXTRAOPTIONS="$EXTRAOPTIONS -DTRANSSTATS"
288 elif [[ $1 = '-printflat' ]]
290 JAVAOPTS="$JAVAOPTS -printflat"
291 elif [[ $1 = '-trueprob' ]]
293 JAVAOPTS="$JAVAOPTS -trueprob $2"
295 elif [[ $1 = '-inlineatomic' ]]
297 JAVAOPTS="$JAVAOPTS -inlineatomic $2"
299 elif [[ $1 = '-mac' ]]
301 EXTRAOPTIONS="$EXTRAOPTIONS -DMAC"
302 elif [[ $1 = '-profile' ]]
305 EXTRAOPTIONS="$EXTRAOPTIONS -pg"
306 elif [[ $1 = '-gcprofile' ]]
309 elif [[ $1 = '-gcprofile_s' ]]
312 elif [[ $1 = '-accurateprofile' ]]
314 ACCURATEPROFILEFLAG=true
315 elif [[ $1 = '-useio' ]]
318 elif [[ $1 = '-taskstate' ]]
320 JAVAOPTS="$JAVAOPTS -taskstate"
321 elif [[ $1 = '-tagstate' ]]
323 JAVAOPTS="$JAVAOPTS -tagstate"
324 elif [[ $1 = '-scheduling' ]]
326 JAVAOPTS="$JAVAOPTS -scheduling"
327 elif [[ $1 = '-multicore' ]]
330 JAVAOPTS="$JAVAOPTS -multicore"
331 elif [[ $1 = '-numcore' ]]
333 JAVAOPTS="$JAVAOPTS -numcore $2"
334 if [[ "$2" -gt "1" ]]
336 TILERAN1COREFLAG=true
339 elif [[ $1 = '-numcore4gc' ]]
341 JAVAOPTS="$JAVAOPTS -numcore4gc $2"
343 if [[ "$2" -eq "1" ]]
348 elif [[ $1 = '-raw' ]]
351 JAVAOPTS="$JAVAOPTS -raw"
352 elif [[ $1 = '-tilera_bme' ]]
356 elif [[ $1 = '-tilera_zlinux' ]]
359 TILERAZLINUXFLAG=true
360 elif [[ $1 = '-tileraconfig' ]]
364 elif [[ $1 = '-cacheflush' ]]
367 elif [[ $1 = '-rawconfig' ]]
371 elif [[ $1 = '-interrupt' ]]
374 elif [[ $1 = '-abcclose' ]]
376 JAVAOPTS="$JAVAOPTS -abcclose"
377 elif [[ $1 = '-optional' ]]
379 JAVAOPTS="$JAVAOPTS -optional"
381 elif [[ $1 = '-multicoregc' ]]
384 JAVAOPTS="$JAVAOPTS -multicoregc"
385 elif [[ $1 = '-gcmem_local' ]]
388 elif [[ $1 = '-gcmem_fixed' ]]
391 elif [[ $1 = '-gcmem_mixed' ]]
394 elif [[ $1 = '-gcmem_global' ]]
397 elif [[ $1 = '-gccache_local' ]]
399 GCCACHELOCALFLAG=true
400 elif [[ $1 = '-gccache_ran' ]]
403 elif [[ $1 = '-gccontroller_near' ]]
405 GCCONTROLLERNEARFLAG=true
406 elif [[ $1 = '-gccontroller_remote' ]]
408 GCCONTROLLERREMOTEFLAG=true
409 elif [[ $1 = '-dmalloc' ]]
412 elif [[ $1 = '-recover' ]]
415 JAVAOPTS="$JAVAOPTS -task"
416 elif [[ $1 = '-useprofile' ]]
418 JAVAOPTS="$JAVAOPTS -useprofile $2"
420 elif [[ $1 = '-webinterface' ]]
422 JAVAOPTS="$JAVAOPTS -webinterface"
423 elif [[ $1 = '-instructionfailures' ]]
425 JAVAOPTS="$JAVAOPTS -instructionfailures"
426 elif [[ $1 = '-joptimize' ]]
428 JAVAOPTS="$JAVAOPTS -optimize"
429 elif [[ $1 = '-dcopts' ]]
431 JAVAOPTS="$JAVAOPTS -dcopts"
432 elif [[ $1 = '-delaycomp' ]]
434 JAVAOPTS="$JAVAOPTS -delaycomp"
435 EXTRAOPTIONS="$EXTRAOPTIONS -DDELAYCOMP"
436 elif [[ $1 = '-hybrid' ]]
438 JAVAOPTS="$JAVAOPTS -hybrid"
439 EXTRAOPTIONS="$EXTRAOPTIONS -DHYBRID"
440 elif [[ $1 = '-minimize' ]]
442 JAVAOPTS="$JAVAOPTS -minimize"
444 elif [[ $1 = '-ooojava' ]]
447 JAVAOPTS="$JAVAOPTS -ooojava $2 $3"
448 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
452 elif [[ $1 = '-mlp' ]]
455 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
456 JAVAOPTS="$JAVAOPTS -mlp $2 $3"
460 elif [[ $1 = '-mlpdebug' ]]
462 JAVAOPTS="$JAVAOPTS -mlpdebug"
464 elif [[ $1 = '-check' ]]
467 JAVAOPTS="$JAVAOPTS -conscheck"
468 elif [[ $1 = '-enable-assertions' ]]
470 JAVAFORWARDOPTS="$JAVAFORWARDOPTS -ea"
471 elif [[ $1 = '-specdir' ]]
477 elif [[ $1 = '-debug' ]]
480 EXTRAOPTIONS="$EXTRAOPTIONS -g -rdynamic"
481 elif [[ $1 = '-rawpath' ]]
484 elif [[ $1 = '-runtimedebug' ]]
486 EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG"
487 elif [[ $1 = '-dsmcaching' ]]
489 EXTRAOPTIONS="$EXTRAOPTIONS -DCACHE"
490 elif [[ $1 = '-rangeprefetch' ]]
492 EXTRAOPTIONS="$EXTRAOPTIONS -DRANGEPREFETCH"
493 elif [[ $1 = '-nooptimize' ]]
495 EXTRAOPTIONS="$EXTRAOPTIONS -O0"
496 elif [[ $1 = '-optimize' ]]
498 EXTRAOPTIONS="$EXTRAOPTIONS -O3"
499 elif [[ $1 = '-thread' ]]
501 JAVAOPTS="$JAVAOPTS -thread"
502 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADS -lpthread"
504 elif [[ $1 = '-recovery' ]]
506 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERY"
508 elif [[ $1 = '-recoverystats' ]]
510 JAVAOPTS="$JAVAOPTS -recoverystats"
511 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERYSTATS"
512 elif [[ $1 = '-distributioninfo' ]]
514 JAVAOPTS="$JAVAOPTS -distributioninfo"
515 elif [[ $1 = '-disall' ]]
517 JAVAOPTS="$JAVAOPTS -disall"
518 elif [[ $1 = '-disstart' ]]
520 JAVAOPTS="$JAVAOPTS -disstart $2"
522 elif [[ $1 = '-noc' ]]
525 elif [[ $1 = '-curdir' ]]
529 elif [[ $1 = '-outputdir' ]]
531 JAVAOPTS="$JAVAOPTS -outputdir $2"
534 SRCFILES="$SRCFILES $1"
539 BUILDDIR="$CURDIR/$tmpbuilddirectory"
547 if $CHECKFLAG #Generate structure files for repair tool
549 JAVAOPTS="$JAVAOPTS -struct structfile"
559 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/FastCheck"
561 #base bristlecone files
562 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Bristlecone"
568 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaDSM"
571 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaSTM"
574 #threading java stuff
575 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaThread"
578 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Java"
581 # Build bristlecone/java sources
585 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
586 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ \
587 -dir $BUILDDIR $JAVAOPTS $SRCFILES
591 #if ! ${ROBUSTROOT}/ourjava -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
594 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
595 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ -dir $BUILDDIR -precise \
602 if $EXITAFTERANALYSIS
607 # Build all of the consistency specs
609 if $CHECKFLAG # CHECKFLAG
612 mkdir $BUILDDIR/specdir
613 cp $REPAIRROOT/MCC/CRuntime/* $BUILDDIR/specdir
615 echo > $BUILDDIR/specs
617 # compile specs into C code
618 for i in * # iterate over all directories
620 if [[ "$i" != "CVS" ]] # CVSDIR CHECK
623 cat $BUILDDIR/structfile.struct $i.label > $i.struct
624 java -cp $REPAIRROOT/:. MCC.Compiler -name $i -checkonly $i
625 cp size.[c,h] $BUILDDIR/specdir
626 cp $i.c $i\_aux.[c,h] $BUILDDIR/specdir
627 echo $i >> $BUILDDIR/specs
629 done # iterate over all directories
635 echo > $BUILDDIR/checkers.h
636 for i in `cat $BUILDDIR/specs`
638 gcc -O0 -g -fbounds-check -c $i\_aux.c
639 echo \#include \"specdir\/$i\_aux.h\" >> $BUILDDIR/checkers.h
643 #build and link everything
648 MAKEFILE="Makefile.raw"
654 export RAWRGCCFLAGS="-DTASK -DMULTICORE -DRAW"
658 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DCACHEFLUSH"
663 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWPATH"
668 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DDEBUG"
672 then # profile version
673 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DPROFILE"
676 if $ACCURATEPROFILEFLAG
677 then # accurateprofile version
678 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DACCURATEPROFILE"
683 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DUSEIO"
687 then #INTERRUPT version
688 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DINTERRUPT"
689 fi #INTERRUPT version
693 MAKEFILE="$MAKEFILE.io"
694 echo "+++++++++++use Makefile.raw.io++++++++++++++++"
696 MAKEFILE="$MAKEFILE.$RAWCONFIG"
699 cp $ROBUSTROOT/Runtime/RAW/$MAKEFILE ./Makefile
704 cp ../Runtime/RAW/*.c ./
705 cp ../Runtime/RAW/*.h ./
706 cp ../Runtime/RAW/*.S ./
707 cp ../Runtime/RAW/*.s ./
708 cp ../$tmpbuilddirectory/*.c ./
709 cp ../$tmpbuilddirectory/*.h ./
715 TILERADIR="$CURDIR/tilera"
719 MAKEFILE="Makefile.tilera.$TILERACONFIG"
720 SIMHVC="sim.hvc.$TILERACONFIG"
721 PCIHVC="pci.hvc.$TILERACONFIG"
725 then # not only with 1 core
729 elif $TILERAZLINUXFLAG
730 then # TILERAZLINUXFLAG
731 TILERA_INDIR="ZLinux"
732 MAKEFILE="Makefile.tilera.$TILERACONFIG"
739 export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
743 TILERACFLAGS="${TILERACFLAGS} -DTILERA_BME"
744 elif $TILERAZLINUXFLAG
745 then # TILERAZLINUXFLAG
746 TILERACFLAGS="${TILERACFLAGS} -DTILERA_ZLINUX"
751 TILERACFLAGS="${TILERACFLAGS} -DCACHEFLUSH"
756 TILERACFLAGS="${TILERACFLAGS} -DRAWPATH"
761 TILERACFLAGS="${TILERACFLAGS} -DDEBUG"
765 then # profile version
766 TILERACFLAGS="${TILERACFLAGS} -DPROFILE"
769 if $ACCURATEPROFILEFLAG
770 then # accurateprofile version
771 TILERACFLAGS="${TILERACFLAGS} -DACCURATEPROFILE"
776 TILERACFLAGS="${TILERACFLAGS} -DUSEIO"
780 then #INTERRUPT version
781 TILERACFLAGS="${TILERACFLAGS} -DINTERRUPT"
782 fi #INTERRUPT version
785 then #MULTICOREGC version
786 TILERACFLAGS="${TILERACFLAGS} -DMULTICORE_GC -D${GCCORES}"
790 then # GC_PROFILE version
791 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE"
795 then # GC_PROFILE_S version
796 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE_S"
800 then # SMEMLOCAL version
801 TILERACFLAGS="${TILERACFLAGS} -DSMEML"
805 then # SMEMFIXED version
806 TILERACFLAGS="${TILERACFLAGS} -DSMEMF"
810 then # SMEMMIXED version
811 TILERACFLAGS="${TILERACFLAGS} -DSMEMM"
815 then # SMEMGLOBAL version
816 TILERACFLAGS="${TILERACFLAGS} -DSMEMG"
820 then # CACHE_LOCAL version
821 TILERACFLAGS="${TILERACFLAGS} -DCACHE_LOCAL"
825 then # CACHE_RAN version
826 TILERACFLAGS="${TILERACFLAGS} -DCACHE_RAN"
829 if $GCCONTROLLERNEARFLAG
830 then # CONTROLLER_NEAR version
831 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_NEAR"
834 if $GCCONTROLLERREMOTEFLAG
835 then # CONTROLLER_REMOTE version
836 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_REMOTE"
839 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$MAKEFILE ./Makefile
842 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$SIMHVC ./sim.hvc
843 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$PCIHVC ./pci.hvc
844 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc ./bamboo-vmlinux-pci.hvc
846 cp ../Runtime/multicoretask.c ./
847 cp ../Runtime/multicoreruntime.c ./
848 cp ../Runtime/Queue.c ./
849 cp ../Runtime/file.c ./
850 cp ../Runtime/math.c ./
851 cp ../Runtime/object.c ./
852 cp ../Runtime/GenericHashtable.c ./
853 cp ../Runtime/SimpleHash.c ./
854 cp ../Runtime/GCSharedHash.c ./
855 cp ../Runtime/ObjectHash.c ./
856 cp ../Runtime/socket.c ./
857 cp ../Runtime/mem.c ./
858 cp ../Runtime/multicoregarbage.c ./
859 cp ../Runtime/MGCHash.c ./
860 cp ../Runtime/GenericHashtable.h ./
861 cp ../Runtime/mem.h ./
862 cp ../Runtime/multicoreruntime.h ./
863 cp ../Runtime/object.h ./
864 cp ../Runtime/ObjectHash.h ./
865 cp ../Runtime/Queue.h ./
866 cp ../Runtime/runtime.h ./
867 cp ../Runtime/SimpleHash.h ./
868 cp ../Runtime/GCSharedHash.h ./
869 cp ../Runtime/multicoregc.h ./
870 cp ../Runtime/multicoregarbage.h ./
871 cp ../Runtime/multicorehelper.h ./
872 cp ../Runtime/MGCHash.h ./
873 cp ../Tilera/Runtime/*.c ./
874 cp ../Tilera/Runtime/*.h ./
875 cp ../Tilera/Runtime/$TILERA_INDIR/*.c ./
876 cp ../Tilera/Runtime/$TILERA_INDIR/*.h ./
878 then # TILERAZLINUXFLAG
879 cp ../Tilera/Runtime/$TILERA_INDIR/*.S ./
881 cp ../Tilera/lib/* ./
882 cp ../$tmpbuilddirectory/*.c ./
883 cp ../$tmpbuilddirectory/*.h ./
887 else #!RAWFLAG && !TILERABMEFLAG && ! TILERAZLINUXFLAG
890 INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \
895 RUNTIMEFILE="$ROBUSTROOT/Runtime/multicoreruntime.c $ROBUSTROOT/Runtime/multicoretask.c"
897 RUNTIMEFILE="$ROBUSTROOT/Runtime/runtime.c $ROBUSTROOT/Runtime/task.c"
900 FILES="$RUNTIMEFILE \
901 $ROBUSTROOT/Runtime/file.c $ROBUSTROOT/Runtime/Queue.c \
902 $ROBUSTROOT/Runtime/SimpleHash.c $ROBUSTROOT/Runtime/option.c \
903 $ROBUSTROOT/Runtime/ObjectHash.c \
904 $ROBUSTROOT/Runtime/garbage.c $ROBUSTROOT/Runtime/socket.c \
905 $ROBUSTROOT/Runtime/math.c \
906 $ROBUSTROOT/Runtime/GenericHashtable.c $ROBUSTROOT/Runtime/object.c"
910 FILES="$FILES $ROBUSTROOT/Runtime/affinity.c"
915 FILES="$FILES $ROBUSTROOT/Runtime/STM/monitor.c"
920 FILES="$FILES $ROBUSTROOT/Runtime/memcpy32.o $ROBUSTROOT/Runtime/instrset32.o"
927 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRECOVERYRUNTIME"
928 FILES="$FILES $DSMRECOVERYRUNTIME/trans.c $DSMRECOVERYRUNTIME/mcpileq.c $DSMRECOVERYRUNTIME/objstr.c $DSMRECOVERYRUNTIME/dstm.c $DSMRECOVERYRUNTIME/altmlookup.c $DSMRECOVERYRUNTIME/clookup.c $DSMRECOVERYRUNTIME/llookup.c $DSMRECOVERYRUNTIME/tlookup.c $DSMRECOVERYRUNTIME/threadnotify.c $DSMRECOVERYRUNTIME/dstmserver.c $DSMRECOVERYRUNTIME/plookup.c $DSMRECOVERYRUNTIME/ip.c $DSMRECOVERYRUNTIME/queue.c $DSMRECOVERYRUNTIME/altprelookup.c $DSMRECOVERYRUNTIME/machinepile.c $ROBUSTROOT/Runtime/localobjects.c $ROBUSTROOT/Runtime/thread.c $DSMRECOVERYRUNTIME/sockpool.c $DSMRECOVERYRUNTIME/addUdpEnhance.c $DSMRECOVERYRUNTIME/signal.c $DSMRECOVERYRUNTIME/gCollect.c $DSMRECOVERYRUNTIME/addPrefetchEnhance.c $DSMRECOVERYRUNTIME/dsmlock.c $DSMRECOVERYRUNTIME/translist.c $DSMRECOVERYRUNTIME/paxos.c"
930 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRUNTIME"
931 FILES="$FILES $DSMRUNTIME/trans.c $DSMRUNTIME/mcpileq.c $DSMRUNTIME/objstr.c $DSMRUNTIME/dstm.c $DSMRUNTIME/clookup.c $DSMRUNTIME/llookup.c $DSMRUNTIME/threadnotify.c $DSMRUNTIME/dstmserver.c $DSMRUNTIME/plookup.c $DSMRUNTIME/ip.c $DSMRUNTIME/queue.c $DSMRUNTIME/altprelookup.c $DSMRUNTIME/machinepile.c $ROBUSTROOT/Runtime/localobjects.c $ROBUSTROOT/Runtime/thread.c $DSMRUNTIME/sockpool.c $DSMRUNTIME/addUdpEnhance.c $DSMRUNTIME/signal.c $DSMRUNTIME/gCollect.c $DSMRUNTIME/addPrefetchEnhance.c $DSMRUNTIME/dsmlock.c $DSMRUNTIME/prefetch.c $DSMRUNTIME/altmlookup.c"
937 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -I$STMRUNTIME"
938 FILES="$FILES $STMRUNTIME/stmlock.c $STMRUNTIME/stm.c $STMRUNTIME/stmlookup.c $ROBUSTROOT/Runtime/thread.c $STMRUNTIME/stats.c $STMRUNTIME/commit.c $STMRUNTIME/objstr.c"
945 FILES="$FILES $DSMRUNTIME/sandbox.c"
947 FILES="$FILES $STMRUNTIME/sandbox.c"
953 FILES="$FILES $DSMRUNTIME/abortreaders.c"
958 FILES="$FILES $ROBUSTROOT/Runtime/localobjects.c"
963 FILES="$FILES $ROBUSTROOT/Runtime/mlp_runtime.c"
964 FILES="$FILES $ROBUSTROOT/Runtime/psemaphore.c"
965 FILES="$FILES $ROBUSTROOT/Runtime/workschedule.c"
970 EXTRAOPTIONS="$EXTRAOPTIONS -DTASK"
973 EXTRAOPTIONS="$EXTRAOPTIONS -DMULTICORE"
975 FILES="$FILES $tmpbuilddirectory/taskdefs.c $ROBUSTROOT/Runtime/checkpoint.c $ROBUSTROOT/Runtime/chash.c"
978 EXTRAOPTIONS="$EXTRAOPTIONS -DRAW"
980 if $THREADSIMULATEFLAG
982 # -lpthread for pthread functions, -lrt for message queue functions
983 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADSIMULATE -lpthread -lrt"
989 EXTRAOPTIONS="$EXTRAOPTIONS -DOPTIONAL"
990 FILES="$FILES $tmpbuilddirectory/optionalarrays.c"
995 FILES="$FILES $ROBUSTROOT/Runtime/thread.c"
1000 EXTRAOPTIONS="$EXTRAOPTIONS -DCONSCHECK $BUILDDIR/specdir/*.o"
1001 INCLUDES="$INCLUDES -I$BUILDDIR/specdir"
1006 EXTRAOPTIONS="$EXTRAOPTIONS -ldmalloc -DDMALLOC"
1011 gcc -S $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1012 -c $tmpbuilddirectory/methods.c -lm
1017 gcc $INCLUDES $EXTRAOPTIONS \
1018 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin
1020 gcc $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1021 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin