Repository navigation
Conversation
| for name, idx in self.candidates.items(): | ||
| try: | ||
| self.alt.setdefault(name, []).append(int(float(parts[idx]))) | ||
| except (IndexError, ValueError): |
| m = pattern.match(line) | ||
| if m: | ||
| value = m.group(1).split("%")[0].strip() | ||
| except OSError: |
| if os.path.exists(hist_file): | ||
| try: | ||
| os.replace(hist_file, hist_file + ".prev") | ||
| except OSError: |
Contributor
Author
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Proposed Changes
Adds
SU2_LIVE, a terminal counterpart toSU2_MON(#2988). It follows the history file while SU2 runs, plots the residuals with braille characters, and classifies the run as converging (with a rate and an estimate of the iterations and time left), stalled, frozen, in a limit cycle or diverging.It uses only the Python standard library, so it works over SSH, on cluster login nodes and in containers without a display or PyQt5/matplotlib. This came out of the Show and tell discussion #2879.
Details:
bgs[...][zone]) work without configuration.CConfig::GetHistory_FileNameandCMultizoneOutput:CONV_FILENAMEor the config name for multizone, the restart iteration for unsteady restarts, and.csvor.datfromTABULAR_FORMAT.VARIABLES = "..."header.Inner_Iteris not monotonic (unsteady runs, or multizone runs where it stays at 0), the x axis switches toTime_Iter,Outer_Iteror the row number.CONV_RESIDUAL_MINVAL, and can be overridden with--target.-Fuses the full screen.Files:
bin/SU2_LIVE: the tool, a single executable script, installed tobinfromSU2_PY/meson.buildlikeSU2_MON.SU2_PY/tests/test_live.py: unit tests (classification, CSV/Tecplot/multizone parsing, incremental reads, history file naming), run in the existing Python Tests workflow. No dependencies needed.Related Work
#2988 (SU2_MON), discussion #2879.
PR Checklist
pre-commit run --allto format old commits.Testing
python3 SU2_PY/tests/test_live.py: 31 tests pass on Python 3.11 and 3.14.euler/channel/inv_channel_RK.cfgwithTABULAR_FORMAT= TECPLOT, 4 rankshistory.dat,converging -1.51 dec/1kcoupled_cht/comp_2d(multizone CHT), 4 rankscht_2d_3cylinders.csv, plotsRho[0]...T[3],converginglimit cycle, oscillating +/-0.19 about -3.82converging -22.1 dec/1k