How to use the data prefetching competition kit

Setting Up the Simulation Infrastructure:

1. Subscribe to the prefetching competition mailing list by sending an empty email to dpc-1-subscribe AT yahoogroups.com. You do not need to have a Yahoo email account - you only need to subscribe to the mailing list. When prompted, type in a dummy message to the moderator.

This mailing list will be used for any announcments regarding the competition, any simulation infrastructure updates, and participants may post questions or report problems.

2. Download the prefetching competition kit file from here

3. unpack the prefetching kit:

 	tar -zxvf PREF_KIT.tgz 

cd PREF_KIT

4. Set the variable 'PIN_HOME' in CONFIG/makefile.gnu.config to the 'pin-2.5-22247-gcc.4.0.0-ia32_intel64-linux' in the Prefetcher Kit. When you edit the makefile.gnu.config file, modify the second line to:

	PIN_HOME ?= $PATH_TO_PREF_KIT/PREF_KIT/pin-2.5-22247-gcc.4.0.0-ia32_intel64-linux

5.Edit Makefile.competition and modify the fifth line `default: CMPsimpref32' depending whether you are on a 32-bit (IA-32, i686) or a 64-bit (x86_64) system. To get that configuration, type "uname -a" in Linux.

6. To compile the simulator with the sample prefetcher, make sure you are in the PREF_KIT directory and that your gcc compiler path is set up correctly, then type:

	make

Generating traces to simulate:

To generate a trace for any single-threaded application, do the following (from the PREF_KIT/ directory):

	mkdir traces

cd traces/

../pin/pin -t ../bin/CMPsim.gentrace32 -threads 1 -o [trace file name] -- [app] [app_args]

Note that you will have to modify the command to CMPsim.gentrace64 if you are running on a 64-bit machine.

For example, to generate a trace for the application "/bin/ls" with the arguments "-al":

	../pin/pin -t ../bin/CMPsim.gentrace32 -threads 1 -o ls.out -- /bin/ls -al

This will create three files:

   ls.out.gz        ==> stats file on how many instructions it was able to trace<

ls.out.trace.gz ==> a binary of the trace file collected

ls.out.dep.gz ==> an ASCII representation of the instruction dependency information for out-of-order simulation

To collect traces for a snippet of an application, use the -fwd and -icount options to the pin tool.

   -fwd :   e.g. -fwd 10 will forward 10 million instructions (note: arg is in millions)

-icount : e.g. -icount 10 will trace 10 million instructions of the application

For example, to generate a trace of "ls -al" that fast-forwards for 1 million instructions and traces another 1 million instructions:

	../pin/pin -t ../bin/CMPsim.gentrace32 -threads 1 -o ls.out -fwd 1 -icount 1 -- /bin/ls -al

(Hint: When evaluating the prefetchers, the organizers will use a trace list based, for the most part, on SPEC2006 benchmarks. When generating these traces, you should warm them up for 40 billion instructions and generate a trace for 100 million instructions, i.e., -fwd 40000 -icount 100)

Running the simulator with the sample prefetchter:

To run the simulator on the generated trace, do the following (from the PREF_KIT/ directory):

	mkdir runs

cd runs/

../pin/pin -t ../bin/CMPsim.usetrace -threads 1 -t [trace file name] -- /bin/ls

Note that the purpose for adding the '/bin/ls' at the end is just to complete the pin usage command line syntax. Any valid command can be used.

The trace file name is the name of the trace collected by the CMPsim.gentrace tool. For example,if you wanted to run the ls.out.trace.gz trace generated above, you can run:

	../pin/pin -t ../bin/CMPsim.usetrace -threads 1 -t ../traces/ls.out.trace.gz -o ls.out.stats -- /bin/ls

How to run simulations for the three configurations, with and without prefetching:

Participants in the data prefetching competition will be evaluated based on their results on three main configurations, as specified in the Simulation framework description webpage. Below are the command lines for the three configurations with and without prefetching:

(All commands are executed from the PREF_KIT/runs directory. Note that for actual traces you may need to change the -icount parameter to 100 so that it runs for 100 million instructions)


Last Modified Thu Oct 30 10:36:17 PDT 2008 by Alaa R. Alameldeen