ENERGYPLUS 10X LBNL: TIANZHEN HONG, PHD; XUAN LUO ORNL: MARK ADAMS , ENERGY.GOV

Page created by Dolores Berry
 
CONTINUE READING
ENERGYPLUS 10X LBNL: TIANZHEN HONG, PHD; XUAN LUO ORNL: MARK ADAMS , ENERGY.GOV
EnergyPlus 10X

             LBNL: Tianzhen Hong, PhD; Xuan Luo
             ORNL: Mark Adams
             thong@lbl.gov , adamsmb@ornl.gov

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY   1
ENERGYPLUS 10X LBNL: TIANZHEN HONG, PHD; XUAN LUO ORNL: MARK ADAMS , ENERGY.GOV
Project Summary
     Timeline :                                                                Key Partners :
     St a rt d a t e : 10 /1/2 0 18
     P la nne d e nd d a t e : 9 /3 0 /2 0 2 1
     Key Milestones :
     1. Ene rg yP lus 9 .4 , 9 /3 0 /2 0 2 0                                    GARD Analytics
     2 . Ene rg yP lus 9 .5 , 4 /3 0 /2 0 2 1
     3 . Ene rg yP lus 9 .6 , 9 /3 0 /2 0 2 1

     Budget :                                                                  Project Outcome :
                                                                               This proje ct a pplie d a n int e g ra t e d s e t of com put ing
     Total Project $ to Date :                                                 t e chnique s t o im prove runt im e pe rform a nce of Ene rg yP lus .
                                                                               Re s ult s s how runt im e re duct ions ra ng e from 3 .2 % t o 9 3 %
     • DOE: $ 1.3 M                                                            (m e a n 23 %) wit h t he s am e s e t t ing s be t we e n Ene rg yP lus 9 .6
     • Co s t Sha re : N/A                                                     a nd 9 .0 . If running a t a hig h s pe e d m ode wit h s om e a ccura cy
                                                                               t ra de offs , t he re duct ions ra ng e from 2 0 % t o 9 8 % (m e a n
     Total Project $:                                                          8 3 %). Such s pe e d im prove m e nt s e na ble Ene rg yP lus for
                                                                               la rg e s ca le s im ula t ions a nd incre as e us e r product ivit y.
     • DOE: $ 1.6 M                                                            Cha ng e s t o t he da t a s t ruct ure , a lg orit hm s , a nd code a ls o
     • Co s t Sha re : N/A                                                     im prove        Ene rg yP lus    cont inuous         de ve lopm e nt     a nd
                                                                               m a int e na nce .

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY                                                                                   2
ENERGYPLUS 10X LBNL: TIANZHEN HONG, PHD; XUAN LUO ORNL: MARK ADAMS , ENERGY.GOV
Team - A diverse project team spans expertise in building science,
     EnergyPlus, and computer science

      Tianzhen Hong                Xuan Luo                   Wanni Zhang          Mark Adams          Jason DeGraw
      Senior Scientist        EnergyPlus Developer            Programmer       EnergyPlus Developer EnergyPlus Developer
         PI, LBNL                    LBNL                        LBNL                PI, ORNL              ORNL

      Edwin Lee             Mike Witte           Jason Glazer                          Lixing Gu          Joshua New
 EnergyPlus Developer, EnergyPlus Developer, EnergyPlus Developer,               EnergyPlus Developer   Computer Scientist
         NREL             GARD Analytics        GARD Analytics                            FSEC               ORNL
