mpyshrun
Wrap a command similar to the runApplication function provided by the OpenFOAM
Foundation software. This tool executes a command and logs its output to a
file, adding appropriate success (END) or error messages (FOAM_FATAL_ERROR)
at the end. It mimics the behavior of RunFunctions from OpenFOAM Foundation
software, making it useful for managing simulation workflows.
Usage
mpyshrun [options] [--] command [args ...]
Examples
Basic Command Wrapping
mpyshrun blockMesh
This creates a log file named log.blockMesh with the output.
Overwrite an existing log file
mpyshrun snappyHexMesh -overwrite
This will overwrite an existing log.snappyHexMesh.
Custom Log File Names
Add prefix to distinguish multiple runs:
mpyshrun --prefix mylog decomposePar
This creates a log file named mylog.decomposePar with the output.