Skip to content

Getting Started

Farzana Ahmed Siddique edited this page Sep 25, 2024 · 6 revisions

This guide will help you set up your environment, install necessary dependencies, and run your first benchmark using our tool.


Table of Contents

  1. System Requirements
  2. Installation
  3. Running
  4. Support

1. System Requirements

Before you begin, ensure that your system meets the following requirements:

Supported Operating Systems

  • Ubuntu 22.04 or newer

Essential Dependencies

  • g++ version 11.0 or newer
  • glibc version 2.34 or newer

Optional Dependencies (Required only for running benchmarks)

  • Python 3
  • CUDA Toolkit version 11.8 or newer

Note: The PIMeval simulator itself does not require Python or CUDA compatibility. These dependencies are only necessary if you intend to run the benchmarks.

Important: The repository has not been tested on Windows or macOS. While you can attempt to run it on these systems, compatibility is not guaranteed. Please report any issues you encounter.


2. Installation

Follow these steps to set up PIMeval-PIMbench on your system.

Install Dependencies

Ensure that all essential dependencies are installed on your system.

  1. Update Package Lists:

    sudo apt update
  2. Install Python 3 and pip (Optional, required for benchmarks):

    sudo apt install python3 python3-pip

    Verify the installation:

    python3 --version
  3. Install g++:

    sudo apt install <g++>

    Verify the installation:

    g++ --version
  4. Install glibc:

    glibc is typically installed by default on Ubuntu systems. To verify:

    ldd --version

    Ensure that the version is 2.34 or newer.

  5. Install CUDA Toolkit (Optional, required for benchmarks):

    Follow the official CUDA Toolkit installation guide for detailed instructions.

    Verify the installation:

    nvcc --version

Clone the Repository

Clone the repository to your local machine:

git clone https://github.com/UVA-LavaLab/PIMeval-PIMbench.git
cd PIMeval-PIMbench

3. Running

Once the installation is complete, you can start using the simulator and running benchmarks. This section provides detailed instructions on how to build PIMeval and PIMbench, as well as how to execute the benchmarks.

Building PIMeval & PIMbench Together

To build both PIMeval and PIMbench simultaneously, follow these steps:

  1. Navigate to the Root Directory:

    cd PIMeval-PIMbench/
  2. Build the Project:

    Replace <n_proc> with the number of processor cores you want to utilize for the build process (e.g., 4).

    make -j<n_proc>

    Example:

    make -j4

    Tip: Using the -j flag with make allows parallel compilation, significantly speeding up the build process on multi-core systems.

Building PIMeval

If you prefer to build PIMeval independently, follow these steps:

  1. Navigate to the PIMeval Directory:

    cd PIMeval-PIMbench/libpimeval/
  2. Build PIMeval:

    Replace <n_proc> with the desired number of processor cores.

    make -j<n_proc>

    Example:

    make -j4

Building PIMbench

Before building PIMbench, ensure that PIMeval has been successfully built, as PIMbench depends on it.

Building All PIM Benchmarks

To build all available benchmarks within PIMbench:

cd PIMeval-PIMbench/PIMbench
make -j<n_proc>

Building a Specific PIM Benchmark

If you want to focus on a particular benchmark, building it individually is recommended. This approach is useful for testing or experimenting with specific benchmarks without compiling the entire suite.

cd PIMeval-PIMbench/PIMbench/<benchmark_directory>
make -j<n_proc>

Replace <benchmark_directory> with the name of the benchmark you wish to build.

cd PIMeval-PIMbench/PIMbench/axpy
make -j4

Building CPU/GPU Versions of Each PIMbench

To build CPU or GPU baseline versions of a specific benchmark, follow these steps:

  1. Navigate to the Baseline Directory:

    Replace <benchmark_directory> with the benchmark name and <CPU/GPU> with the desired baseline.

    cd PIMeval-PIMbench/PIMbench/<benchmark_directory>/baselines/<CPU|GPU>

    Example (CPU):

    cd PIMeval-PIMbench/PIMbench/axpy/baselines/CPU

    Example (GPU):

    cd PIMeval-PIMbench/PIMbench/axpy/baselines/GPU
  2. Build the Baseline Version:

    Replace <n_proc> with the number of processor cores.

    make -j<n_proc>

    Example:

    make -j4

Running the Simulator and Benchmarks

After successfully building PIMeval and PIMbench, you can proceed to run the simulator and execute benchmarks. Depending on the benchmark's configuration and your specific needs, you might have different scripts or executables to run. Refer to each benchmark's README for detailed instructions.

Note: Ensure that any required environment variables or configurations are set before running the benchmarks.

Cleaning Up Builds

If you need to clean up build artifacts or perform a fresh build, you can use the make clean command within the respective directories.

Example: Cleaning a Specific Benchmark

cd PIMeval-PIMbench/PIMbench/<benchmark_directory>
make clean

4. Support

If you need further assistance, feel free to reach out through the following channels:


Happy PIMming!