52
Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear Flash The FLASH Code Parallel AMR Made Easy Tomek Plewa LACSI Symposium Santa Fe, 10/12/2004

Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

Embed Size (px)

Citation preview

Page 1: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center

at The University of Chicago

The Center for Astrophysical Thermonuclear Flashes

The FLASH CodeParallel AMR Made Easy

Tomek Plewa

LACSI SymposiumSanta Fe, 10/12/2004

Page 2: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

Outline

FLASH CenterAstrophysics as primary application

Verification and Validation activities

External contributors and users

FLASH CodeView from the outside

Source tree and functionalityUser level

Problem configuration

Intra-module modifications

Developer levelExtending the source tree

Inter-module communications

Summary

Page 3: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Application: Astrophysics

Target ApplicationsCompact accreting stars (white dwarf, neutron star)

Reactive hydrodynamics (DNS or subgrid model)

Initial conditions close to hydrostatic equilibrium (self-gravity)

Complex EOS (dense nuclear matter)

Example: Type Ia SupernovaMassive white dwarf

Subgrid model for nuclear flame

Self-gravity

Degenerate EOS

Page 4: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

Length scales in White Dwarf Deflagration

Before 2000

Now

BG/L

Page 5: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Verification & Validation Program

Verification: solving equations right

Validation: solving the right equations

Verification ranging from simple analytic problems to code-code comparison.

Validation: no direct access to experiments, use scaling laws

Absolutely NO culture of validation in astrophysics!

Page 6: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Verification

Page 7: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH V&V Complete Example

Experimental time series, water/glycol fog visualization of SF6 mole fraction.

Images correspond to 50, 190, 330, 470, 610, and 750 s after shock impact

Composite image does not preserve time-distance relationship

Page 8: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

AMR-generated Timestep-dependent Signal

CFL=0.8

CFL=0.2

CFL=0.4

Page 9: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

AMR-generated Timestep-dependent Signal

Page 10: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH As An Open Source Research Code

FLASH is community code, freely (with minimal restrictions) available for research

External contribution: shock-cylinder experiment (Jacobs, LANL)

Page 11: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Center and AMR Community

Page 12: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Code

Primary objective

To create robust, reliable, efficient and expandable code, that stands the test of time and users.

Primary characteristics

parallel

adaptive mesh (possibly different mesh packages)

block-structured (currently)

multi-physics (hydro, MHD, SRHD, gravity, particles…)

Fortran 9x

portable

freely accessible

documented & actively maintained

Page 13: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Code As Seen From The Outside

Page 14: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Code As Seen From The Outside

Page 15: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Code As Seen From The Outside

Page 16: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Code As Seen From The Outside

Page 17: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Code As Seen From The Outside

Page 18: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Code As Seen From The Outside

Page 19: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Code As Seen From The Outside

Page 20: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Code As Seen From The Outside

Page 21: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Code As Seen From The Outside

Page 22: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Code As Seen From The Outside

Page 23: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Portability: BG/L

Successful early runs up to 2048 processors

Communication is scaling well. Test size limited

by small number of available processors.

Large runs scheduled

Several days of 16K-32K processors.

Focusing on FLOPS

Make up for slower CPUs, beta-compilers

Page 24: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Code Access

Page 25: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Source Tree And Functionality

Page 26: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Source Tree And Functionality

Page 27: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Driver

Page 28: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Driver

Page 29: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Hydrodynamics Unit

Page 30: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH EOS Unit

Page 31: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Unit Hierarchy

API/

Stubs

Common API Impl

API impl

Wrapper

kernel

API impl API impl

Wrapper

kernel

Wrapper

kernel

Page 32: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Solvers: Poisson

Page 33: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Source Terms

Page 34: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Common Fabric

Page 35: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Inter-Module Connectivity

Page 36: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Inter-Module Connectivity

Page 37: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

Putting It All Together

Page 38: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Config Files

Page 39: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Setups

Page 40: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Setup Example

Page 41: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Initial Conditions

Page 42: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

Configuring FLASH Application

Page 43: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Application Build Tree

Page 44: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Documentation

Page 45: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH I/O

Page 46: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Visualization

Page 47: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

FLASH Results

Page 48: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

Summary

Overall architectureUnit typesUnit architectureNear future

Page 49: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

Summary: Architecture

Setup toolassemble application

Config filesdefine components

Driver moduleorganize interactions

Unit ArchitectureAPI

InheritanceData management

Page 50: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

Summary: Units Types

Physicshydrogravity

InfrastructuredrivergridI/O

Utilityprofilerruntime visualization

Data analysisFidlrflashview

Page 51: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

Wrapper

Summary: Unit Architecture

Driver

Top level:•API

•Unit Test

Grid Data Module

patch datatime step

etc

Kernel

Page 52: Advanced Simulation and Computing (ASC) Academic Strategic Alliances Program (ASAP) Center at The University of Chicago The Center for Astrophysical Thermonuclear

The ASC/Alliances Center for Astrophysical Thermonuclear FlashesThe University of Chicago

Near Future: FLASH3

FLASH original design was very Paramesh-likeblock structured

fixed size blocks

specified at compile time

every section of the code assumed knowledge of block size

Relaxing the constrain opens up possibilities of usingvariable block size mesh

patch based mesh

non-uniform non-adaptive mesh

uniform grid without unnecessary overheads