@@ -14,8 +14,8 @@ This guide covers debugging tools, common issues, and troubleshooting workflows
1414| ` -vv ` | build, run, test | Full compiler/cmake output |
1515| ` -vvv ` | build | Add cmake dependency debugging |
1616| ` -d ` | all | Write debug log to file |
17- | ` --debug ` | build | Full debug: all runtime checks, ` -O0 ` |
18- | ` --reldebug ` | build | Lightweight debug: bounds+pointer checks, ` -Og ` /` -O1 ` |
17+ | ` --debug ` | build | Full debug: all runtime checks, minimal optimization |
18+ | ` --reldebug ` | build | Lightweight debug: key runtime checks, ` -Og ` /` -O1 ` |
1919| ` --gcov ` | build | Build with code coverage |
2020| ` --no-gpu ` | build | Disable GPU to isolate issues |
2121| ` --no-mpi ` | build | Disable MPI to isolate issues |
@@ -136,20 +136,21 @@ MFC has two debug build modes:
136136```
137137
138138Sets ` CMAKE_BUILD_TYPE=Debug ` . Enables all runtime checks (` -fcheck=all ` on gfortran,
139- ` -C ` on NVHPC, ` -K trap=fp ` on Cray, ` -check all ` on Intel), disables optimization
140- (` -O0 ` ), and adds debug symbols. Catches the widest range of bugs but runs ~ 5x slower
141- than Release.
139+ ` -C ` on NVHPC, ` -K trap=fp ` on Cray, ` -check all ` on Intel), minimizes optimization
140+ (` -O0 ` or ` -Og ` ), and adds debug symbols. Catches the widest range of bugs but runs
141+ ~ 5x slower than Release.
142142
143143** RelDebug** (` --reldebug ` ) — lightweight debug used by CI:
144144
145145``` bash
146146./mfc.sh build --reldebug
147147```
148148
149- Sets ` CMAKE_BUILD_TYPE=RelDebug ` . Keeps the most valuable runtime checks (bounds,
150- pointer, FP traps) and compile-time warnings, but uses ` -Og ` /` -O1 ` instead of ` -O0 `
151- and drops the expensive ` do ` , ` mem ` , and ` recursion ` checks. Runs ~ 2x faster than
152- full Debug while catching most real bugs.
149+ Sets ` CMAKE_BUILD_TYPE=RelDebug ` . Keeps key runtime checks (compiler-dependent: bounds
150+ and/or pointer checking, FP traps) and compile-time warnings, but uses ` -Og ` /` -O1 `
151+ and drops expensive checks like ` do ` , ` mem ` , and ` recursion ` . Runs ~ 2x faster than
152+ full Debug while catching most real bugs. See the table below for exact flags per
153+ compiler.
153154
154155| Compiler | Full Debug (` --debug ` ) | RelDebug (` --reldebug ` ) |
155156| ----------| ----------------------| ------------------------|
0 commit comments