U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY                                                 3
ENERGYPLUS 10X LBNL: TIANZHEN HONG, PHD; XUAN LUO ORNL: MARK ADAMS , ENERGY.GOV
Challenge

  Com p a re d wit h o t he r c o m m o nly us e d b uild ing e ne rg y
  m ode ling pro g ra m s , Ene rg yP lus runs s lo we r b y a n
  o rde r of m a g nit ud e . This hind e rs Ene rg yP lus fo r us e
  c a s e s t ha t ne e d m a ny s im ula t ions .

  Ene rg yP lus c o d e b a s e is b ig a nd c o m p le x: t ra ns la t e d
  from FORTRAN t o C in 2 0 14 (ve rs io n 8 .2 ), a b o ut 1M
  line s of c ode writ t e n b y m a ny d e ve lo p e rs a c ro s s 2 5
  ye a rs .

  P a s t e ffort s fo c us o n ne w fe a t ure d e ve lo p m e nt s t o
  m ode l t e c hno lo g ie s , s ys t e m s a nd c o nt ro ls , ra t he r
  t ha n runt im e p e rfo rm a nc e .

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY   4
ENERGYPLUS 10X LBNL: TIANZHEN HONG, PHD; XUAN LUO ORNL: MARK ADAMS , ENERGY.GOV
Approaches

  This proje ct e m ploys a n int e g ra t e d a pproa ch t o s ig nifica nt ly im prove Ene rg yP lus ’ a nnua l
  s im ula t ion run-t im e pe rform a nce from t he ba s e line Ene rg yP lus 9 .0 . The a pproa che s include but
  a re not re s t rict e d t o:
     1. Baseline : De ve lop a s uit e of m ode ls cove ring dive rs e us e ca s e s a nd com ple xit y, a nd
         e s t a blis h a n ove ra ll b a s e line run t im e of t he s uit e t ha t t he p ro je c t e d im prove m e nt will be
         ba s e d on.
     2. Analysis : P rofile m ode ls t o ide nt ify pe rform a nce hot s pot s , a nd us e corre la t ion t e chnique s
         t o ide nt ify proble m a t ic com pone nt m ode ls or s t ruct ure s .
     3. Refactoring : Enha nce code in m a jor rout ine s of s urfa ce a nd zone he a t ba la nce , t he pla nt
         com pone nt s a nd loops , t he ne s t e d HVAC s im ula t ions , t he ca lcula t ions of CTF, s ola r a nd
         window he a t t ra ns fe r us ing ne w da t a s t ruct ure s , im prove d a lg orit hm s , a nd opt im ize d
         conve rg e nce crit e ria .
     4. Threading : Te s t t a s k pa ra lle lis m t o t a ke a dva nt a g e of m ult i-core proce s s ors us ing Ope nMP
     5. GPU: P a ra lle l com put ing for s ola r s ha ding ca lcula t ions
     6. Speed up workflow : Ca che int e rm e dia t e re s ult s (e .g ., CTF, s ola r s ha ding ) a nd re us e t he m
         be t we e n s im ula t ions .

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY                                                        5
ENERGYPLUS 10X LBNL: TIANZHEN HONG, PHD; XUAN LUO ORNL: MARK ADAMS , ENERGY.GOV
63 Models for Performance Benchmark
● 16 DOE Re fe re nc e Building m ode ls                                              20 Hot Spots of the Benchmark Models in
                                                                                                   EnergyPlus 9.0
     o Chic a g o c lim a t e , ASHRAE 9 0 .1-2 0 0 4 , a nnua l
       run, 10 -m inut e t im e s t e p, a s -is re port ing                   Functions             Percentage CPU Functions               Percentage CPU
                                                                                                     time over                              time over
● 16 la rg e m ode ls                                                                                benchmark suite                        benchmark suite

      o La rg e s c a le building wit h ra dia nt unde rfloor                                                       SolarShading::CLIPP
         he a t ing                                                            __pow                 4.582          OLY                 1.852
                                                                               CalcHeatBalanceInside
      o Na t ura l ve nt ila t ion wit h a irflow ne t work                    Surf                  4.020          CalcZoneSums            0.437
                                                                               CalcInteriorRadExchan
      o 12 la rg e m ode ls wit h m a ny zone s or s urfa c e s                ge                    3.772          PsyTsatFnHPb            0.683
      o 2 re s ide nt ia l building s                                          Psychrometrics::cache
                                                                               d_psat_t              2.561          PierceSurface       1.597
                                                                               UpdateThermalHistorie                ReportSurfaceHeatBa
● 3 1 dia g nos t ic s m ode ls                                                s                     1.919          ance                0.407
      ○ From s hoe box no HVAC t o c om ple x                                  InitSolarHeatGains    1.505          InitIntSolarDistribution 0.335
         g e om e t ry a nd HVAC s ys t e m s                                                                       CalcInteriorSolarDistri
                                                                               __GI___exp            1.283          bution                   0.379
      ○ From no s ha ding t o lot s of s ha ding
      ○ From no window t o m a ny windows                                      InitSurfaceHeatBalance 0.692         __ieee754_log_fma 0.316
                                                                                                                    CalcHeatBalanceOuts
      ○ From 5 zone s t o 5 0 0 zone s                                         __memset_avx2_erms 0.623             ideSurf             0.379
                                                                                                                    SetZoneEquipSimOrd
                                                                               UpdateDataandReport 0.471            er                  0.279

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY                                                                                  6
ENERGYPLUS 10X LBNL: TIANZHEN HONG, PHD; XUAN LUO ORNL: MARK ADAMS , ENERGY.GOV
Algorithms - Caching & Optimization of Utility Functions

    ➢     Caching of utility functions
             ●     Subroutine functionality:
                    ○ P s yTs a t FnP b(pb) - Ca lc ula t e t he s a t ura t ion t e m pe ra t ure from ba rom e t ric pre s s ure
                    ○ P s yTs a t FnHP b(h, pb) - Ca lc ula t e t he s a t ura t ion t e m pe ra t ure from t he e nt ha lpy a nd
                         ba rom e t ric pre s s ure .
                    ○ Ge t Spe c ific He a t Glyc ol (T, Glyc olInde x) - Ca lc ula t e t he Glyc ol s pe c ific he a t by
                         int e rpola t ion
             ●     Performance:
                    ○ Ea c h c a c hing im ple m e nt a t ion a c hie ve d a n a ve ra g e of 1-3 % s pe e d up of t he t ot a l run
                         t im e of a ll 6 2 3 Ene rg yP lus rout ine t e s t file s

    ➢     Cubic interpolation of psychrometric functions
             ●     P s yTs a t FnP b(pb) - Up t o 10 % s pe e d up t o s e le c t e d t e s t file s
             ●     A ne w pe rform a nc e pre c is ion t ra de off opt ion in Ene rg yP lus 9 .6 re le a s e

                                                                    * Psychrometric functions: compute properties of moist air from other properties
U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY                                                                     7
ENERGYPLUS 10X LBNL: TIANZHEN HONG, PHD; XUAN LUO ORNL: MARK ADAMS , ENERGY.GOV
Algorithms - Optimized Subroutines

      ➢     Polygon clipping for shadow calculation
              ●     Methods: Us e Liang -Barsky a lg orit hm for c lipping re c t a ng ula r polyg ons
              ●     Performance gain:
                     –    1.5 X s pe e d up for t he s ubrout ine it s e lf
                     –    6 % s pe e d up for Hos pit a lLowEne rg y.idf, a s ha ding c a lc ula t ion int e ns ive t e s t file

      ➢     Direct solution to get part load ratio (PLR) of coils
              ●     Method: Us e line a r re la t ions hip be t we e n pa rt loa d ra t io a nd s ys t e m /c oil out put wit h
                    g ive n inle t c ondit ions .
              ●     Performance : 2 x s pe e d is a c hie ve d for c oil s ubrout ine

      ➢     Speedier schedule manager
               ●     Method: m ore e ffic ie nt ly ope n a nd pa rs e e xt e rna l
                     s c he dule file da t a , re duc ing runt im e in proport ion
                     t o t he num be r of c olum ns of da t a in a file
               ●     Performance : 9 2 % run t im e s a ving on Ma c for a
                     s c he dule im port ing t e s t file
                                                                                                  For a file wit h ~10 0 colum ns of da t a t he
                                                                                                             runt im e is cut in ha lf.
U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY                                                                       8
ENERGYPLUS 10X LBNL: TIANZHEN HONG, PHD; XUAN LUO ORNL: MARK ADAMS , ENERGY.GOV
Logic - Make the Common Case Faster

      ➢      Zone surface grouping and reordering
               ●     Surfa c e s a re g roupe d by zone
               ●     W it hin e a c h zone opa que s urfa c e s a re g roupe d s e pa ra t e ly from window s urfa c e s
               ●     Ma in loops e xe c ut e d by zone a nd t he n by s urfa c e
               ●     The s e a llow -
                        ■       He a t ba la nc e loops t o ope ra t e on a c ont inuous s e t of s urfa c e s wit hout if
                                c ondit ions wit hin t he loops
                        ■       Fut ure pa ra lle liza t ion by zone

                 Zo ne 1                                                                         Zo ne 2

He a t
Ba la nc e       Airwall          Opaque                   Window       Other                      Airwall                  Opaque     Window            Other
Arra ys
                             idx = W inS urfa c e Firs t            idx = W inS urfa c e Las t        idx = He a t Tra ns fe rFirs t            idx = He a t Tra ns fe rLas t

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY                                                                                                    9
ENERGYPLUS 10X LBNL: TIANZHEN HONG, PHD; XUAN LUO ORNL: MARK ADAMS , ENERGY.GOV
Logic - Make the Common Case Faster

       ➢     Inside surface heat balance
               ●     Two funct ions , one for s im ple Conduct ion Tra ns fe r Funct ion (CTF) - only
                     s im ula t ions a nd a not he r for m ore com ple x s im ula t ions
               ●     Elim ina t e if condit ions wit hin t he loops

      ➢     Move uncommon conditional calculations                                       ✓ Allows e a s ie r bra nch
            out of the main loop                                                           pre dict ion a nd ve ct oriza t ion,
               ●     Tubula r da ylig ht ing de vice                                       a nd be t t e r ca che
               ●     Mova ble ins ula t ion for opa que s urfa ce s                        pe rform a nce for com pile rs
               ●     Mova ble s la t s for wind ow blinds
               ●     St orm windows
               ●     Source or s ink s urfa ce

               For e a c h s urfa c e :                                        For e a c h s urfa c e : Do s t uff B
                If s t orm window: Do s t uff A                                If a ny s t orm window e xis t s :
                Els e : Do s t uff B                                             For e a c h s t orm window: Do s t uff A

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY                                                      10
Data Structure                        - Heat Balance Array Refactoring

      ➢     Array of objects to array of scalars
               ●     Conve rt la rg e obje c t a rra ys (e .g . Surfa c e W indow wit h 2 0 0 + fie lds a nd Surfa c e wit h 10 0 + fie lds ) t o
                     a rra ys of s c a la rs for c a c he loc a lit y a nd fut ure ve c t oriza t ion

      ➢     Efficient initialization of data structure
               ●     Re m ove t hird-pa rt y init ia liza t ion func t ion c a lls for ve c t oriza t ion
               ●     Loop-wis e init ia liza t ion wit h s m a ll loops t o m a ke t he m a xim um us e of ve c t or re g is t e rs
              ●      Re duc e re -init ia liza t ions (e .g . unne c e s s a ry s ola r a rra ys re s e t whe n s un is down a t e a c h t im e s t e p)

      ➢     Optimized multi -dimensional arrays
               ●     Re orde r m ult i-dim e ns iona l a rra ys t o loop e xe cut ion orde r for ca che loca lit y
               ●     Re duce a rra y s licing a nd re cons t ruct ion (2 D a rra y -> a rra y of a rra y)
               ●     Re duce dim e ns ion of a rra ys

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY                                                                               11
GPU Accelerate Solar Shading

   ➢    Performance improvements:
           ●     Up t o 10 -14 x im prove m e nt
           ●     Sc a le s wit h num be r of s ha ding
                 s urfa c e s

   ➢    Penumbra:
           ●     Ope n-s ourc e libra ry for GP U
                 s ola r s ha ding
           ●     Ope nGL 2 .1 (c ros s pla t form ,
                 wide ly s upport )

   ➢    Benefits:
           ●     Ena ble s m ode ling of la rg e
                 building s wit h m a ny s ha ding
                 s urfa c e s
           ●     Sc a le s wit h GP U powe r

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY   12
Profiling Guided Performance Improvements

   ➢    CarrolMRT:
           ●     Alt e rna t e int e rior ra dia nt he a t e xc ha ng e m ode l
           ●     O(n) vs O(n^2 ) a lg orit hm
           ●     Up t o 9 5 % runt im e re duc t ion (s c a le s wit h num be r
                 of int e rior s urfa c e s in a zone )

   ➢    Native C++ CSV output / conditional output:
           ●     Alt e rna t ive t o Re a dVa rs ESO
           ●     2 5 -8 2 +% runt im e re duc t ion, s c a ling on num be r of
                 out put s
           ●     Condit iona lly t urn on/off out put file s
                   ■ Up t o 4 2 % runt im e re duc t ion

   ➢    Function approximation:
           ●     Min/m a x a nd s om e pow func t ions t o us e ne w, fa s t e r a pproxim a t ions
           ●     Up t o 13 % runt im e re duc t ion, a ve ra g e 4 %

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY                          13
Runtime: EnergyPlus 9.6 (Sep21) vs. 9.0 (Sep18)
           Machine: Intel Xeon W-2123 CPU @ 3.60GHz, Ubuntu 18.04.2 LTS
           Models: 63 EnergyPlus IDFs

                             Runtime Decrease Histogram

                                                                 Same default settings: 9.6 vs 9.0
Number of Models

                                Runtime Decrease (%)
                   Mean: 23%, median: 20%, min: 3.2%, max: 93%
Parallelization - OpenMP

       ➢     Applied OpenMP parallel in major heat balance code blocks
               ●      Ma jor funct iona lit ie s :
                        ■      Init s urfa c e he a t ba la nc e (ra dia nt e xc ha ng e , c onve c t ive c oe ffic ie nt s , e t c .)
                        ■      Ca lc ula t e ins ide a nd out s ide s urfa c e t e m pe ra t ure s
                        ■      Upda t e t he rm a l his t orie s a nd re port ing
               ●      Ge ne ra t e ide nt ica l re s ult s wit h s ing le t hre a d

                                                     # Threads                      2             4             8
                                    10x_incr_100Zones100Surfaces                  1.4x           1.7x            -
                                    (4-CPU desktop)
                                    10x_incr_100Zones100Surfaces                  1.5x           1.9x          2.1x
                                    (24-CPU cluster)
                                    10x_large_82zones_ASHRAE_HQ                   1.6x           1.8x          2.2x
                                    (24-CPU cluster)

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY                                                             15
Runtime: Parallelization with OpenMP

            9.6 with OpenMP: 8 vs 1 CPU for 6 “large” (> 20 surfaces/zone) models

                                  Runtime Decrease Histogram
     Number of Models

                                        Runtime Decrease (%)

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY        16
Performance Precision Tradeoffs

 ➢     Successive modes to
       trade speed for precision:
          ●     Us e e xis t ing s im ula t ion
                pa ra m e t e rs
          ●     Expos e e xis t ing int e rna l
                c onve rg e nc e va ria ble s t o
                t he us e r
          ●     Ne w opt im iza t ions

   ➢ The s im ula t ion t im e c a n be dra m a t ic a lly re duc e d
   ➢ Im pa c t s s im ula t ion re s ult s
   ➢ “_pe rflog .c s v” file provide s us e r t he im pa c t of c ha ng ing m ode s on a nnua l e ne rg y, runt im e ,
     wa rning s , a nd t e m pe ra t ure os c illa t ions
     ➢ Ot he r s e t t ing s : Us e Co il Dire c t So lut io ns (Y/N), Zo ne Ra d ia nt Exc ha ng e Alg o rit hm (Sc rip t F, Ca rro llMRT)
   ➢ Addit iona l m ode s in Ene rg yP lus 9 .6 (e .g . P s yc hrom e t ric )
