Suggested improved output for codes
When parsing the output of codes the parser has to interpret what was computed and how. For this it might need to know sequences of events, and connected files (for example which input generated which output. Ancillary files make this even more difficult.
Here there are some strategies that a code can adopt to make the automatic association of different files simpler.
- make sure that the main output (stdout?) has something (banner,...) to make it easy to identify that file.
- create an uuid or some similar short unique identifier for the run, this can be also something like program_version+host+date+time if uuid or random generation is difficult (no good random source easily available)
- output this uuid value in the main file and all ancillary files
- if the sequence of calls is important (content of restart files,...) append the uuid to a shared log file
This handles the outputs
For the inputs there are a few options:
- echo input in main file
- echo input in file identified with uuid
- output just a sha of the input, so if it lies around one can identify it (useful if one want to write as little as possible, but might be cumbersome to have working check-sum algorithms in some programs)
We encourage all code developers to follow these things in their code the help figuring out what did happen.
If you have other ideas improvements, please share them.