Skip to content

Running KHARMA

Ben Prather edited this page Nov 17, 2021 · 16 revisions

To run a particular problem with KHARMA, write:

$ ./kharma.host -i pars/orszag_tang.par

KHARMA benefits from certain runtime environment variables controlling CPU pinning and occupancy, which I've attempted to include in the short wrapper run.sh. The interpretation of these variables can differ between compilers and machines, YMMV.

KHARMA takes no compile-time options, so all the parameters for a simulation are provided by a single input "deck." Sample input files corresponding to standard tests and astrophysical systems are included in pars/. Note that the convention is to end a parameter filename with .par.

KHARMA will attempt to guess many parameters if they are not specified, e.g. boundary conditions and coordinate sizes for simulations in spherical polar coordinates, or interior boundary locations for black hole simulations based on keeping 5 zones inside the event horizon. Most of the core inferences are done in the function FixParameters in kharma.cpp, and most default values are specified in the Initialize functions of their respective packages, e.g. in grmhd/grmhd.cpp.

Clone this wiki locally