U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY                                                                  17
Runtime: Speed Mode4 + CarrollMRT
                             Runtime Decrease Histogram         Total Site Energy Variance Histogram
Number of Models

                                 Runtime Decrease (%)                 Total Site Energy Variance (%)

                   Mean: 76%, min: 20%, median: 78%, max: 98%
Runtime: Speed Mode7 + CarrollMRT
           Runtime Decrease Histogram        Total Site Energy Variance Histogram

               Runtime Decrease (%)                Total Site Energy Variance (%)
Mean: 83%, min: 21%, median: 88%, max: 98%
Performance Precision Tradeoff Characterization

➢ P e rfo rm a nce P re cis io n t ra d e o ffs int ro d uce va ria nce in re s ult s which ca n b e la rg e
➢ Five m o d e ls s ho w e s p e cia lly hig h va ria nce
➢ Fut ure wo rk: und e rs t a nd which m o d e ling fe a t ure s le a d t o hig h va ria nce a nd p ro vid e
  g uid a nce o n whe n P re cis io n-P e rfo rm a nce Tra d e o ffs a re s a fe t o us e
Impacts

 ● The 3 -ye a r p ro je c t a p p lie d a n int e g ra t e d s e t o f c o m p ut ing t e c hnique s t o
   re duc e runt im e o f Ene rg yP lus . P e rform a nc e im prove m e nt s we re inc lude d in
   Ene rg yP lus re le a s e s .
 ● Com pa re d t he runt im e s o f 6 3 be nc hm a rk m ode ls be t we e n Ene rg yP lus 9 .0
   a nd 9 .6 , runt im e re d uc t io ns ra ng e fro m 3 % t o 9 3 % (i.e ., 1X t o 14 X, m e dia n
   1.2 5 X) wit h d e fa ult s e t t ing s , a nd fro m 2 0 % t o 9 8 % (i.e ., 1.3 X t o 5 0 X, m e dia n
   7 .7 X) in a hig h s p e e d m o d e wit h s o m e a c c ura c y t ra d e o ffs (e xc luding Ope nMP ).
 ● Re d uc ing runt im e o f c o m p le x Ene rg yP lus s im ula t io n m ode ls im prove s us e r
   pro duc t ivit y a nd s up p o rt s q uic k d e c is io n m a king (e .g ., d e s ig n c ha rre t t e ).

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY                                21
Stakeholder Engagement and Outreach

      • Annua l s t a ke hold e r b rie fing
      • Biwe e kly m e e t ing s t o provid e t im e ly
        fe e d b a c k
      • A ha c ka t hon s e s s ion wit h NERSC on Ope nMP
      • Eng a g e d t he b roa d e r Ene rg yP lus
        d e ve lopm e nt t e a m a nd c om m unit y
      • P re s e nt a t ion a t ASHRAE BP A Confe re nc e ,
        Se pt e m b e r 2 5 , 2 0 19

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY   22
Remaining Project Work

    ●     Cont rib ut e t o t he Ene rg yP lus 9 .6 re le a s e
    ●     Re -run fina l pe rform a nc e b e nc hm a rk wit h t he offic ia l Ene rg yP lus 9 .6
    ●     P roje c t wra p up m e e t ing wit h s t a ke hold e rs
    ●     Aft e r t he proje c t , c ont inue t he pe rform a nc e work a s pa rt of t he
          Ene rg yP lus c ore proje c t in a re a s , e .g .:
           ○     Re fa c t o r d a t a s t ruc t ure a nd c o d e
           ○     Ve c t o riza t io n a nd p a ra lle liza t io n
           ○     Re d uc e unne c e s s a ry c a lls
           ○     Op t im ize lo o p ing a nd it e ra t io ns
           ○     Ca lc ula t e o ut p ut va ria b le s o nly whe n re q uire d

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY                       23
Tha nk Yo u

                                                          LBNL a nd ORNL
                                                 Tia nzhe n Hong a nd Ma rk Ada m s
                                               thong@lbl.gov , adamsmb@ornl.gov

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY          24
REFERENCE SLIDES

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY   25
Project Budget
         Project Budget : $ 1.6 M
         Variances : N/A
         Cost to Date : $ 1.3 M
         Additional Funding : N/A

                                                                   Budget History
                             FY 2019                                           FY 2020                      FY 2021
                               (past)                                           (past)                      (current)

                   DOE                Cost-share                   DOE              Cost-share   DOE             Cost-share
                 $50 0 k                    N/A                   $50 0 k                N/A     $6 0 0 k               N/A

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY                                                  26
Project Plan and Schedule

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY   27
Logic - Remove Redundant Subroutines

       ➢     Skip unnecessary interzone window calculation
      •      Methods:
                –     Skip c a lc ula t ing t he diffus e s ola r e xc ha ng e fa c t ors be t we e n
                      zone s if no int e rzone window e xis t s
      •      Performance gain:
              – Re duc e d 6 +% t ot a l E+ run t im e in la rg e m ode ls (5 0 0 zone s a nd
                      up) in c a lc ula t ing t he int e rzone s ola r e xc ha ng e fa c t or m a t rix

       ➢     Reduce run time solar and thermal absorptance calculation
       •     Methods:
                –     Re duc e unne c e s s a ry loop it e ra t ions t o c a lc ula t e s ola r a nd
                      t he rm a l a bs orpt a nc e fa c t ors a t e a c h t im e s t e p by pre -c he c king
                      if a ny s ha ding or g la zing s t a t us c ha ng e
      •      Performance gain:
                –     Re duc e d 9 0 +% func t ion c a lls a nd run t im e of s ubrout ine it s e lf

