|
Peano
|
Merge the partial patch files of a Peano simulation. More...
Functions | |
| merge_partial_files (partial_files, merged_file_path) | |
| Merge the patches of several patch files into one file. | |
| read_meta_file (path_to_metafile, start, end) | |
| count_total_snapshot_number (path_to_metafile) | |
Variables | |
| parser | |
| dest | |
| help | |
| required | |
| type | |
| default | |
| args = parser.parse_args() | |
| total_snapshot_number = count_total_snapshot_number(args.metafile) | |
| start_snapshot = args.start | |
| tuple | end_snapshot |
Merge the partial patch files of a Peano simulation.
A parallel run writes one patch file per spacetree (and rank) and snapshot. The script merges the files of each snapshot into one file, and writes a new meta file merged_meta_file.peano-patch-file next to the original one which links to the merged files. It handles files with ASCII and with binary quantities. Call it with
python3 -m tarch.plotter.api.merge --meta-file solution-Euler.peano-patch-file
| tarch.plotter.api.merge.count_total_snapshot_number | ( | path_to_metafile | ) |
| tarch.plotter.api.merge.merge_partial_files | ( | partial_files, | |
| merged_file_path | |||
| ) |
Merge the patches of several patch files into one file.
The files are processed as bytes. A file with format Binary holds raw doubles between its text lines, and we copy those verbatim. The header of the merged file is the header of the first partial file, i.e. all partial files have to have the same format. Everything from the first "begin patch" in a file on is a patch, and everything before it is the header: A header holds text only, so the first occurrence is the right one, even in a binary file.
| partial_files | [str] Files to merge. Their patches end up in the merged file in this order. |
| merged_file_path | str File to write. |
Definition at line 22 of file merge.py.
Referenced by tarch.plotter.api.merge.read_meta_file().

| tarch.plotter.api.merge.read_meta_file | ( | path_to_metafile, | |
| start, | |||
| end | |||
| ) |
Definition at line 64 of file merge.py.
References tarch.plotter.api.merge.merge_partial_files().

| int tarch.plotter.api.merge.end_snapshot |
| tarch.plotter.api.merge.parser |
| tarch.plotter.api.merge.total_snapshot_number = count_total_snapshot_number(args.metafile) |