Verification and Validation Using Code Based Sensitivity Techniques

Verification and Validation Using Code. Based Sensitivity Techniques The LACSI Code-Based Sensitivity Project Mike Fagan Rice University Dept. of Computational and Applied Mathematics http: //lacsi. rice. edu/review/slides/Fagan_LACSI_review. ppt

The Problem • • Development of computer models of physical phenomena requires a “reality” check. If the computer model output matches the real data, then all is well If the model output does not match, then ? ? ? — Underlying mathematics/physics is inadequate to capture the salient features of the phenomena under study. VALIDATION problem. — Program implementing the model is incorrect. VERIFICATION problem Together, referred to as V&V (alternative spelling Vn. V)

V&V Techniques • Validation • Verification — Obtain “best” fit with (some portion of) the data — Evaluate if “best” is good enough — Evaluate tuned simulation on other data, see if fit is adequate — Best fits may be obtained with Newton’s Method — For now, this means testing. — If simulation model is a differential equation, then Method of Manufactured Solutions (MMS) — Roundoff error estimation: run-time error bounds (Wilkinson)

A Common Subproblem • • Newton’s method compute derivatives MMS compute derivatives Runtime error bounds compute derivatives Some additional uses of derivatives — (optimal) design — Taylor series techniques for DEs — Newton-Krylov iterations

Research Overview • • • Purpose : Efficiently, accurately, and with minimal human intervention compute sensitivities of computer codes. “Sensitivity” means ( calculus ) derivative Accomplish this through Automatic Differentiation (AD) 3 Ways to Compute Derivatives: Finite Differences Hand Coding 1. 2. 3. Finite Differences Hand Coding Automatic Differentiation

State of the Art in AD • Fortran 77 • Fortran 90 • C, C++ — Adifor 3. 0 – First to use compiler technology – 1995 Wilkinson prize to Adifor 2 – Price/Distribution model fits well — TAF (TAMC), TAPENADE — Adifor 3. 0, TAF, TAPENADE all support a little — ADIC, ADOL-C, FADBAD

Roadmap • • • AD research Software Engineering and Construction Sample Validation

AD Research • Areas of inquiry — Memory usage for adjoint methods — Improved derivative methods for simple assignment statements — Techniques for advanced language features – Array slices, structured data – Pointers, dynamic memory allocation – Operator overloading — Multiple data representations – Association-by-name or Association-by-address — Activity Analysis for advanced programming languages — AD for MPI programs

Software Engineering and Development • Develop a framework for multi-language AD. • Develop a Fortran 90 AD tool (with Unit Tests) — Component Model: separating language knowledge from differentiation. — Leverage other work (Open 64) — 80 Unit tests, all pass — Ubiksolve, a component of the Truchas system – Good Truchas Surrogate (Brian Lally) – Linear solvers, so differentiation is easy to check – 50% run and verified

AD and V & V at Los Alamos • Rudy Henninger: • Ralph Nelson: — Mesa 1 D, 2 D anti-armor codes — Caravana lagrangian test code (hydro methods from FLAG code) — Truchas 1 d (metal casting code) — TRAC (reactor safety code)

Detonation Shock Dynamics (DSD) Curvature Equation How could one tune these 6 parameters? ?

DSD - better fit of 6 parameters - SNL DAKOTA package drives the optimization process - Gradients provided by AD of DSD solver - ~40 passes improves the fit

Laboratory Interactions • • Visit summer 2001 -- Gave a talk Visit summer 2002 -- visit w Rudy to work on explosion code SIAM Session on Validation of Metal Flow Simulations, talk on verification of DEs LACSI Symposium session on Verification and Validation talk on verification of DEs • Visit summer 2003 -- gave a talk • Methods conference 2004 • Truchas conference 2004, talk on Adifor 90 • 6 Registered Adifor users at LANL T-10, T-11, EES-5, XMH, CCS-2, X 5

Runtime Error Analysis • • Doug Kothe indicated at the LACSI Priorities and Strategies meeting in 2004 that the V&V groups at LANL are concerned about roundoff error Can get estimated linearized forward error analysis by computing For each statement executed in the program. Approximate dx by machine epsilon * x
- Slides: 14