Adding a few more files for Load Balancing Simulation
authorYogesh Mehta <ymehta@uiuc.edu>
Thu, 4 Nov 2004 04:30:45 +0000 (04:30 +0000)
committerYogesh Mehta <ymehta@uiuc.edu>
Thu, 4 Nov 2004 04:30:45 +0000 (04:30 +0000)
examples/pose/LBSim/Makefile [new file with mode: 0644]
examples/pose/LBSim/README [new file with mode: 0644]
examples/pose/LBSim/saveplot [new file with mode: 0644]
examples/pose/LBSim/statanly [new file with mode: 0644]
examples/pose/LBSim/statcoll [new file with mode: 0644]

diff --git a/examples/pose/LBSim/Makefile b/examples/pose/LBSim/Makefile
new file mode 100644 (file)
index 0000000..67af7b1
--- /dev/null
@@ -0,0 +1,125 @@
+# NOTE: This is the basic Makefile template that includes the additional
+#       Makefile.simulation makefile that is found in the location of the
+#       current installation of POSE.
+#
+#      The Makefile.simulation set of rules allows the compilation of
+#       a SINGLE simulation module. If multiple simulation modules are
+#      desired, some "surgery" of Makefile.simulation (and this file)
+#      will be required. 
+#
+# ***********************************************************************
+
+OPTS=-O#-DCMK_OPTIMIZE=1 -DCMK_MEMCHECKS_OFF=1
+
+CHARMBASE=../../../
+CHARMBIN=$(CHARMBASE)/bin
+CHARMINC=$(CHARMBASE)/include
+
+CHARMC=$(CHARMBIN)/charmc -I$(CHARMINC)/pose $(OPTS)
+
+# Default Location variables
+# **************************
+#POSE_ROOT=$(HOME)/charm/net-linux/lib
+
+# Default module names
+# - MAKE MODIFICATIONS HERE
+# *************************
+PGM_MODULE=Sched
+PGM=sched
+OTHER=
+LIBS=-Lstdc++ -lm
+
+# Simulation object definitions 
+# *****************************
+SIM_OBJECTS=SchedSIM_sim.o $(PGM).o generate.o edgelist.o
+
+# EXECUTABLE GENERATION RULES 
+# - DO NOT MODIFY
+#****************************
+base:  $(PGM)
+       @echo "Simulation compiled."
+
+pure:   $(PGM).pure
+       @echo "Simulation (w purify) compiled."
+
+proj:   $(PGM).proj
+       @echo "Simulation (w projections log traces) compiled."
+
+summary:    $(PGM).summary
+       @echo "Simulation (w summary log traces) compiled."
+
+$(PGM):        $(SIM_OBJECTS) 
+       $(CHARMC) $(SIM_OBJECTS) $(OTHER) $(LIBS) -o $(PGM) \
+       -module pose -language charm++
+
+$(PGM).alt:    $(SIM_OBJECTS) 
+       $(CHARMC) $(SIM_OBJECTS) $(OTHER) $(LIBS) -o $(PGM).alt \
+       -module pose -language charm++
+
+$(PGM).comm:   $(SIM_OBJECTS) 
+       $(CHARMC) $(SIM_OBJECTS) $(OTHER) $(LIBS) -o $(PGM).comm \
+       -module pose -language charm++ -module commlib
+
+$(PGM).pure:   $(SIM_OBJECTS)
+       $(CHARMC) $(SIM_OBJECTS) $(OTHER) $(LIBS) -o $(PGM).pure \
+       -module pose -language charm++ -purify
+
+$(PGM).proj:   $(SIM_OBJECTS)
+       $(CHARMC) $(SIM_OBJECTS) $(OTHER) $(LIBS) -o $(PGM).proj \
+       -module pose -language charm++ -tracemode projections
+
+$(PGM).summary:        $(SIM_OBJECTS)
+       $(CHARMC) $(SIM_OBJECTS) $(OTHER) $(LIBS) -o $(PGM).summary \
+       -module pose -language charm++ -tracemode summary
+
+# HOUSE-KEEPING RULES
+# - DO NOT MODIFY
+#********************
+
+# clean removes everything
+clean: clear rm_logs ;
+
+# clear removes only binaries and generated files
+clear:
+       rm -f charmrun conv-host *.o
+       rm -f *.def.h *.decl.h
+       rm -f $(PGM) $(PGM).pure $(PGM).proj $(PGM).summary
+       rm -f gmon.out #*#
+       rm -f core *~
+       rm -f TAGS *.headers
+       rm -f *_sim.*
+
+# rm_logs removes projections/summary log traces
+rm_logs:
+       rm -f [^j]*.log *.sum [^j]*.sts
+       rm -f *-bg.*.log *-bg.sts
+
+# SIMULATION COMPILATION RULES
+# - DO NOT MODIFY 
+#*****************************
+$(PGM).o :     $(PGM).C $(PGM).h $(PGM_MODULE).def.h $(PGM_MODULE).decl.h
+       $(CHARMC) -c -I$(CHARMINC) $(INCLUDES) $(LIBS) $(PGM).C
+
+$(PGM_MODULE).def.h $(PGM_MODULE).decl.h : $(PGM).ci
+       $(CHARMC) $(INCLUDES) $(LIBS) $(PGM).ci
+
+topology.o: topology.C
+       $(CHARMC) -c topology.C
+
+SchedSIM_sim.o :       SchedSIM_sim.C SchedSIM_sim.h SchedSIM.def.h SchedSIM.decl.h
+       $(CHARMC) -c $(LIBS) $(INCLUDES) -I$(CHARMINC) SchedSIM_sim.C topology.C -memory paranoid
+
+SchedSIM.def.h SchedSIM.decl.h : SchedSIM_sim.ci
+       $(CHARMC) $(INCLUDES) $(LIBS) SchedSIM_sim.ci
+
+SchedSIM_sim.C SchedSIM_sim.h SchedSIM_sim.ci: SchedSIM.C SchedSIM.h SchedSIM.ci 
+       $(CHARMBIN)/etrans.pl SchedSIM
+
+generate.o: generate.c
+       $(CHARMC) -c generate.c
+
+edgelist.o: edgelist.c
+       $(CHARMC) -c edgelist.c
+
+
+
diff --git a/examples/pose/LBSim/README b/examples/pose/LBSim/README
new file mode 100644 (file)
index 0000000..56306ce
--- /dev/null
@@ -0,0 +1,30 @@
+How to run it
+
+./charmrun sched <maxObjects> <connectivity> <value> <endTime> <topology> > <datafilename>
+
+1.maxObjects : Number of scheduler objects ie no. of processors in the simulation
+
+2.connectivity: Only for the graph topology (TODO: Needs to be made functional)
+
+3.value: Value for which fibonacci is to be calculated
+
+4.endTime: The POSE endTime, the simulation stops when GVT reaches this value.
+
+5.topology: Four topologies supported now: graph, ring, tours2d, torus3d
+
+5.datafilename: The name of file in which the output will be stored. This is done by directing the output to the file by '>'.
+
+Next step would be 
+./statcoll <datafilename> <outputfilename1> <maxObjects> <endTime>
+./statanly <outputfilename1> <outputfilename2> <maxObjects> <endTime>
+
+statcoll parses the data file so as to collect the raw statistics of each processor for each period.
+statanly analyses the outputfile1 to calculate average utilisation per processor per period
+
+Note: endTime here is actual end of simulation i.e. last time entry in the datafile
+
+(TODO: Combine both steps into one (?))
+
+Next <outputfilename2>  should be appropriately entered in the gnuplot script such as plotsim.p 
+
+Then a command "gnuplot plotsim.p" will generate the graphical output.
diff --git a/examples/pose/LBSim/saveplot b/examples/pose/LBSim/saveplot
new file mode 100644 (file)
index 0000000..2540d3e
--- /dev/null
@@ -0,0 +1,9 @@
+  # File name: saveplot - saves a plot as a PostScript file 
+      # to save the current plot as a postscript file issue the commands:
+      #  gnuplot>   set out 'plotfile.ps'
+      #  gnuplot>   load 'saveplot'
+      set size 1.0, 0.8
+      set terminal postscript
+      replot
+      set terminal x11
+      set size 1,1
diff --git a/examples/pose/LBSim/statanly b/examples/pose/LBSim/statanly
new file mode 100644 (file)
index 0000000..3f1a4e7
Binary files /dev/null and b/examples/pose/LBSim/statanly differ
diff --git a/examples/pose/LBSim/statcoll b/examples/pose/LBSim/statcoll
new file mode 100644 (file)
index 0000000..47f0ff9
Binary files /dev/null and b/examples/pose/LBSim/statcoll differ