Skip to content

mars-research/DRAMHiT

Repository files navigation

DRAMHiT

Build and Test

Build

Download the source

git clone git@github.com:mars-research/DRAMHiT.git --recursive

Install dependencies

Optional 1(recommended): Nix shell.

If Nix is not installed, install Nix.

curl -L https://nixos.org/nix/install | sh

Use nix shell.

nix-shell

All the dependencies should be available in the nix shell now.

Option 2: Manual installation.

sudo apt install libnuma-dev libboost-program-options-dev cmake libabsl-dev libcapstone-dev

Setup the machine

Option 1(recommended): Express setup

  • Apply constant frequency, enable hugepages, and disable hardware prefetching.
./scripts/setup.sh

Option 2: Maunal setup

  • Set all cpus to run at a constant frequency
./scripts/constant_freq.sh
  • Enable hugepages (both 2MiB and 1GiB)
./scripts/enable_hugepages.sh
  • Disable hardware prefetching
./scripts/prefetch_control.sh off
  • (Optional)Enable/disable hyperthreading
./scripts/toggle_hyperthreading.sh

Build

  • Setup build directory
cmake -S . -B build 
  • Build
cmake --build build/

Configure build with ccmake (optional)

On command line, install and start ccmake

sudo apt install cmake-curses-gui
ccmake PATH_TO_CMAKE

Run

sudo ./build/dramhit

Test

Run all tests.

ctest --test-dir=build

Run individual test binary. For example, the hashmap test:

./build/unittests/hashmap_test