tFinalize slides - brcon2020_adc - my presentation for brcon2020
 (HTM) git clone git://src.adamsgaard.dk/.brcon2020_adc
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit a8c4fcf85cb0813bd6f95b7f5c43492cf4dcda9f
 (DIR) parent cc936ee429fcb0d7bd2934378d8c7235ae9007f0
 (HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
       Date:   Tue, 28 Apr 2020 21:41:25 +0200
       
       Finalize slides
       
       Diffstat:
         M brcon2020_adc.md                    |      93 ++++++++-----------------------
       
       1 file changed, 24 insertions(+), 69 deletions(-)
       ---
 (DIR) diff --git a/brcon2020_adc.md b/brcon2020_adc.md
       t@@ -28,13 +28,12 @@ systems, and ensures reproducibility of results.
        * 33 y/o Dane
        * #bitreich-en since 2019-12-16
        
       -Present:
       +present:
        
       -* Postdoctoral scholar at Stanford University (US)
       -* Lecturer at Aarhus University (DK)
       +* postdoctoral scholar at Stanford University (US)
       +* lecturer at Aarhus University (DK)
        
       -#pause
       -Previous:
       +previous:
        
        * Danish Environmental Protection Agency (DK)
        * Scripps Institution of Oceanography (US)
       t@@ -42,7 +41,7 @@ Previous:
        * Princeton University (US)
        
        #pause
       -Academic interests:
       +academic interests:
        
        * ice sheets, glaciers, and climate
        * earthquake and landslide physics
       t@@ -52,8 +51,11 @@ Academic interests:
        ## Numerical modeling
        
        * numerical models used for simulating complex physical systems
       -  * n-body simulations: granular materials, gravitational interaction
       -  * fluid flows: CFD, weather, climate
       +
       +  * n-body simulations: planetary formation, icebergs, soil/rock mechanics
       +
       +  * fluid flows (CFD): aerodynamics, weather, climate
       +
        
        * domains and physical processes split up into small, manageable chunks
        
       t@@ -101,28 +103,6 @@ Academic interests:
                                                            (_)\___/|_|\_\
        
        
       -% Our scientific training includes learning how to make an solid idea,
       -% translate said idea into a set of equations, and how to implement it
       -% in high-level programming languages
       -
       -% using high-level languages:
       -%  - quick development == quick results
       -%  - loose touch with numerical workings
       -%  - develop non-transferrable skills
       -%  - code not transferrable between platforms
       -%  - use of loop structures discouraged, library calls encouraged
       -
       -% using high-level languages:
       -%  - slower development == delayed results
       -%  - gain intimate familiarity with numerical workings
       -%  - develop transferrable code and skills
       -%  - high computational performance when done right
       -
       -% 4. apply the new algorithm to HPC
       -
       -% requires basic C programming, usually no syscalls besides file IO
       -
       -
        ## Numerical modeling
        
              task: Solve partial differential equations (PDEs) by stepping through time
       t@@ -131,9 +111,8 @@ Academic interests:
           example: Heat diffusion through homogenous medium
        
                    ∂T
       -            -- = -k ∇² T
       +            -- = -k ∇²(T)
                    ∂t
       -#pause
        
            domain:
        
       t@@ -143,18 +122,8 @@ Academic interests:
               |                                                                     |
               '---------------------------------------------------------------------'
        
       -
        ## Numerical modeling
        
       -      task: Solve partial differential equations (PDEs) by stepping through time
       -            PDEs: conservation laws; mass, momentum, enthalpy
       -
       -   example: Heat diffusion through homogenous medium
       -
       -            ∂T
       -            -- = -k ∇² T
       -            ∂t
       -
            domain: discritize into n=7 cells
        
               .---------+---------+---------+---------+---------+---------+---------.
       t@@ -164,6 +133,8 @@ Academic interests:
               '---------+---------+---------+---------+---------+---------+---------'
        
        #pause
       +* Numerical solution with high-level programming:
       +
            MATLAB: sol = pdepe(0, @heat_pde, @heat_initial, @heat_bc, x, t)
        
            Python: fenics.solve(lhs==rhs, heat_pde, heat_bc)
       t@@ -173,18 +144,11 @@ Academic interests:
                (the above are not entirely equivalent, but you get the point...)
        
        
       -## Numerical modeling
       -
       -      task: Solve partial differential equations (PDEs) by stepping through time
       -            PDEs: conservation laws; mass, momentum, enthalpy
       -
       -   example: Heat diffusion through homogenous medium
       +## Numerical solution: Low-level programming
        
       -            ∂T
       -            -- = -k ∇² T
       -            ∂t
       +    example BC: outer boundaries constant temperature (T₁ & T₇)
        
       -    domain: discretize into n=7 cells
       +* computing ∇²(T)
        
               .---------+---------+---------+---------+---------+---------+---------.
               |         |         |         |         |         |         |         |
       t@@ -201,14 +165,10 @@ t + dt |    T₁   |    T₂   |    T₃   |    T₄   |    T₅   |    T₆   |
               '---------+---------+---------+---------+---------+---------+---------'
               |<- dx  ->|
        
       -           T_new[i] = T[i] - k*(T[i+1] - 2.0*T[i] + T[i-1])/(dx*dx) * dt;
       -
       -    example BC: outer boundaries constant temperature (T₁ & T₇)
       -
        
        ## Numerical solution: Low-level programming
        
       -    explicit solution with central finite differences:
       +* explicit solution with central finite differences:
        
                for (t=0.0; t<t_end; t+=dt) {
                    for (i=1; i<n-1; i++)
       t@@ -217,8 +177,9 @@ t + dt |    T₁   |    T₂   |    T₃   |    T₄   |    T₅   |    T₆   |
                    T = T_new;
                    T_new = tmp;
                }
       +#pause
        
       -    iterative Jacobian solution with central finite differences:
       +* implicit, iterative solution with central finite differences:
        
                for (t=0.0; t<t_end; t+=dt) {
                    do {
       t@@ -247,17 +208,11 @@ t + dt |    T₁   |    T₂   |    T₃   |    T₄   |    T₅   |    T₆   |
                * infiniband
                * total: 200 TB memory, 32 PB SSD, 5.25 petaflops (peak)
        
       -% National Climate-Computing Research Center
       -% as much power as a small city
       -
       -## Scaling problem
       -
       -New algorithms hard to implement in HPC codes
       -
       -
        ## A (non-)solution
        
       -* Suggested workaround: Apply interpreted high-level languages to HPC platforms
       +* high-level, interpreted code with extensive solver library -> low-level, compiled, parallel code
       +
       +* suggested workaround: port interpreted high-level languages to HPC platforms
        
        #pause
        
       t@@ -331,10 +286,10 @@ NO!
                                simple physics
                                2,348 LOC
        #pause
       -                        real: 0m00.07 s on potato laptop from 2012
       +                        real: 0m00.07 s on laptop from 2012
        
        #pause
       -                        ...guess which one is portable?
       +                        ...guess which one is more portable?
        
        ## Summary