|
45 | 45 | ./mfc.sh fp-stability --sim-binary PATH --pre-binary PATH |
46 | 46 |
|
47 | 47 | A user case .py is run as a single serial CPU process under Verrou, so it must be |
48 | | -a small, short proxy (a feasibility guard rejects large grids / long runs); output |
49 | | -is forced to serial .dat I/O and the files to diff are auto-detected. |
| 48 | +a small, short proxy (a feasibility guard rejects large grids / long runs; --force |
| 49 | +overrides it, at proportionally long runtimes); output is forced to serial .dat |
| 50 | +I/O and the files to diff are auto-detected. |
50 | 51 | """ |
51 | 52 |
|
52 | 53 | import math |
@@ -564,12 +565,21 @@ def _load_user_case(input_path: str) -> dict: |
564 | 565 | cells = (m + 1) * (n + 1) * (p + 1) |
565 | 566 | t_stop = int(params.get("t_step_stop", 0) or 0) |
566 | 567 | work = cells * max(t_stop, 1) |
567 | | - if cells > FP_CASE_MAX_CELLS: |
568 | | - raise MFCException(f"case has {cells:,} cells - too large for Verrou (~30x slowdown, run many times). " f"Use a coarsened proxy (<= {FP_CASE_MAX_CELLS:,} cells).") |
569 | | - if work > FP_CASE_MAX_WORK: |
570 | | - raise MFCException( |
571 | | - f"case is ~{work:,} cell-steps ({cells:,} cells x {t_stop} time steps) - too slow under " |
572 | | - f"Verrou (~30x, run many times). Reduce m/n/p or t_step_stop (target <= {FP_CASE_MAX_WORK:,} cell-steps)." |
| 568 | + if not ARG("force"): |
| 569 | + if cells > FP_CASE_MAX_CELLS: |
| 570 | + raise MFCException( |
| 571 | + f"case has {cells:,} cells - too large for Verrou (~30x slowdown, run many times). " f"Use a coarsened proxy (<= {FP_CASE_MAX_CELLS:,} cells), or pass --force to run anyway." |
| 572 | + ) |
| 573 | + if work > FP_CASE_MAX_WORK: |
| 574 | + raise MFCException( |
| 575 | + f"case is ~{work:,} cell-steps ({cells:,} cells x {t_stop} time steps) - too slow under " |
| 576 | + f"Verrou (~30x, run many times). Reduce m/n/p or t_step_stop (target <= {FP_CASE_MAX_WORK:,} cell-steps), or pass --force to run anyway." |
| 577 | + ) |
| 578 | + elif cells > FP_CASE_MAX_CELLS or work > FP_CASE_MAX_WORK: |
| 579 | + cons.print( |
| 580 | + f" [bold yellow]--force[/bold yellow]: case is ~{work:,} cell-steps " |
| 581 | + f"(guard is {FP_CASE_MAX_WORK:,}) - expect roughly {work / FP_CASE_MAX_WORK:.0f}x the usual per-run time, " |
| 582 | + "for every enabled pass (trim with -N 1 and --no-* flags)." |
573 | 583 | ) |
574 | 584 | stem = os.path.splitext(os.path.basename(input_path))[0] |
575 | 585 | if stem == "case": # examples/<name>/case.py - the dir name is more telling |
|
0 commit comments