Skip to content

A Python package to manage large numbers of simulations

License

Notifications You must be signed in to change notification settings

ryarza/bookkeeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bookkeeper

A Python package for managing simulations

Example usage

import bookkeeper.flash

# Finds all subdirectories containing a flash.par file
grid = bookkeeper.flash.SimulationGrid("/path/to/simulations")

slurm_command = ["sbatch", "--qos=cpuq", "--account=cpuq",
                 "--partition=cpuq", "/path/to/runfile"]

for sim in grid.incomplete_sims:
    print(f"""Simulation at {sim.path} failed."""
          f""" Reason: {sim.reason_incomplete}""")
    # If the simulation crashed, restart it with a smaller CFL
    if sim.reason_incomplete == 'crashed':
        sim.par["cfl"] = 0.75 * sim.par["cfl"]
    sim.restart()

bookkeeper is released under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

If you use this code please cite Yarza et al. 2023

About

A Python package to manage large numbers of simulations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages