Скачать презентацию RELAP 5 -3 D in Fortran 90 Dr Скачать презентацию RELAP 5 -3 D in Fortran 90 Dr

d78efe1aa7379a8496c3f4c793baf301.ppt

  • Количество слайдов: 24

RELAP 5 -3 D in Fortran 90 Dr. George L Mesina RELAP 5 International RELAP 5 -3 D in Fortran 90 Dr. George L Mesina RELAP 5 International Users Seminar Nov 18 -20, 2008 Idaho Falls, ID

Overview • • • High-level description of conversion Database & executable code conversion Effect Overview • • • High-level description of conversion Database & executable code conversion Effect of conversion on users and development Current status Alpha version tentative release schedule Summary

F 90 Project High-Level Description • Like working on the Winchester House F 90 Project High-Level Description • Like working on the Winchester House

The Winchester House • Sarah Winchester, heir to Winchester Gun Fortune, built the Winchester The Winchester House • Sarah Winchester, heir to Winchester Gun Fortune, built the Winchester Mansion until 1922. – Believed she couldn’t die while house under construction. – Builders worked 24 hours/day, every day, for 38 years. – Room elevations vary within a story, stairs cross stories or lead nowhere, doors open into walls, etc. • Registered as California Historical Landmark with the National Park Service as "a large, odd dwelling with an unknown number of rooms. “ – First count: 140 rooms, later counts: up to 160.

Winchester House • Floor plan developed daily as needed. No overarching plan. • So Winchester House • Floor plan developed daily as needed. No overarching plan. • So convoluted, people got lost. Like a 3 D maze. • Despite construction and labyrinth, Sarah entertained visitors and gave tours.

RELAP 5 -Winchester F 90 Analogy • • RELAP 5 -3 D had a RELAP 5 -Winchester F 90 Analogy • • RELAP 5 -3 D had a maze-like floor plan (database) has a huge number of rooms (subroutines) with ongoing construction (by code developers) and visitors and tours (users, code usage) • Riemke Repairs • Excavator Ed Davis Doors Fisher Fascia Weaver Windows Judd Additions Nestle Nooks

The Winchester Fortran 90 Analogy • Fortran 90 Project is analogous to: – Replace The Winchester Fortran 90 Analogy • Fortran 90 Project is analogous to: – Replace ALL plumbing & wiring (convert to F 90) – Without affecting the work crews (developers) – Or impacting the owner (users)

Fortran 90 Other Objectives • Decomplexify the 3 D labyrinth into a clear floor Fortran 90 Other Objectives • Decomplexify the 3 D labyrinth into a clear floor plan. Translation – Make an elegantly simple database. • Fix long-standing problems left by previous builders Translation – Solve some User Trouble Reports. • Don’t slow down anyone else’s work Translation – Don’t impact code runtime • When done, every room left exactly as before Translation – ALL test problems must work with no changes to the calculations • Sound like a job you’d want?

Why Convert to Fortran 90? • Numerous advantages to users – Listed later in Why Convert to Fortran 90? • Numerous advantages to users – Listed later in presentation • Easier to read and develop – Better for V&V – Reduced maintenance costs • Increase code longevity

Decomplexifying the Database • Eliminate all equivalence statements – These create multiple names for Decomplexifying the Database • Eliminate all equivalence statements – These create multiple names for a single memory location – Accidental data destruction – Real equivalent-to integer created severe complications • Derived type arrays organize the data w/in a group Control vlm(2)%p = pressure of vol Volumes 2 Trips Tripv, tripv(3)%name, tripl(4)%id tripl Components Cmp, Cmp(7)%num, cmv(k)%pump

Decomplexifying the Database • Example: original component database – – Number of components Data Decomplexifying the Database • Example: original component database – – Number of components Data common to all components Index array of component start indices Variable length component data stored contiguously OR a “referral” index • Problems: correct indexing, overruns • Derived types and sub-derived types simplify data grouping and accessing valves: motor, check, trip, etc. cmv%(k)%valve(1)%trip valve data cmv%(k)%valve(1)%triptime %trip

Decomplexifying the Database • Convert comdecks to modules with: 1. Derived type and other Decomplexifying the Database • Convert comdecks to modules with: 1. Derived type and other data 2. Data dictionary and other documentation within file 3. Service subroutines process module’s data • Constructors and Destructors • Restart Read and Write • Some have other auxiliary routines

