ogstools.logparser.log_parser module#
- ogstools.logparser.log_parser.parallel_log_used(file_name)[source]#
Counts the number of MPI processes started by OpenGeoSys-6 by detecting specific log entries in a given file.
- ogstools.logparser.log_parser.read_mpi_processes(file_name)[source]#
Reads the number of MPI processes started by OpenGeoSys-6 from the log file.
- ogstools.logparser.log_parser.normalize_regex(ogs_res, parallel_log=False)[source]#
Takes regex patterns for serial computation and modify them for parallel Parallel log lines are prepended with the process id, e.g. [0] or [1]
- Return type:
- ogstools.logparser.log_parser.parse_line(patterns, line, parallel_log, number_of_lines_read)[source]#
- Return type:
Log|Termination|None
- ogstools.logparser.log_parser.parse_file(file_name, maximum_lines=None)[source]#
Parses a log file from OGS, applying regex patterns to extract specific information,
The function supports processing files in serial or parallel mode. In parallel mode, a specific regex is used to match log entries from different processes.
- Parameters:
- Return type:
- Returns:
A list of extracted records based on the applied regex patterns. The exact type and structure of these records depend on the regex patterns and their associated processing functions.