1 / 21

Measurements of Version 3.0 (Beta) RELAP5-3D

Measurements of Version 3.0 (Beta) RELAP5-3D. RELAP5-3D International Users Seminar 2010. Sep 20-23, 2010. [insert optional photo(s) here]. Outline. Static Measures Improvements to the 3D capability in RELAP5-3D Dynamic Measures. Static and Dynamic Measures. Dynamic Measures

annona
Télécharger la présentation

Measurements of Version 3.0 (Beta) RELAP5-3D

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Measurements of Version 3.0 (Beta) RELAP5-3D RELAP5-3D International Users Seminar 2010 Sep 20-23, 2010 [insert optional photo(s) here]

  2. Outline • Static Measures • Improvements to the 3D capability in RELAP5-3D • Dynamic Measures

  3. Static and Dynamic Measures • Dynamic Measures • Metrics that are obtained when the code is run • Coverage analysis, profiling, run speed, etc • Static measures • Metrics that apply to the code when it is not running • Code structure, features, user problems, etc.

  4. Feature Comparison 2.4 and Beta (3.0) • Downgrades

  5. Feature Comparison 2.4 and Beta (3.0) • Upgrades • * These are reported in another presentation

  6. Feature Comparison 2.4 and Beta (3.0) • Upgrades

  7. Spaghetti Code to Structured Code • Spaghetti Code is code that is hard to read because • Tangled (interwoven) logic paths. Symptom: go-to’s and line labels • Knots (backward jumps). Symptom: backward go to. • Obscure coding (multiple-return, assign-stmt, computed go to, etc.) • Lacks consistent indentation and other helpful programming style • Spaghetti code is considered bad practice • Prone to experience errors, • Cause of errors are difficult to locate

  8. Improvement: Restructured Code • Computer Science solution – Apply structured programming • Commercial restructuring package applied (between 2.4 and 3.0) • Workaround for pre-compiler directives was created • Restructurer actions • Eliminate go-to statements • Pull sections of code together • Enforce consistent style • Eliminate dead code w/in subroutines

  9. Static Measure: Readability measures • Reduction of GOTO statements • Lines of code: 249400 (2.4.1.2), 278100 (3.0.0) • Source code files: 554 (2.4.1.2), 630 (3.0.0) 05-GA

  10. Static Measure: Line Label Reduction 05-GA

  11. Static Measure (Spaghetti) – McCabe Index • McCabe Cyclomatic index = industry-standard, code-complexity measure. • Number of independent linear paths through code • Indicates the number of branches within it. • Higher indices => more branches => harder to maintain. • Cyclomatic index of 100 or less is generally considered low complexity and good programming • Only input processing subroutines have 100+ index

  12. Static Measures: Nesting and Documentation • Nesting is containment of one programming structure (loop, select, or sequence) within another • Nesting level is the number of such structures containing a block of code • Less nesting is generally easier read and maintain • Internal documentation (comments) improves readability • Documentation was added. Guidelines were applied.

  13. Static Measure: User Problems Solved

  14. Dynamic Measure: Coverage Analysis • Betacode is much more heavily tested • Beta code’s test suite covers a much higher percentage of files and statements • Reduces the likelihood of error

  15. Improvements to 3D Capability of RELAP5-3D • Viscosity terms for Cartesian and Cylindrical Coordinates, SI • Beta Version 3.0.0: Liquid momentum equations, 2009 • Version 3.0.1: Gas momentum equations, 2010 • Version 3.0.1: Simple turbulence term, 2010 • Would like more grid cells for good turbulence modeling • Want more 3D volumes for many modeling purposes • Version 2.4 had many 3D restrictions • Could receive message:“Too many parallel connections” • E.G. Code stops with that message on a 6x6x6 region. • 2400 junctions upper limit • 999 volumes upper limit

  16. Improvements to 3D of RELAP5-3D (cont.) • Eliminated 3D Limits in Beta and post-Beta • Beta Version 3.0.0: “Parallel connections” overcome by allocation • Version 3.0.1: 2400 junction limit overcome by allocating • Version 3.0.1: 999 (artificial) volume limit removed • Up to 9x99x99 volumes possible • Enough for many modeling needs • Version 2.4 solvers too limited for these large regions • Ver. 2.4 Original default solver, MA-18, too slow • PGMRES is faster but had its own hard-coded size limits • Ver. 2.4 default solver, BPLU, limited by size of FA array • Version 3.0.0 removes hard-coded and FA size restrictions

  17. Dynamic Measure: R5-3D Times on 3D-Region SI • Cylindrical 3D region from Loft L2-5 Test • 100 Advancements with Semi ImplicitMethod • Full multi-D (cross derivative terms included) • Whole code transient CPU time with solvers PGMRES and BPLU • Platform: Sun AMD Opteron, Open Suse 11.2, ifort 10.1 MA18 Times 8x8x5 2233.7 8x8x8 17529. 8x8x10 47527. 8x8x13 85430. Too slow!

  18. Dynamic Measure: R5-3D 3D-Regions Times - NI

  19. Dynamic Measures: Grind time • Grind time is average time taken for one advancement. • Non-solver RELAP5-3D operations could obscure the solver times.

  20. Dynamic Measure: R5-3D Solver Clock Cycles NI • BPLU time is O(n), PGMRES time is O(n2) as n increases.

  21. Conclusions Upside of Beta version vs. version 2.4 • Beta version 3.0 has many new features. • Beta version expands memory to fit user’s model. • Beta version has virtually no spaghetti coding • Beta version of RELAP5-3D has much improved 3D capability • Beta version has very efficient solvers for 3D regions Downside • RGUI mostly unavailable • Support fewer compilers

More Related