FLAMEGPU / FLAMEGPU2

FLAME GPU 2 is a GPU accelerated agent based modelling framework for CUDA C++ and Python
https://flamegpu.com
MIT License
105 stars 20 forks source link

Output run properties at the end of a simulation #344

Open ptheywood opened 4 years ago

ptheywood commented 4 years ago

Often when using FLAME GPU we want information about the run which may be used for generating figures etc.

I.e. The name of the GPU used, the compute capability, total runtime, runtime of phases of the application, runtime of steps within the applicaiton etc.

Rather than simply outputting these to stdout and letting the user have to parse stdout to extract the important information, it would probably be better to have a flag which enables (or disables) the generation of a file which contains this information. I.e. if --output-stats (or something to that effect) is passed then a json object is output to an assumed file name (or stdout), or a path to a file can be provided (relative to the working directory?).

this would then make it very easy to write a script which loads these objects into say python and generate figures, rather than requiring line-matching.

I.e. it could look something like:

{
    "model_name": "Boids_bruteforce",
    "iterations": 10,
    "executable": "/path/to/exe",
    "input_file": "/path/to/0.xml",
    "output_path": "/path/to/output-dir",
    "performance": {
        "total_runtime": 10.2,
        "init_functions": 0.1,
        "agent_functions": 9.0,
        "step_functions": 1.0,
        "exit_functions": 0.2
    },
    "...": ""
}

It may be worth including intial environment parameters in the file as run identifiers (i.e. seed) in case there is no input file, or a way of providing an identifier for the run.

Robadob commented 4 years ago

This is a good idea, currently we only have xml io, I think JSON is on the todo list.

On Mon, 6 Jul 2020 at 10:54, Peter Heywood notifications@github.com wrote:

Often when using FLAME GPU we want information about the run which may be used for generating figures etc.

I.e. The name of the GPU used, the compute capability, total runtime, runtime of phases of the application, runtime of steps within the applicaiton etc.

Rather than simply outputting these to stdout and letting the user have to parse stdout to extract the important information, it would probably be better to have a flag which enables (or disables) the generation of a file which contains this information. I.e. if --output-stats (or something to that effect) is passed then a json object is output to an assumed file name (or stdout), or a path to a file can be provided (relative to the working directory?).

this would then make it very easy to write a script which loads these objects into say python and generate figures, rather than requiring line-matching.

I.e. it could look something like:

{ "model_name": "Boids_bruteforce", "iterations": 10, "executable": "/path/to/exe", "input_file": "/path/to/0.xml", "output_path": "/path/to/output-dir", "performance": { "total_runtime": 10.2, "init_functions": 0.1, "agent_functions": 9.0, "step_functions": 1.0, "exit_functions": 0.2 }, "...": "" }

It may be worth including intial environment parameters in the file as run identifiers (i.e. seed) in case there is no input file, or a way of providing an identifier for the run.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/FLAMEGPU/FLAMEGPU2_dev/issues/344, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVGCRLKZBRSMXJKMPSFV3R2GNNTANCNFSM4OROAFVA .