U.S. DEP ARTMENT OF ENERGY   OFFICE OF ENERGY EFFICIENCY & RENEW ABLE ENERGY                                   28
Runtime benchmarking 9.6 vs. 9.0
All default settings (Machine: Intel Xeon W-2123 CPU @ 3.60GHz, Ubuntu 18.04.2 LTS)
                                   Models with largest runtime
                                   decrease:

 count      63
 mean       23.113265
 min        3.245094
 median     20.465755
 max        93.003413
Runtime benchmarking 9.6 vs. 9.0
Version 9.6 with fast mode 04 and radiant exchange algorithm CarrollMRT
                                    Models with largest runtime
                                    decrease:

 count      63
 mean       75.602455
 min        20.079103
 median    77.948718
 max        97.884805
Runtime benchmarking 9.6 vs. 9.0
Version 9.6 with fast mode 07 and radiant exchange algorithm CarrollMRT

                                    Models with largest runtime
                                    decrease:

 count     63
 mean      82.878219
 min       20.378319
 median   86.796048
 max       98.241773
Runtime benchmarking 9.6 vs. 9.0
Version 9.6 with fast mode 07 and radiant exchange algorithm CarrollMRT + OpenMP 4 threads

                                   Models with largest runtime
                                   decrease:

 count     63
 mean      83.286181
 min       20.650021
 median   88.107236
 max       98.355650
9.6: OpenMP 8 threads vs. w/o OpenMP

 count    21           count    6
 mean     8.1%         mean     42.8%
 min      -8.4%        min      5.7%
 meidan   -0.4%        median   47.9%
 max      66.0%        max      66.0%
9.6 fast mode 07: w/ OpenMP vs. w/o OpenMP
                       Models with runtime increase:

count       63
mean        4.186573
min         -
24.137931
median      3.316062
max                    Models with largest runtime
            30.15974   decrease:
4
You can also read