Converting Source Code • Major aspects of conversion - Declarations – Modules replace COMDECKS Converting Source Code • Major aspects of conversion - Declarations – Modules replace COMDECKS for data access. – Introduction of derived types to organize data into efficient and logical data groupings. – Declarations with “universal” numeric types to reduce numeric precision problems. – Elimination of real-to-integer equivalences.

Converting Source Code • Major aspects – Executable Code – Internal subroutines used to Converting Source Code • Major aspects – Executable Code – Internal subroutines used to simplify code – Restart controlled by subroutines dedicated to a group of data rather than entire database. – Fortran 90 pointers introduced – Case and multi-else if-statements introduced – Array processing replaces loops in places • Complete rewrites of some subroutines.

Converting Source Code • Fortran conversion - Statements – Obsolescent coding eliminated or replaced. Converting Source Code • Fortran conversion - Statements – Obsolescent coding eliminated or replaced. – Machine dependent coding replaced by Fortran 90 intrinsic functions and subroutines. – IF-THEN and IF-THEN-ELSE constructs replace most “GO TO” statements. – ENDDO and ENDIF replace most CONTINUE statements – USE statements replace INCLUDE statements

Converting Source Code • Derived type references replace FAequivalent arrays. • Ordinal indexing replace Converting Source Code • Derived type references replace FAequivalent arrays. • Ordinal indexing replace fa-indices, simplifies loops. • Fortran 90 pointers replace fa-index based pointers, greatly simplifies pointers.

User Advantages • Machine independent plot file – Can write a plot file on User Advantages • Machine independent plot file – Can write a plot file on a Windows or Linux platform with any chip – After binary transfer, can use file to make plots on any other such platform • Self-sizing memory – No longer will your code run out of memory before your machine does. – Memory is allocated according to the size requirements of your input

User Advantages • Some previously unrecognized problems corrected – For example, time-step lower limit User Advantages • Some previously unrecognized problems corrected – For example, time-step lower limit enforced. – PVM multiple-RHS limit with BPLU solver fixed. • Source Code Users – Can now read and understand code better – Simpler to add new data to database and program data services – Simpler to add new code that uses new or old data – Documentation easier to find and read

User Advantages • Longevity – Obsolete and machine-specific coding removed – Adjusting code to User Advantages • Longevity – Obsolete and machine-specific coding removed – Adjusting code to new machine chips and operating systems simpler in F 90 – Easier to train new team members (even if they only know C++ or Java but not Fortran) – The code will last

Features not currently available • RGUI – RELAP 5 -3 D Graphical User Interface Features not currently available • RGUI – RELAP 5 -3 D Graphical User Interface – Used to show transient calculations in 3 D and color, to make movies of the screen display, etc. – Conversion postponed • The following will not be converted – Severe Core Damage Model coding (SCDAP) – IAEA Graphical User Interface – Nuclear Plant Analyzer

Status of Current Version 2. 8. 3 • An INL internal version created Nov Status of Current Version 2. 8. 3 • An INL internal version created Nov 1, 2008 • Converted => do not reference Fortran 77 database. – 81% of all 643 “relap” files – 100% of 135 “envrl” files • Transient semi-implicit solution fully converted • V 2. 8. 3 Runs all previous test cases and new ones. – Answers same as earlier version except where modified for code physics developments or bug fixes

Status of Current Version 2. 8. 3 • - INL internal version, Nov 1, Status of Current Version 2. 8. 3 • - INL internal version, Nov 1, 2008 – Code speed affected by remaining transfers • Slowdown = Time(v 2. 8. 3) / Time(v 2. 4. 1. 2) – 1 – tank. i = 0%, typp 12002. i = 36% – worst case: pb_ss_air. i – 133% • Most transfers are in syssol. F. – Plan to eliminate all transfers and regain virtually all speed.

Tentative Development/Release Schedule • Version 2. 8. 3 - INL internal version, 11/08 – Tentative Development/Release Schedule • Version 2. 8. 3 - INL internal version, 11/08 – Transient semi-implicit solution free of FA array • Version 2. 8. 4 - INL planned internal version, 12/08 – Transient free of FA array • Version 2. 8. 5 - INL planned internal version, 1/09 – Fortran 90 conversion complete • Version 2. 9. 0 – tentative external release, 2/09 – ALPHA version – Will run all previous test cases and new ones.

Thanks to F 90 Project Contributors • • Dr George Mesina: PI Dr. Richard Thanks to F 90 Project Contributors • • Dr George Mesina: PI Dr. Richard Riemke Nolan Anderson Hope Forsman Richard Moore Dr. Paul Murray Consultants: Richard Wagner, Dr. Walt Weaver Summer students: Joshua Hykes, Riley Cumberland