|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "$id": "https://github.com/hpc-io/h5bench/schemas/h5bench-config.schema.json", |
| 4 | + "title": "h5bench configuration", |
| 5 | + "description": "Validates the JSON file passed to the h5bench Python driver. Pattern benchmarks (write/read/append/overwrite/write-unlimited/write_var_normal_dist) are strictly typed because the driver translates their keys into argv for the binary; exerciser/metadata/amrex/openpmd/e3sm/macsio carry an opaque configuration object because their binaries parse the keys themselves.", |
| 6 | + "type": "object", |
| 7 | + "required": ["mpi", "vol", "file-system", "directory", "benchmarks"], |
| 8 | + "additionalProperties": true, |
| 9 | + "properties": { |
| 10 | + "mpi": { "$ref": "#/$defs/mpiSection" }, |
| 11 | + "vol": { "$ref": "#/$defs/volSection" }, |
| 12 | + "file-system": { "$ref": "#/$defs/fileSystemSection" }, |
| 13 | + "directory": { |
| 14 | + "type": "string", |
| 15 | + "minLength": 1, |
| 16 | + "description": "Output directory for benchmark artifacts (created if missing)." |
| 17 | + }, |
| 18 | + "benchmarks": { |
| 19 | + "type": "array", |
| 20 | + "minItems": 1, |
| 21 | + "items": { "$ref": "#/$defs/benchmarkEntry" } |
| 22 | + } |
| 23 | + }, |
| 24 | + "$defs": { |
| 25 | + "mpiSection": { |
| 26 | + "type": "object", |
| 27 | + "required": ["command"], |
| 28 | + "additionalProperties": false, |
| 29 | + "properties": { |
| 30 | + "command": { |
| 31 | + "type": "string", |
| 32 | + "enum": ["mpirun", "mpiexec", "srun", "jsrun", "runjob"], |
| 33 | + "description": "MPI launcher binary. The driver wires up -np / -n for mpirun/mpiexec/srun automatically when 'configuration' is absent." |
| 34 | + }, |
| 35 | + "ranks": { |
| 36 | + "type": "string", |
| 37 | + "pattern": "^\\d+$", |
| 38 | + "description": "Rank count as a numeric string. Used only when 'configuration' is absent." |
| 39 | + }, |
| 40 | + "configuration": { |
| 41 | + "type": "string", |
| 42 | + "description": "Raw extra arguments appended verbatim after the launcher command. When set, overrides the implicit -np <ranks> wiring." |
| 43 | + } |
| 44 | + } |
| 45 | + }, |
| 46 | + "volSection": { |
| 47 | + "type": "object", |
| 48 | + "additionalProperties": false, |
| 49 | + "properties": { |
| 50 | + "library": { |
| 51 | + "type": "string", |
| 52 | + "description": "Colon-separated list of directories prepended to LD_LIBRARY_PATH (and DYLD_LIBRARY_PATH) for the run." |
| 53 | + }, |
| 54 | + "preload": { |
| 55 | + "type": "string", |
| 56 | + "description": "Colon-separated list of shared objects prepended to LD_PRELOAD." |
| 57 | + }, |
| 58 | + "path": { |
| 59 | + "type": "string", |
| 60 | + "description": "Directory exported as HDF5_PLUGIN_PATH so HDF5 finds VOL connectors." |
| 61 | + }, |
| 62 | + "connector": { |
| 63 | + "type": "string", |
| 64 | + "description": "Value for HDF5_VOL_CONNECTOR, e.g. 'async under_vol=0;under_info={}'." |
| 65 | + } |
| 66 | + } |
| 67 | + }, |
| 68 | + "fileSystemSection": { |
| 69 | + "type": "object", |
| 70 | + "additionalProperties": false, |
| 71 | + "properties": { |
| 72 | + "lustre": { |
| 73 | + "type": "object", |
| 74 | + "additionalProperties": false, |
| 75 | + "properties": { |
| 76 | + "stripe-size": { "type": ["string", "integer"] }, |
| 77 | + "stripe-count": { "type": ["string", "integer"] } |
| 78 | + } |
| 79 | + } |
| 80 | + } |
| 81 | + }, |
| 82 | + |
| 83 | + "benchmarkEntry": { |
| 84 | + "type": "object", |
| 85 | + "required": ["benchmark"], |
| 86 | + "properties": { |
| 87 | + "benchmark": { |
| 88 | + "type": "string", |
| 89 | + "enum": [ |
| 90 | + "write", |
| 91 | + "write-unlimited", |
| 92 | + "overwrite", |
| 93 | + "append", |
| 94 | + "read", |
| 95 | + "write_var_normal_dist", |
| 96 | + "exerciser", |
| 97 | + "metadata", |
| 98 | + "amrex", |
| 99 | + "openpmd", |
| 100 | + "e3sm", |
| 101 | + "macsio" |
| 102 | + ] |
| 103 | + }, |
| 104 | + "file": { |
| 105 | + "type": "string", |
| 106 | + "description": "Output filename relative to the top-level 'directory'." |
| 107 | + }, |
| 108 | + "configuration": { "type": "object" } |
| 109 | + }, |
| 110 | + "oneOf": [ |
| 111 | + { "$ref": "#/$defs/patternBenchmark" }, |
| 112 | + { "$ref": "#/$defs/exerciserBenchmark" }, |
| 113 | + { "$ref": "#/$defs/metadataBenchmark" }, |
| 114 | + { "$ref": "#/$defs/opaqueBenchmark" } |
| 115 | + ] |
| 116 | + }, |
| 117 | + |
| 118 | + "patternBenchmark": { |
| 119 | + "description": "write / write-unlimited / overwrite / append / read / write_var_normal_dist — the driver translates the configuration keys into argv for the h5bench_<pattern> binary, so each key is strictly typed.", |
| 120 | + "type": "object", |
| 121 | + "properties": { |
| 122 | + "benchmark": { |
| 123 | + "enum": [ |
| 124 | + "write", |
| 125 | + "write-unlimited", |
| 126 | + "overwrite", |
| 127 | + "append", |
| 128 | + "read", |
| 129 | + "write_var_normal_dist" |
| 130 | + ] |
| 131 | + }, |
| 132 | + "file": { "type": "string" }, |
| 133 | + "configuration": { "$ref": "#/$defs/patternConfiguration" } |
| 134 | + }, |
| 135 | + "required": ["benchmark", "file", "configuration"], |
| 136 | + "additionalProperties": false |
| 137 | + }, |
| 138 | + |
| 139 | + "patternConfiguration": { |
| 140 | + "type": "object", |
| 141 | + "additionalProperties": false, |
| 142 | + "properties": { |
| 143 | + "MEM_PATTERN": { "enum": ["CONTIG", "INTERLEAVED", "STRIDED"] }, |
| 144 | + "FILE_PATTERN": { "enum": ["CONTIG", "INTERLEAVED", "STRIDED"] }, |
| 145 | + "MODE": { "enum": ["SYNC", "ASYNC", "LOG"] }, |
| 146 | + "READ_OPTION": { "enum": ["FULL", "PARTIAL", "STRIDED", "LDC", "RDC", "CS", "PRL"] }, |
| 147 | + "COLLECTIVE_DATA": { "enum": ["YES", "NO"] }, |
| 148 | + "COLLECTIVE_METADATA": { "enum": ["YES", "NO"] }, |
| 149 | + "COMPRESS": { "enum": ["YES", "NO"] }, |
| 150 | + "ALIGN": { "enum": ["YES", "NO"] }, |
| 151 | + |
| 152 | + "NUM_DIMS": { "$ref": "#/$defs/dimCount" }, |
| 153 | + "DIM_1": { "$ref": "#/$defs/numericString" }, |
| 154 | + "DIM_2": { "$ref": "#/$defs/numericString" }, |
| 155 | + "DIM_3": { "$ref": "#/$defs/numericString" }, |
| 156 | + "CHUNK_DIM_1": { "$ref": "#/$defs/numericString" }, |
| 157 | + "CHUNK_DIM_2": { "$ref": "#/$defs/numericString" }, |
| 158 | + "CHUNK_DIM_3": { "$ref": "#/$defs/numericString" }, |
| 159 | + "STDEV_DIM_1": { "$ref": "#/$defs/numericString" }, |
| 160 | + |
| 161 | + "TIMESTEPS": { "$ref": "#/$defs/numericString" }, |
| 162 | + "DELAYED_CLOSE_TIMESTEPS": { "$ref": "#/$defs/numericString" }, |
| 163 | + |
| 164 | + "STRIDE_SIZE": { "$ref": "#/$defs/numericString" }, |
| 165 | + "STRIDE_SIZE_2": { "$ref": "#/$defs/numericString" }, |
| 166 | + "STRIDE_SIZE_3": { "$ref": "#/$defs/numericString" }, |
| 167 | + "BLOCK_SIZE": { "$ref": "#/$defs/numericString" }, |
| 168 | + "BLOCK_SIZE_2": { "$ref": "#/$defs/numericString" }, |
| 169 | + "BLOCK_SIZE_3": { "$ref": "#/$defs/numericString" }, |
| 170 | + "BLOCK_CNT": { "$ref": "#/$defs/numericString" }, |
| 171 | + |
| 172 | + "ALIGN_LEN": { "$ref": "#/$defs/numericString" }, |
| 173 | + "ALIGN_THRESHOLD": { "$ref": "#/$defs/numericString" }, |
| 174 | + |
| 175 | + "NUM_PARTICLES": { |
| 176 | + "type": "string", |
| 177 | + "pattern": "^\\d+(\\s+(K|M|G|T)s?)?$", |
| 178 | + "description": "Accepts either a plain integer ('1024') or the K/M/G/T suffix form h5bench parses ('1024 Ks')." |
| 179 | + }, |
| 180 | + |
| 181 | + "EMULATED_COMPUTE_TIME_PER_TIMESTEP": { |
| 182 | + "type": "string", |
| 183 | + "pattern": "^\\d+\\s+(min|sec|s|ms|us)$", |
| 184 | + "description": "<value> <unit>. Unit ∈ {min, sec, s, ms, us}; '0 s' is valid for fast tests." |
| 185 | + }, |
| 186 | + |
| 187 | + "CSV_FILE": { "type": "string" } |
| 188 | + } |
| 189 | + }, |
| 190 | + |
| 191 | + "dimCount": { |
| 192 | + "type": "string", |
| 193 | + "enum": ["1", "2", "3"], |
| 194 | + "description": "Number of dataset dimensions; 1, 2, or 3." |
| 195 | + }, |
| 196 | + |
| 197 | + "numericString": { |
| 198 | + "type": "string", |
| 199 | + "pattern": "^\\d+$", |
| 200 | + "description": "h5bench config historically uses string-quoted integers, e.g. \"1024\"." |
| 201 | + }, |
| 202 | + |
| 203 | + "exerciserBenchmark": { |
| 204 | + "description": "h5bench_exerciser receives its configuration as argv flags; the driver passes them through verbatim.", |
| 205 | + "type": "object", |
| 206 | + "properties": { |
| 207 | + "benchmark": { "const": "exerciser" }, |
| 208 | + "configuration": { "type": "object" } |
| 209 | + }, |
| 210 | + "required": ["benchmark"], |
| 211 | + "additionalProperties": false |
| 212 | + }, |
| 213 | + |
| 214 | + "metadataBenchmark": { |
| 215 | + "description": "h5bench_hdf5_iotest writes its own ini-style config; the driver passes a 'file' name and the configuration block.", |
| 216 | + "type": "object", |
| 217 | + "properties": { |
| 218 | + "benchmark": { "const": "metadata" }, |
| 219 | + "file": { "type": "string" }, |
| 220 | + "configuration": { "type": "object" } |
| 221 | + }, |
| 222 | + "required": ["benchmark", "configuration"], |
| 223 | + "additionalProperties": false |
| 224 | + }, |
| 225 | + |
| 226 | + "opaqueBenchmark": { |
| 227 | + "description": "amrex / openpmd / e3sm / macsio — externally-owned benchmark binaries that parse their own configuration; the schema does not introspect their keys.", |
| 228 | + "type": "object", |
| 229 | + "properties": { |
| 230 | + "benchmark": { "enum": ["amrex", "openpmd", "e3sm", "macsio"] }, |
| 231 | + "file": { "type": "string" }, |
| 232 | + "configuration": { "type": "object" } |
| 233 | + }, |
| 234 | + "required": ["benchmark", "configuration"], |
| 235 | + "additionalProperties": false |
| 236 | + } |
| 237 | + } |
| 238 | +} |
0 commit comments