Top Banner
Kathy Yelick, 1 Advanced Software for Biological Simulations Elastic structures in an incompressible fluid. Blood flow, clotting, inner ear, embryo growth, Complicated parallelization Particle/Mesh method, but “Particles” connected into materials (1D or 2D structures) Communication patterns irregular between particles (structures) and mesh (fluid) Joint work with Ed Givelberg, Armando Solar-Lezama, Charlie Peskin, Dave McQueen 2D Dirac Delta Functio Code Size in Lines Fortran Titanium 8000 4000 Note: Fortran code is not parallel
8

Kathy Yelick, 1 Advanced Software for Biological Simulations Elastic structures in an incompressible fluid. Blood flow, clotting, inner ear, embryo growth,

Dec 22, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Kathy Yelick, 1 Advanced Software for Biological Simulations Elastic structures in an incompressible fluid. Blood flow, clotting, inner ear, embryo growth,

Kathy Yelick, 1

Advanced Software for Biological Simulations

• Elastic structures in an incompressible fluid.• Blood flow, clotting, inner ear, embryo growth, …

• Complicated parallelization• Particle/Mesh method, but “Particles” connected

into materials (1D or 2D structures)• Communication patterns irregular between particles

(structures) and mesh (fluid)

Joint work with Ed Givelberg, Armando Solar-Lezama, Charlie Peskin, Dave McQueen

2D Dirac Delta Function

Code Size in Lines

Fortran Titanium

8000 4000

Note: Fortran code is not parallel

Page 2: Kathy Yelick, 1 Advanced Software for Biological Simulations Elastic structures in an incompressible fluid. Blood flow, clotting, inner ear, embryo growth,

2 Kathy Yelick

Software Architecture

Application Models

Generic Immersed Boundary Method (Titanium)

Heart(Titanium)

Cochlea(Titanium+C)

FlagellateSwimming

Spectral(Titanium + FFTW)

AMR

Extensible Simulation

SolversMultigrid(Titanium)

• Can add new models by extending material points• Can add new Navier-Stokes solvers

IB software and Cochlea by E. Givelberg; Heart by A. Solar based on Peskin/McQueen

existing components

Source: www.psc.org

Page 3: Kathy Yelick, 1 Advanced Software for Biological Simulations Elastic structures in an incompressible fluid. Blood flow, clotting, inner ear, embryo growth,

Kathy Yelick, 3

Titanium: Java for Scientific Computing

• Java plus high performance parallelism• No JVM; compiled to assembly (via C for portability)

• Features added to Java:• PGAS model with SPMD execution and one-side

communication • Multi-dimensional rectangular arrays• Locality qualification: the local keyword• Lightweight (value) classes for Complex, etc.• C++ like templates and operator overloading• Zone-based memory management

• Titanium runs on shared & distributed memory

Page 4: Kathy Yelick, 1 Advanced Software for Biological Simulations Elastic structures in an incompressible fluid. Blood flow, clotting, inner ear, embryo growth,

Kathy Yelick, 4

Coding Challenges: Block-Structured AMR

• Adaptive Mesh Refinement (AMR) is challenging• Irregular data accesses and

control from boundaries• Mixed global/local view is useful

AMR Titanium work by Tong Wen and Philip Colella

Titanium AMR benchmark available

Page 5: Kathy Yelick, 1 Advanced Software for Biological Simulations Elastic structures in an incompressible fluid. Blood flow, clotting, inner ear, embryo growth,

Kathy Yelick, 5

Languages Support Helps Productivity

C++/Fortran/MPI AMR• Chombo package from LBNL• Bulk-synchronous comm:

• Pack boundary data between procs• All optimizations done by programmer

Titanium AMR• Entirely in Titanium• Finer-grained communication

• No explicit pack/unpack code• Automated in runtime system

• General approach• Language allow programmer

optimizations• Compiler/runtime does some

automatically

Work by Tong Wen and Philip Colella; Communication optimizations joint with Jimmy Su

0

5000

10000

15000

20000

25000

30000

Titanium C++/F/MPI(Chombo)

Lin

es

of

Co

de

AMRElliptic

AMRTools

Util

Grid

AMR

Array

Page 6: Kathy Yelick, 1 Advanced Software for Biological Simulations Elastic structures in an incompressible fluid. Blood flow, clotting, inner ear, embryo growth,

Kathy Yelick, 6

Performance of Titanium AMRSpeedup

0

10

20

30

40

50

60

70

80

16 28 36 56 112

#procs

spee

du

p

Ti Chombo

• Serial: Titanium is within a few % of C++/F; sometimes faster!• Parallel: Titanium scaling is comparable with generic

optimizations

- optimizations (SMP-aware) that are not in MPI code

- additional optimizations (namely overlap) not yet implemented

Comparable parallel performance

Joint work with Tong Wen, Jimmy Su, Phil Colella

Page 7: Kathy Yelick, 1 Advanced Software for Biological Simulations Elastic structures in an incompressible fluid. Blood flow, clotting, inner ear, embryo growth,

Kathy Yelick, 7

Particle/Mesh Method: Heart Simulation• Elastic structures in an incompressible fluid.

• Blood flow, clotting, inner ear, embryo growth, …

• Complicated parallelization• Particle/Mesh method, but “Particles” connected

into materials (1D or 2D structures)• Communication patterns irregular between particles

(structures) and mesh (fluid)

Joint work with Ed Givelberg, Armando Solar-Lezama, Charlie Peskin, Dave McQueen

2D Dirac Delta Function

Code Size in Lines

Fortran Titanium

8000 4000

Note: Fortran code is not parallel

Page 8: Kathy Yelick, 1 Advanced Software for Biological Simulations Elastic structures in an incompressible fluid. Blood flow, clotting, inner ear, embryo growth,

Kathy Yelick, 8