-
Notifications
You must be signed in to change notification settings - Fork 137
121 lines (105 loc) · 4.1 KB
/
fp-stability.yml
File metadata and controls
121 lines (105 loc) · 4.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: FP Stability
# Runs the Verrou-based floating-point stability suite.
#
# What it tests (./mfc.sh fp-stability):
# sod_standard 1-D standard Sod, p_L/p_R=10, ideal gas (well-conditioned baseline)
# 25 cells, 5 steps, WENO5 + HLLC
# Threshold 1e-13 — should always pass
#
# sod_strong 1-D Sod shock, p_L/p_R=100,000, ideal gas
# 50 cells, 10 steps, WENO5 + HLLC
# Threshold 1e-10
# Probes: HLLC xi-factor cancellation near sonic contact
# (s_L - vel_L)/(s_L - s_S) when s_L ≈ s_S
#
# water_stiffened 1-D water shock, stiffened EOS (pi_inf=4046)
# 50 cells, 10 steps, WENO5 + HLLC
# Threshold 1e-8 (loosened; tightens to 1e-10 once Etilde scheme merges)
# Probes: pressure-recovery cancellation p=(E-pi_inf)/gamma
# loses ~4 decimal digits when pi_inf/p_right ~ 40,000
#
# For each case: 1 nearest-rounding reference run + N random-rounding runs.
# PASS if max L∞ deviation across all N samples stays below threshold.
# On FAIL: verrou_dd_sym runs to identify the responsible function symbols.
# Logs are uploaded as CI artifacts.
#
# Verrou (Valgrind 3.26.0 + edf-hpc/verrou@a58d434) is built once and cached.
# Build takes ~20 min uncached; cached runs restore in ~30 s.
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
jobs:
file-changes:
name: Detect File Changes
runs-on: ubuntu-latest
outputs:
checkall: ${{ steps.changes.outputs.checkall }}
steps:
- name: Clone
uses: actions/checkout@v4
- name: Detect Changes
uses: dorny/paths-filter@v3
id: changes
with:
filters: ".github/file-filter.yml"
fp-stability:
name: Floating-Point Stability (Verrou)
runs-on: ubuntu-latest
needs: [file-changes]
if: >-
!cancelled() &&
needs.file-changes.result == 'success' &&
(needs.file-changes.outputs.checkall == 'true' || github.event_name == 'workflow_dispatch')
steps:
- name: Clone
uses: actions/checkout@v4
- name: Cache Verrou
id: cache-verrou
uses: actions/cache@v4
with:
path: ~/.local/verrou
key: verrou-a58d434-valgrind-3.26.0-${{ runner.os }}
- name: Install system dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y \
build-essential automake python3 python3-numpy libc6-dbg \
cmake gfortran
- name: Build Verrou
if: steps.cache-verrou.outputs.cache-hit != 'true'
run: |
cd /tmp
wget -q https://sourceware.org/pub/valgrind/valgrind-3.26.0.tar.bz2
tar xf valgrind-3.26.0.tar.bz2
git clone https://github.com/edf-hpc/verrou.git
git -C verrou checkout a58d434
# Merge Verrou into Valgrind source tree and patch
cp -r verrou valgrind-3.26.0/verrou
cd valgrind-3.26.0
cat verrou/valgrind.*diff | patch -p1
./autogen.sh
./configure --enable-only64bit --prefix="$HOME/.local/verrou"
make -j"$(nproc)"
make install
- name: Verify Verrou
run: ~/.local/verrou/bin/valgrind --version
- name: Build MFC (debug, serial)
# FFLAGS=-fno-inline prevents gfortran from inlining small functions into
# their callers. Without it, DWARF debug info attributes inlined ops to
# the caller's line (often a do-loop header), making Verrou dd_line point
# to loop boundaries instead of the actual arithmetic.
env:
FFLAGS: "-fno-inline"
run: ./mfc.sh build -t pre_process simulation --no-mpi --debug -j"$(nproc)"
- name: Run FP Stability Suite
run: ./mfc.sh fp-stability -N 5
- name: Upload FP stability logs
if: always()
uses: actions/upload-artifact@v4
with:
name: fp-stability-logs
path: fp-stability-logs/
if-no-files-found: ignore