Hello Elliot Moss,
a shared Python file with parameter settings sounds useful.
What I meant with running gem5 without the gem5 executable was to use
the compiled library directly from the Python configuration script.
From what I have seen, the gem5 executable sets up some internal state
and then directly calls the embedded Python interpreter to launch the
user-provided script.
But as I see it there is no technical reason why it shouldn't be
possible to call this setup routine directly from Python. This would
reduce the complexity to only one single Python script.
Best
Derek
Am 14.06.23 um 14:38 schrieb Eliot Moss via gem5-users:
On 6/14/2023 2:32 AM, Derek Christ via gem5-users 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
I use scripts that setup environment variables, command line
parameters, and a python
file with python parameter settings. The latter is placed in a
directory unique to
the run.
It happens that my scripts are shell scripts, but with varying degrees
of pain, other
scripting languages, or even hard coding in C or something, would
work. I just use
what I am skilled with.
You *must* have the gem4 executable, however. The bulk of the
simulation is run with
that (optimizing compiled) C++ code. It implements the actual modules
as well as the
event driven simulation part. Python is used mostly for configuring
the simulation
before the event loop is kicked off. If the simulator were written
entirely in python
it would be much slower.
HTH - Eliot Moss
_______________________________________________
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 to gem5-users-le...@gem5.org