University of Wisconsin Computer Sciences Header Map (repeated with 
textual links if page includes departmental footer) Useful Resources Research at UW-Madison CS Dept UW-Madison CS Undergraduate Program UW-Madison CS Graduate Program UW-Madison CS People Useful Information Current Seminars in the CS Department Search Our Site UW-Madison CS Computer Systems Laboratory UW-Madison Computer Sciences Department Home Page UW-Madison Home Page

CS/ECE 757: Advanced Computer Architecture II
Spring 2001 Section 1 of 1
Instructor Mark D. Hill and T. A. Shiliang Hu

Homework #2

Due: Wednesday, March 7, 2001
You should do this assignment alone. No late assignments.



Simulation is one of the most important research and development methods in computer architecture. In this assignment, you are provided with an opportunity to explore with SimICS, a system level simulator from Virtutech . The goal of this assignment is to give you a chance to feel how simulation works, how to use a typical simulator. Have fun and good luck!


Assignment:

Run simics on tux machines to simulate execution of the Barnes-Hut benchmark on a simulated 16-processor UltraSPARC2 multiprocessor system. Run the simulation with following input files: input-4K-16 (takes about 4 min), input-4K-8, input-4K-1 (about 25 min), input-1K-16, input-1K-8, input-1K-1 (about 5 min), input-512-16, input-512-8 and input-512-1 (less than 3 min). The first number of the input file name stands for the number of bodies that will be simulated by the Barnes program while the second number of the input file name stands for the number of processors that will take part in the computation.

(A) For each simulated execution, record the total number of instructions executed, the percentage of instructions executed in kernel mode, the total number of memory read and write operations, and the maximum number of execution cycles among the multiple processors that took part in the computation. Represent these statistics numbers neatly in a table.

(B) Draw figures to show the trends from 1 processor to 8, 16 processor configurations for the above statistics. For comparison purpose, draw the trends for 512, 1K and 4K configuration for the same statistics, e.g. the maximum cycles, in the same graph. What trends do you find?


Handin and grading Criteria:

Handin your hardcopy of the results you get in class on March 7th. Your work will be graded based on how well you can use the simulator that is demonstrated by your results.


Hints:

To start with Simics, you should first read documents about simics in the following directory:

/p/hill/classes/cs757/simics/doc 

Also read the README.barnes in:
/mnt/splash2/codes/apps/barnes 
in the simulated multiprocessor machine to learn what Barnes-Hut bench is and what parameters it needs to simulate the n-body problem. We have some README files in the working directory that guide you what you can do there.

Note: Simulations for multiprocessor are time-consuming tasks, you need patience in doing this assignment, feel free to figure out ways to work efficiently with the simulation. A 4K-body, 1-processor simulation could take about 30 minutes, even simple commands could take seconds to finish.

To start with Simics, we provide a step-by-step list below for your reference:

1. Login onto one of the TUX machine, almost the fastest instructional machines available here, and type:

cd /p/hill/classes/cs757/simics/home/barnes

2. Read the README file to see what you can do in this directory. As the first line in README says, you need to setup the environment variable VTECH_LICENSE_FILE before you can use SimICS. Type:

setenv VTECH_LICENSE_FILE /p/multifacet/projects/simics/dist10/v9-sol7-gcc/sys/flexlm/license.dat

3. Type

./simics -echo -x barnes.simics 
to start the simics simulation. You should alos see a new window, which is the console for the simulated machine, appears.
To get the number of cycles, type:
@SIM_cpu_issue_cycles(SIM_proc_no_2_ptr(0)) 
in the SimICS environment.

4. After the simulator comes up, you can issue commands to do your simulation work. In this case, we started a configuration specialized for the Barnes-Hut benchmark from the SPLASH2 suite. Type 'c' or 'run' to let the virtual machine you are simulating continue.

5. Now you have started a simulated 16-processor sparc-solaris machine and you are also in the right directory for Barnes, you are ready to do some real simulations, for example, type:

./BARNES.pthreads.solaris.spin_always.break < input-512-16;  /usr/local/magic_call break  
in the console for the target(simulated) machine will simulate 512 bodies with 16 virtual processors that are being simulated.

6. Please figure out how to get interesting statistics of your simulated execution, e.g. the number of cycles each processor runs for this workload, the number of instructions, memory operations, etc. The more interesting statistics you get, the better you can use this tool.


Related Links: