Developer Guide

  • 2021.1
  • 11/03/2021
  • Public
Contents

Run the Sample

You can run the sample to see how it behaves. In this scenario, the sample runs both workloads (matrix multiplication and 2/pi approximation) and takes measurements. To analyze the measurements, you can use the Measurement Analysis Sample.
To run this example:
  1. From your host system, connect to the target system:
    ssh <user>@<target>
  2. In the SSH session
    , run the sample:
    tcc_multiple_measurements_sample --approximation 10000 --multiplication 100 --iterations 10
    where:
    Option
    Description
    --approximation 10000
    Calculate the 10000th approximation of 2/pi.
    --multiplication 100
    Execute the matrix multiplication workload with matrix size 100.
    --iterations 10
    Execute 10 iterations of the main loop.
Example Output
Running with arguments: approximation = 10000, multiplication = 100, iterations = 10 Running workloads. This may take a while, depending on iteration values. Workloads were run successfully.
The sample outputs the arguments with which it was launched and shows the status for running workloads.
The measurement result is not displayed, because the sample is intended to be used as part of the Monitor Multiple Measurement Instances. Alternatively, the next section provides instructions for obtaining the full measurement log.
Accessing Full Measurement Log
To get access to the full measurement results, enable measurement buffers for the measurement instances as described in Control Data Collection.
Example command:
INTEL_LIBITTNOTIFY64=libtcc_collector.so TCC_MEASUREMENTS_BUFFERS=Approximation:10,Multiplication:10,Cycle:10 TCC_MEASUREMENTS_DUMP_FILE=log.txt TCC_MEASUREMENTS_TIME_UNIT=ns tcc_multiple_measurements_sample --approximation 10000 --multiplication 100 --iterations 10
where:
Environment Variable
Description
INTEL_LIBITTNOTIFY64=libtcc_collector.so
Enable measurement library collector.
TCC_MEASUREMENTS_BUFFERS=Approximation:10,Multiplication:10,Cycle:10
Enable measurement buffers for the
Approximation
,
Multiplication
, and
Cycle
measurement instances to hold 10 measurements (same as the number of
tcc_multiple_measurements_sample
iterations).
TCC_MEASUREMENTS_DUMP_FILE=log.txt
Store measurement buffers in
log.txt
after the program finishes.
TCC_MEASUREMENTS_TIME_UNIT=ns
Use nanoseconds as the time unit for stored measurements.
Example Output
Running with arguments: approximation = 10000, multiplication = 100, iterations = 10 Running workloads. This may take a while, depending on iteration values. Workloads were run successfully.
You can view the full measurement results after the sample finishes execution. Example dump file
log.txt
:
# cat log.txt Cycle: 3364473, 3312614, 3257750, 3245355, 3242705, 3246255, 3253702, 3243363, 3231469, 3229901 Approximation: 137256, 137205, 137217, 137115, 137215, 137203, 137144, 137186, 137182, 137124 Multiplication: 3225525, 3174715, 3119836, 3107700, 3104821, 3108388, 3115980, 3105529, 3093617, 3092151
Where:
  • Cycle – total execution time of the multiplication and approximation workloads and overhead contributed by measuring each of them separately.
  • Multiplication – execution time of the multiplication workload.
  • Approximation – execution time of the approximation workload.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.