AMP Counter

From Pheet
Jump to: navigation, search

Contents

Interface

Your own counter implementation should adhere to the following interface:

// Replace Classname with the name of your Counter
template <class Pheet, typename TT>
class Classname {
public:
  Classname();
  ~Classname();

  void incr();
  T get_sum();

  static void print_name() {
    // Should also print some relevant configuration parameters if applicable
    std::cout << "Classname"; 
  }
};

Add to count benchmark

Edit the file test/count_bench/CountBench.cpp. Add an include directive to include your newly created counter. Add the following to the run_test method:

// Replace Classname with the class name of your counter
this->run_bench<Pheet,
  Classname>();

Running the benchmark

Switch to the AMP Count benchmark by editing test/settings.h, and setting the macro ACTIVE_TEST to test/test_variants/amp/count.h.

The compiler (default: clang++), include and library paths can be set in the file settings.mk. To compile, enter the following on the command line:

make test
bin/pheet_test

The output of the benchmarks is in a tab-separated text-format, where each line of data is preceded with a line of headers and can be piped into a file. The output can be converted to a better to process format (csv with one row of headers at the beginning of the file) using the perl-script csvheet included with pheet.

Header dependencies are not tracked by the Pheet makefile right now, so if you change your lock implementation you might need to run make clean before being able to compile correctly.

Interpretation of results

Be aware that this is a synthetic benchmark trying to create lots of congestion. Real-world applications typically create less congestion, but similar congestion may occur on bigger machines in the future. The hyperobject benchmark, which you will also see uses a slightly different programming interface, allowing for a more locality aware data-structure. For more information about hyperobjects refer to:

  • Martin Wimmer. Wait-free Hyperobjects for Task-parallel Programming Systems. In 27th IEEE International Parallel and Distributed Processing Symposium (IPDPS), 2013.
Personal tools
Namespaces

Variants
Actions
Navigation
Tools