Question: In this lab you will use the Performance API (PAPI) to study the performance of the matrix multiplication of two matrices B and C of

In this lab you will use the Performance API (PAPI) to study the performance of the matrix multiplication of two matrices B and C of type double.

A = B * C

A, B and C are all M x M matrices, where M = 1024.

Write the program and add calls to PAPI to collect data such as floating point operations (PAPI_FP_OPS) and data cache misses (PAPI_L1_DCM).

The PAPI installation is at /opt/sw/papi.

Look at the attached makefile for the changes to the FLAGS and LD_FLAGS arguments.

The program will NOT use OMP. In other words, you will not parallelize matrix multiplication. You will just collect statistics and contents of some counters. Hopefully you can collect statistics on data cache misses. Next you modify the algorithm so you do are not optimizing the cache behavior and run the program again. Collect the statistics one more time compare the statistics from both the runs. Write a report explaining the differences in the statistics, if any, and the reasons for the differences.

In this lab you will use the Performance API (PAPI) to study

makefile_papiC.dms CC = gcc LDC = gcc LD_FLAGS-/opt/sw/papi/lib/libpapi.a FLAGS -I/opt/sw/papi/include PROGC = .cx RM- /bin/rm #all rule all: $(PROGC) $(PROGC): $(OBJSc) $(LDC) (0BJS) $.cx RM- /bin/rm #all rule all: $(PROGC) $(PROGC): $(OBJSc) $(LDC) (0BJS) $

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!