Fork of tools directory for nek5000 to include additional genrun
tool.
genrun.py automates the generation of nek input files and executables through a templated user file and json dictonary of parameters by:
- Populating template.box, template.rea, and template.SIZE with contents of user-specified dictionary
- Populating user specified .usr file with contents of user-specified dictionary
- Calling genbox to generate an
.rea
,.re2
input pair - Calling genmap to generate a
.map
file - Calling makenek to produce an executable
genrun.py also supports building NekBox using a similar workflow:
- Populates
template.rea
andtemplate.size_mod
with conntents of user-specififed dictionary - Populating user specified
.usr
file with contents of user-specified dictionary - Writes the one-line
.map
file - Calls makenek to produce an executable
To start using genrun.py, copy the default.json directory and edit appropriately. You can optionally add variables to the usr file with the pattern {NAME} and the inclusion of "NAME" : val
in the json dictionary.
./genrun.py -d RTI.json -u RTI_f90.tusr Rayleigh_Taylor_run0
./genrun.py -d RTI.json -u RTI_f90.tusr --makenek=/path/to/src/nek/ Rayleigh_Taylor_run1
./genrun.py -d RTI.json -u RTI_f90.tusr --override={"num_steps": 128, "io_step": 16} Rayleigh_Taylor_run2
usage: genrun.py [-h] [-d CONFIG] [-u USR] [-n NP] [-l] [--map]
[--makenek MAKENEK] [--clean] [--tdir TDIR] [--no-make]
[--override OVERRIDE]
name
Generate NEK inputs
positional arguments:
name Name to assign to generated system
optional arguments:
-h, --help show this help message and exit
-d CONFIG, --dict CONFIG
Dictionary of parametesr (JSON)
-u USR, --usr USR *.usr file to use for build
-n NP, --nproc NP Number of processes to target
-l, --legacy Legacy Nek5000 support (instead of NekBox)
--map Make a map file. genmap if legacy, internal otherwise.
--makenek MAKENEK Path to makenek
--clean Clean before making
--tdir TDIR Directory to build in
--no-make Don't run makenek
--override OVERRIDE JSON overrides