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
./dep start-docker --worm --mounting-folder /path/to/Checkpoints
# inside the container
cd QPoints
./setup.sh
# inside the container
cd /path/to/Checkpoints
If you have not already created a checkpoint library, please first create one using the instructions here.
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:
--qflex-ckp-dir : folder with qflex checkpoints saved. You should find snapshot_N.* files in this folder.--gem5-ckp-dir : folder where you want to save the files created for gem5 checkpoints--core: the number of cores used in the VM that is used for creating the checkpoint library