Hi, I'm generating simpoint checkpoints of spec benchmarks by running the programs through with the atomic CPU. One of them was interrupted in the middle and so I want to restore from the last generated checkpoint and continue generating the rest of the checkpoints from there, rather than starting from scratch. I have a couple questions about this process:
Will the simpoint values (the intervals/nuumber of instructions into the program) still be valid when restoring from a checkpoint, or will I need to adjust them? I.e., will gem5 interpret simpoint intervals relative to the instruction count the checkpoint was taken at, or from 0? If the latter, I'll need to readjust the simpoint values relative to the instruction count the checkpoint starts at (so if I checkpointed at 100 intervals and , I need to subtract 100 from all further simpoint values).
Second, how do I prevent gem5 from exiting simulation after a set number of instructions when restoring from a simpoint checkpoint? I want to run the entire program (or, up to the last simpoint), but currently Gem5 will only execute a certain number of instructions and then stop. I'm currently trying to restore the checkpoint not as a simpoint checkpoint, but a regular checkpoint, so will this work to keep the simulation running the entire length?
If anyone can answer either of these it would be a big help, thanks!
Hi,
The intervals/number of instructions into the program will not be valid
because the starting point changed. The instruction counts from 0 when
restoring the checkpoint, so the distance from the start to the simpoint
changed because, originally, the simulation was starting from the beginning
of the program, but now it starts from a point of the execution. So, you
are right, you will need to adjust the values relative to the instruction
count to when the checkpoint was taken. The subtraction looks about right
to me.
As long as there isn't an exit event scheduled, gem5 shouldn't exit the
simulation before running the entire length when you restore a checkpoint.
On Mon, Apr 15, 2024 at 8:59 AM muke101 via gem5-users gem5-users@gem5.org
wrote:
Hi, I'm generating simpoint checkpoints of spec benchmarks by running the
programs through with the atomic CPU. One of them was interrupted in the
middle and so I want to restore from the last generated checkpoint and
continue generating the rest of the checkpoints from there, rather than
starting from scratch. I have a couple questions about this process:
Will the simpoint values (the intervals/nuumber of instructions into the
program) still be valid when restoring from a checkpoint, or will I need to
adjust them? I.e., will gem5 interpret simpoint intervals relative to the
instruction count the checkpoint was taken at, or from 0? If the latter,
I'll need to readjust the simpoint values relative to the instruction count
the checkpoint starts at (so if I checkpointed at 100 intervals and , I
need to subtract 100 from all further simpoint values).
Second, how do I prevent gem5 from exiting simulation after a set number
of instructions when restoring from a simpoint checkpoint? I want to run
the entire program (or, up to the last simpoint), but currently Gem5 will
only execute a certain number of instructions and then stop. I'm currently
trying to restore the checkpoint not as a simpoint checkpoint, but a
regular checkpoint, so will this work to keep the simulation running the
entire length?
If anyone can answer either of these it would be a big help, thanks!
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org
Thanks for confirming number 1 for me. As the simpoint checkpoints restore before the interval index to allow for warmup, the adjusted intervals end up being floats. I've adjusted Simulation.py to account for this when parsing the simpoint file, but I hope there's nothing under the hood that this messes with.
As for 2, I was running into my benchmarks finishing simulation before getting through all remaining simpoints, so I had assumed this is what was happening, as when you restore simpoint checkpoints normally (say with the O3 CPU) surely Gem5 don't simulate the entire program from that point onwards. I'm trying again treating the checkpoints as generic instead of simpoints so I'll find out if this works if they're still running in a couple days I guess!
-------- Original Message --------
On 15 Apr 2024, 17:56, Zhantong Qiu via gem5-users wrote:
Hi,
The intervals/number of instructions into the program will not be valid because the starting point changed. The instruction counts from 0 when restoring the checkpoint, so the distance from the start to the simpoint changed because, originally, the simulation was starting from the beginning of the program, but now it starts from a point of the execution. So, you are right, you will need to adjust the values relative to the instruction count to when the checkpoint was taken. The subtraction looks about right to me.
As long as there isn't an exit event scheduled, gem5 shouldn't exit the simulation before running the entire length when you restore a checkpoint.
On Mon, Apr 15, 2024 at 8:59 AM muke101 via gem5-users gem5-users@gem5.org wrote:
Hi, I'm generating simpoint checkpoints of spec benchmarks by running the programs through with the atomic CPU. One of them was interrupted in the middle and so I want to restore from the last generated checkpoint and continue generating the rest of the checkpoints from there, rather than starting from scratch. I have a couple questions about this process:
Will the simpoint values (the intervals/nuumber of instructions into the program) still be valid when restoring from a checkpoint, or will I need to adjust them? I.e., will gem5 interpret simpoint intervals relative to the instruction count the checkpoint was taken at, or from 0? If the latter, I'll need to readjust the simpoint values relative to the instruction count the checkpoint starts at (so if I checkpointed at 100 intervals and , I need to subtract 100 from all further simpoint values).
Second, how do I prevent gem5 from exiting simulation after a set number of instructions when restoring from a simpoint checkpoint? I want to run the entire program (or, up to the last simpoint), but currently Gem5 will only execute a certain number of instructions and then stop. I'm currently trying to restore the checkpoint not as a simpoint checkpoint, but a regular checkpoint, so will this work to keep the simulation running the entire length?
If anyone can answer either of these it would be a big help, thanks!
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org