01.12.2012 Views

Architecture of Computing Systems (Lecture Notes in Computer ...

Architecture of Computing Systems (Lecture Notes in Computer ...

Architecture of Computing Systems (Lecture Notes in Computer ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Compiler-Directed Performance Model Construction 193<br />

3.2 MA Library<br />

At run-time the executable, <strong>in</strong>strumented by the GCC-PME passes, calls the MA<br />

library (which is similar regard<strong>in</strong>g the API and the use <strong>of</strong> PAPI performance counters<br />

to the one developed at the Oak Ridge National Laboratory [4]). The library<br />

serves two major purposes. First, event traces for the post-process<strong>in</strong>g tools are generated.<br />

This <strong>in</strong>cludes call<strong>in</strong>g the PAPI library, that starts, resets, reads, and stops<br />

hardware event counters. Second, it writes the annotated parts <strong>in</strong>to a file. In order<br />

to enable the user to complement the compiler annotated source with manual annotations,<br />

all basic functions come with wrapper functions. These wrapper functions<br />

are necessary s<strong>in</strong>ce FORTRAN and C follow different call<strong>in</strong>g conventions.<br />

3.3 Post-process<strong>in</strong>g Tools<br />

The post-process<strong>in</strong>g tools evaluate the data provided by the run time library.<br />

First, trace files generated by the library have to be prepared. F<strong>in</strong>ally, MATLAB<br />

is used to visualize the data and to construct an analytical model.<br />

Validation. The validate tool prepares the data obta<strong>in</strong>ed from the MA library.<br />

A trace file, hold<strong>in</strong>g the compiler assumed values from the start calls, is merged<br />

with a file conta<strong>in</strong><strong>in</strong>g performance counter values from the end calls. Match<strong>in</strong>g<br />

these pairs <strong>of</strong> calls is simplified by the nam<strong>in</strong>g scheme. The outcome <strong>of</strong> the<br />

match<strong>in</strong>g and aggregation process, is written to a file and serves as <strong>in</strong>put for the<br />

model construction and visualization us<strong>in</strong>g MATLAB.<br />

Model construction. A MATLAB program visualizes the data derived from the<br />

post-process<strong>in</strong>g tool validate and creates an analytical model. The analytical<br />

model enables to predict runs with larger <strong>in</strong>put classes. Float<strong>in</strong>g po<strong>in</strong>t, <strong>in</strong>teger<br />

or load/store operations are displayed <strong>in</strong> terms <strong>of</strong> predicted and measured values.<br />

This section presents the construction <strong>of</strong> the performance model us<strong>in</strong>g the<br />

method <strong>of</strong> quadratic programm<strong>in</strong>g. The <strong>in</strong>tention is to run a small number <strong>of</strong><br />

program <strong>in</strong>stances with different <strong>in</strong>put data sets and measure the desired values.<br />

Afterwards the quadratic programm<strong>in</strong>g method is used to <strong>in</strong>corporate the values<br />

<strong>in</strong>to a model capable <strong>of</strong> predict<strong>in</strong>g unknown program runs with larger data sets.<br />

Both, model construction as well as the prediction, rely on the knowledge <strong>of</strong><br />

the program <strong>in</strong>put parameters. The model bases on the predicted and measured<br />

values for float<strong>in</strong>g po<strong>in</strong>t, load/store or <strong>in</strong>teger operations and the <strong>in</strong>put parameters<br />

<strong>of</strong> the benchmark. S<strong>in</strong>ce the construction does not depend on the type <strong>of</strong><br />

<strong>in</strong>formation measured, we will refer to the values simply as p for predicted and<br />

m for measured. The <strong>in</strong>dex i for pi and mi represents the different <strong>in</strong>put classes.<br />

The separate program phases are analyzed one at a time. This aims at a f<strong>in</strong>e<br />

gra<strong>in</strong>ed modell<strong>in</strong>g <strong>of</strong> the phases, correlat<strong>in</strong>g the predicted and measured values.<br />

The annotated program parts are evaluated with different parameters. Hence,<br />

the overall prediction is more accurate. The follow<strong>in</strong>g mathematical equations<br />

outl<strong>in</strong>e the problem transformation for one measured program phase. Program<br />

parameters are represented as nj with nj ∈{1,...,m}. r is the number <strong>of</strong> different<br />

<strong>in</strong>put parameter sets with m parameters each. Hence, there are r potentially

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!