An open API service indexing awesome lists of open source software.

https://github.com/tactcomplabs/circustent

Memory system characterization benchmarks using atomic operations
https://github.com/tactcomplabs/circustent

atomic benchmark hpc mpi openmp openshmem

Last synced: 4 months ago
JSON representation

Memory system characterization benchmarks using atomic operations

Awesome Lists containing this project

README

          

# CircusTent: Atomic Memory Operation System Benchmarks

[![GitHub license](https://img.shields.io/badge/license-APACHE2-blue.svg)](https://raw.githubusercontent.com/tactcomplabs/circustent/main/LICENSE)

![CircusTent](docs/imgs/circus_tent.png)

## Overview

The CircusTent infrastructure is designed to provide users and architects
the ability to discover the relevant performance of a target system
architecture's memory subsystem using atomic memory operations. Atomic
memory operations have traditionally been considered to be latent or
low performance given the difficulty in their respective implementations.
However, atomic operations are widely utilized across parallel programming
constructs for synchronization primitives and to promote concurrency. However,
prior to the creation of CircusTent, the architecture and programming
model communities had little ability to quantify the performance of
atomics on varying scales of a system architecture.

The CircusTent infrastructure is designed to be a modular benchmark
platform consisting of a frontend and backend infrastructure.
The frontend infrastructure defines the various benchmark types and
standard benchmark algorithms as well as providing the command line
execution interface. The backend provides one or more implementations
of the standard algorithms using various programming models.

## Building From Source

### Prerequisites

The following packages/utilities are required to build CircusTent from source:
* CMake 3.4.3+
* C++ Compiler
* C Compiler

Optional packages include:
* RPM tools to build RPMs
* Debian package tools to build DEBs
* Backend-specific libraries

### Building

The following steps are generic build instructions. You may need to
modify these steps for your target system and compiler.

1. Clone the CircusTent repository
```
git clone https://github.com/tactcomplabs/circustent.git
```
2. Setup your build tree
```
cd circustent
mkdir build
cd build
```
3. Execute CMake to generate the makefiles (where XXX refers to the backend that you want to enable)
```
cmake -DENABLE_XXX=ON -DCT_CFLAGS="..." -DCT_CXXFLAGS="..." -DCT_LINKER_FLAGS="..." ../
```
Note that it will most often be necessary to pass the compiler specific flags needed for your chosen backend
implementation to the CMake infrastructure via the CT_CFLAGS, CT_CXXFLAGS, and CT_LINKER_FLAGS options as shown above.

4. Execute the build
```
make
```
The `circustent` binary will reside in ./src/CircusTent/

5. (Optional) Install the build
```
make install
```

### Build Options
The following are additional build options supported by the CircusTent CMake script
* CC : Utilize the target C compiler
* CXX : Utilize the target C++ compiler
* -DCMAKE\_C\_FLAGS : Set the standard C compiler flags
* -DCMAKE\_CXX\_FLAGS : Set the standard C++ compiler flags
* -DCMAKE\_INSTALL\_PREFIX : installation target (make install)
* -DCIRCUSTENT\_BUILD\_RPM : Builds an RPM package
* -DCIRCUSTENT\_BUILD\_DEB : Builds a DEB package
* -DCIRCUSTENT\_BUILD\_TGZ : Builds a TGZ package
* -DBUILD\_ALL\_TESTING : Builds the test infrastructure (developers only)

## Algorithm Descriptions

The following contains brief descriptions of each candidate algorithm. For each algorithm,
we apply one or more of the following atomics:
* Fetch and Add (ADD)
* Compare and Exchange (CAS)

The algorithmic descriptions below do not specify the size of the data values
implemented. The CircusTent software does not derive bandwidth. However,
we highly suggest that implementors utilize 64-bit values for the source
and index portions of the benchmark.

The following table presents all the core benchmarks and the number of
atomic operations performed for each (which is vital to calculating
accurate GAMs values across platforms).

| Benchmark | Number of AMOs |
| ------ | ------ |
| RAND | 1 |
| STRIDE1 | 1 |
| STRIDEN | 1 |
| PTRCHASE | 1 |
| CENTRAL | 1 |
| SG | 4 |
| SCATTER | 3 |
| GATHER | 3 |

### RAND
Performs a stride-1 atomic update using an index array with randomly generated
indices and a source value array. The index array (IDX) must contain valid indices
within the bounds of the source value array (ARRAY). In most cases, utilizing standard-C
linear congruential methods is sufficient.
```
for( i=0; i