1. Clone the QFlex repository.
git clone [git@github.com](<mailto:git@github.com>):parsa-epfl/qflex.git
cd qflex
git checkout gem5_ckp_conversion
git submodule update --init --recursive
  1. Start the QFlex container. If you have already created a checkpoint library, mount it.
./dep start-docker --worm --mounting-folder /path/to/Checkpoints
  1. Setup the QPoints submodule.
# inside the container
cd QPoints
./setup.sh
  1. Make sure you have access to the checkpoints in the container.
# inside the container
cd /path/to/Checkpoints
  1. If you have not already created a checkpoint library, please first create one using the instructions here.

  2. To convert a qflex checkpoint to one can be simulated by gem5, use the run_all.sh script. It requires several parameters set to work as intended.

> ./run_all.sh -h
Usage: run_all.sh --qflex-ckp-dir DIR --gem5-ckp-dir DIR --cores N --mem MB \\
  --base IMAGE --snapshot NAME [--ssh-host HOST] [--ssh-user USER] \\
  [--monitor-base PORT] [--qmp-base PORT] [--ssh-base PORT]

Example:
  run_all.sh --qflex-ckp-dir qflex_checkpoints --gem5-ckp-dir gem5_checkpoints \\
    --cores 4 --mem 16384 --base web_search.qcow2 --snapshot snapshot_0
  run_all.sh --qflex-ckp-dir qflex_checkpoints --gem5-ckp-dir gem5_checkpoints \\
    --cores 4 --mem 16384 --base web_search.qcow2 --snapshot snapshot_0 \\
    --ssh-host 127.0.0.1 --ssh-user ubuntu --monitor-base 45454 --qmp-base 4444 \\
    --ssh-base 2222

Here is the explanation of the parameters: