Hi Ayaz,
thanks for your quick response.
Yeah, argparse is one possibility. But it is cumbersome and bugprone to
implement a new option for every single configuration parameter I want
to vary. Also, I would need a way not only to parse the options, but
also to generate the gem5 command with the parameters on-the-fly. As far
as I know, argparse does not provide this functionality.
So another option that I thought of is to serialize my custom
configuration class, pass it to gem5, and deserialize it again in the
gem5 configuration script.
Best
Derek
Am 14.06.23 um 09:21 schrieb Ayaz Akram via gem5-users:
Hi Derek,
I am not sure if I have understood your question correctly, but the
gem5 interface is basically a Python run script in which you can add
parameters as well (that can be set from the command line or in shell
scripts). For example, you can look at the following link to see how
`argparse` is used for this purpose:
https://www.gem5.org/documentation/learning_gem5/part1/cache_config/
-Ayaz
On Tue, Jun 13, 2023 at 11:32 PM Derek Christ via gem5-users
<gem5-users@gem5.org> wrote:
Hello,
maybe I have missed something in the official docs, but I'm not
sure how
to run multiple simulations with different parameters concurrently to
speed up the process.
What I have done is I created a Python script that sets environment
variables and then kicks-off gem5 which in turn runs another Python
script that reads those environment variables to configure the
simulation.
But I'm sure there has to be a better way?
I think it might be easier if it would be possible to run gem5 purely
with Python (without the gem5 executable) because then it would be
easy
to pass custom parameters to the gem5 configuration.
Is there something that I missed?
Thanks
Best
Derek
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
_______________________________________________
gem5-users mailing list --gem5-users@gem5.org
To unsubscribe send an email togem5-users-le...@gem5.org
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org