23
GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

Embed Size (px)

Citation preview

Page 1: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

GeoFramework: Example of using frameworks in

geophysics

CIG/IRIS Computational Seismology Workshop

June, 2005

Mike GurnisCaltech

Page 2: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

Topics

• Scientific Rationale– Natural accommodation of boundary conditions– Multi-scale models– Multi-physics models– Data assimilation and prediction

• GeoFramework project– Builds upon Pyre – A Science Neutral Framework– New codes with the infrastructure framework StGermain– Repository/Web site – GeoFramework.org

• Reengineering & Coupling Codes with Pyre– Made substantial progress:

• Global Mantle Convection – Local convection (CitcomS-CitcomS)• Viscous Mantle flow – elastic plate (CitcomS-SNAC)

– Still working on:• Full Seismic Wave field - Global Mantle Convection (SpecFEM3D, CitcomS)• Plate Tectonic Stresses – Earthquake Rupture (TECTON-eqsim) • Mantle flow -- petrologic phase relations (ConMan-pHMELTS)

Page 3: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

A hierarchy of software components

Superstructure

Geodynamic Specific

Infrastructure

Library

?

?

?

?

Page 4: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

Superstructure and Geodynamic Specific Layers

•Simulation controller•Monitor Simulation•Couple Fluid to Solid

Component AComponent B….

Superstructure

Geodynamic Specific

Page 5: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

Pyre Framework (Science Neutral)

component

bindings

engine

solver

component

bindings

library

infrastructure

service

framework

service

serviceservice

component

bindings

engine

solver

abstract classabstract class

specializationspecialization

packagepackage

The integration framework is a set of co-operating abstract services

FORTRAN/C/C++FORTRAN/C/C++

pythonpython

Developed by Michael Aivazis

Page 6: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

Virtual Test Facility (VTF): Example From Pyre

Page 7: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

CitcomS

main

Parser Mesher T solverStokessolver

Output

Page 8: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

Pyre version of CitcomS

Pythonbindings

RegionalModule.so(a shared object)

Mesher T solverStokessolver

Output

Components(Python)

regionalcitcoms.py

Mesher.py Vsolver.py TSolver.py Ouput.py

Page 9: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

CitcomS.py as a single component

Page 10: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

Coupling With Pyre

Fine-Grid Exchanger

Fine-Grid Solver

Coarse-Grid Exchanger

Coarse-Grid Solver

Controller Layout

CoupledApplication

Page 11: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

Regional and Global Mantle Flow Coupled with Pyre

CitcomS.py, Eh Tan

Page 12: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

CitcomS.py, Eh Tan

Regional CitcomS coupled to full CitcomS

QuickTime™ and aGIF decompressor

are needed to see this picture.

Page 13: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

Predictions: Hot-spot track & synthetic tomography

Page 14: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

Example: Mantle convection coupled to lithosphere

•Monitor Simulation•Couple Fluid to Solid•Visualization

Self-contained geophysics (single phyiscs)Rheology modules

Mesher: Solid & FluidSolver: Solid & Fluid

Superstructure

Geodynamic Specific

Infrastructure

Library: PETSc, BLAS, MPI

Page 15: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

Example of Geodynamic Specific & Infrastructure Layers

SNARK -- particle based FEM with implicit solverSNAC -- Lagragian explicit FEM

StGermain: A framework with entry points & plugins for: building meshes, advecting particles, calling solvers, I/O…..

Geodynamic Specific

Infrastructure

Library: PETSc, MPI

Page 16: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

Example of Geodynamic Specific & Infrastructure Layers

SNARK -- particle based FEM with implicit solverSNAC -- Lagragian explicit FEM

StGermain: A framework with entry points & plugins for: building meshes, advecting particles, calling solvers, I/O…..

Geodynamic SpecificSNARK: Monash group (Moresi)SNAC: Caltech/Texas groups (Gurnis, Lavier)

Infrastructure:Software Engineers at theVictorian Partnership for Advanced Computing(Steve Quenette Team Leader)

Page 17: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

SNARK & SNAC

Moresi et al. Choi et al.

StGermain: A framework with entry points & plugins for: building meshes, advecting particles, calling solvers, I/O…..

Quenette et al.

Page 18: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

Examples of coupling codes with Pyre (“superstructure” framework): GeoFramework

Pyre

CitcomS SNAC pHMeltsa

geophysics solver

Exchanger

Page 19: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

SNAC CitcomS coupling (Crust-Mantle Interaction)

Eun-seo Choi et al.QuickTime™ and aGIF decompressor

are needed to see this picture.

Page 20: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

Advantages:

pHMelts uses trace element partitioning to distribute water between the system and the nominally anhydrous minerals (NAM)

Major and trace element information can be collected

Both hydrous and nominally anhydrous phases can be handled in a single model

Output: mineral stability, mineral chemistry (major and trace element), melt presence and chemistry, phase proportions, water content in NAM, free water presence and normalized amount

pHMelts petrological model(Asimow et al., 2004)

Page 21: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

17,000 particles

Each particle holds Each particle holds chemical information, which chemical information, which

can be translated into can be translated into petrological data by petrological data by

pHMeltspHMelts

The particles are advected The particles are advected along streamlines, and the along streamlines, and the

(P,T) conditions of the (P,T) conditions of the particles are mapped from particles are mapped from

the flow modelthe flow model

Baker, Hall, Smith, Asimow, & Gurnis

Page 22: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

(1) Initial viscosity structure(1) Initial viscosity structure (2) Viscosity structure (2) Viscosity structure calculated after slab-calculated after slab-

water influxwater influx

Page 23: GeoFramework: Example of using frameworks in geophysics CIG/IRIS Computational Seismology Workshop June, 2005 Mike Gurnis Caltech

Some lessons for other geophysicists

• Frameworks, both higher level like Pyre and lower level like StGermain, show enormous potential for Earth science problems

• We’ve now been able to start to address more complex multi-physics and multi-scale problems -- problems long recognized to be important but previously intractable

• It is possible, in some cases, to effectively reengineer codes so that they can be used in frameworks

• Working geophysicists can effectively collaborate with software engineers.