
Input hash of one LANDIS-II replicate
landis_input_hash.RdA digest of what a replicate was run from: the MD5 of every dependency file (keyed by path), the
base seed, the replicate index and the scenario file name. tar_landis() writes it to
<rep>/log/input_hash.json after a run and compares it before the next, via
landis_rep_is_current().
Arguments
- dep_files
Character. The dependency files staged into the replicate.
- base_seed
Integer. The base random seed.
- rep_index
Integer. The replicate index.
- scenario_file
Character(1). The scenario file name.
- collation
NULL(the default) for byte order. Otherwise anLC_COLLATElocale to sort in, which reproduces the hash landisutils 0.0.149 and earlier wrote in that locale;""means the locale the process's environment selects, as when R started.
Details
Paths are ordered by bytes (sort(method = "radix")), so the hash does not depend on the
collation locale of the R process computing it. R collates with ICU in UTF-8 locales and by bytes
under C/POSIX; a locale-sorted hash differs between a worker started with and without LANG.
R also collates by bytes, whatever Sys.setlocale() says, while the environment variable
LC_ALL (or, when that is unset, LC_COLLATE) is C. For a named collation the sort therefore
runs with LC_ALL unset and LC_COLLATE set to collation, as in a process started in that
locale, and both are restored afterwards.