Design and Performance of the MPAS-A Non-hydrostatic atmosphere model

Slides:



Advertisements
Similar presentations
A Workflow Engine with Multi-Level Parallelism Supports Qifeng Huang and Yan Huang School of Computer Science Cardiff University
Advertisements

Weather Research & Forecasting: A General Overview
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
OpenMP Optimization National Supercomputing Service Swiss National Supercomputing Center.
Structured Design. 2 Design Quality – Simplicity “There are two ways of constructing a software design: One is to make it so simple that there are obviously.
1 Coven a Framework for High Performance Problem Solving Environments Nathan A. DeBardeleben Walter B. Ligon III Sourabh Pandit Dan C. Stanzione Jr. Parallel.
Parallelizing stencil computations Based on slides from David Culler, Jim Demmel, Bob Lucas, Horst Simon, Kathy Yelick, et al., UCB CS267.
Adding scalability to legacy PHP web applications Overview Mario A. Valdez-Ramirez.
1 Software & Grid Middleware for Tier 2 Centers Rob Gardner Indiana University DOE/NSF Review of U.S. ATLAS and CMS Computing Projects Brookhaven National.
Network Management Overview IACT 918 July 2004 Gene Awyzio SITACS University of Wollongong.
CISC October Goals for today: Foster’s parallel algorithm design –Partitioning –Task dependency graph Granularity Concurrency Collective communication.
Technical Architectures
Reference: Message Passing Fundamentals.
CSE351/ IT351 Modeling And Simulation Choosing a Mesh Model Dr. Jim Holten.
Efficient Parallelization for AMR MHD Multiphysics Calculations Implementation in AstroBEAR.
Advance the understanding and the prediction of mesoscale precipitation systems and to promote closer ties between the research and operational forecasting.
Objectives Design Class Diagrams Issues in system design Generalization Review UML papers.
Template Development of a Plume-in-Grid Version of Global-through-Urban WRF/Chem Prakash Karamchandani, Krish Vijayaraghavan, Shu-Yun Chen ENVIRON International.
1 ATPESC 2014 Vijay Mahadevan Tutorial Session for Scalable Interfaces for Geometry and Mesh based Applications (SIGMA) FASTMath SciDAC Institute.
The Design Discipline.
Components and Concurrency in ESMF Nancy Collins Community Meeting July 21, GMAO Seasonal.
© Crown copyright Met Office LFRic Coupling Requirements 3rd Workshop on Coupling Technologies for Earth System Models Steve Mullerworth April 22 nd 2015.
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 11 : Frameworks SWE 316: Software Design and Architecture  To understand.
Metadata for the Coupled Ocean/Atmosphere Mesoscale Prediction System (COAMPS) using the Earth System Modeling Framework (ESMF) Peter Bosler University.
Introduction to MDA (Model Driven Architecture) CYT.
Computational Design of the CCSM Next Generation Coupler Tom Bettge Tony Craig Brian Kauffman National Center for Atmospheric Research Boulder, Colorado.
A Metadata Based Approach For Supporting Subsetting Queries Over Parallel HDF5 Datasets Vignesh Santhanagopalan Graduate Student Department Of CSE.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 09. Review Introduction to architectural styles Distributed architectures – Client Server Architecture – Multi-tier.
Pursuing Faster I/O in COSMO POMPA Workshop May 3rd 2010.
Interfacing Registry Systems December 2000.
The Fujin Development of Parallel Coupler Takashi Arakawa Research Organization for Information Science & Technology.
Selected Topics in Software Engineering - Distributed Software Development.
© 2012 xtUML.org Bill Chown – Mentor Graphics Model Driven Engineering.
CESM/ESMF Progress Report Mariana Vertenstein NCAR Earth System Laboratory CESM Software Engineering Group (CSEG) NCAR is sponsored by the National Science.
Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen
© 2004 Mercury Computer Systems, Inc. FPGAs & Software Components Graham Bardouleau & Jim Kulp Mercury Computer Systems, Inc. High Performance Embedded.
The european ITM Task Force data structure F. Imbeaux.
Assessing the influence on processes when evolving the software architecture By Larsson S, Wall A, Wallin P Parul Patel.
Earth System Modeling Framework Status Cecelia DeLuca NOAA Cooperative Institute for Research in Environmental Sciences University of Colorado, Boulder.
Distributed Information Systems. Motivation ● To understand the problems that Web services try to solve it is helpful to understand how distributed information.
1 1 What does Performance Across the Software Stack mean?  High level view: Providing performance for physics simulations meaningful to applications 
Portable Infrastructure for the Metafor Metadata System Charlotte Pascoe 1, Gerry Devine 2 1 NCAS-BADC, 2 NCAS-CMS University of Reading PIMMS provides.
Manno, , © by Supercomputing Systems 1 1 COSMO - Dynamical Core Rewrite Approach, Rewrite and Status Tobias Gysi POMPA Workshop, Manno,
Earth System Modeling Framework Python Interface (ESMP) October 2011 Ryan O’Kuinghttons Robert Oehmke Cecelia DeLuca.
Introduction to OpenMP Eric Aubanel Advanced Computational Research Laboratory Faculty of Computer Science, UNB Fredericton, New Brunswick.
ATmospheric, Meteorological, and Environmental Technologies RAMS Parallel Processing Techniques.
I/O for Structured-Grid AMR Phil Colella Lawrence Berkeley National Laboratory Coordinating PI, APDEC CET.
CCA Common Component Architecture CCA Forum Tutorial Working Group CCA Status and Plans.
Progress on Component-Based Subsurface Simulation I: Smooth Particle Hydrodynamics Bruce Palmer Pacific Northwest National Laboratory Richland, WA.
Parallelization Strategies Laxmikant Kale. Overview OpenMP Strategies Need for adaptive strategies –Object migration based dynamic load balancing –Minimal.
ESMF,WRF and ROMS. Purposes Not a tutorial Not a tutorial Educational and conceptual Educational and conceptual Relation to our work Relation to our work.
An update on BFG, The Bespoke Framework Generator Graham Riley (& Rupert Ford, STFC) Coupling Workshop Boulder, Colorado - February 20 th -22 nd.
Lecture VIII: Software Architecture
1 Rocket Science using Charm++ at CSAR Orion Sky Lawlor 2003/10/21.
Slide 1 NEMOVAR-LEFE Workshop 22/ Slide 1 Current status of NEMOVAR Kristian Mogensen.
C OMPUTATIONAL R ESEARCH D IVISION 1 Defining Software Requirements for Scientific Computing Phillip Colella Applied Numerical Algorithms Group Lawrence.
Predictive Load Balancing Using Mesh Adjacencies for Mesh Adaptation  Cameron Smith, Onkar Sahni, Mark S. Shephard  Scientific Computation Research Center.
Toward a Distributed and Parallel High Performance Computing Environment Johan Carlsson and Nanbor Wang Tech-X Corporation Boulder,
Towards a High Performance Extensible Grid Architecture Klaus Krauter Muthucumaru Maheswaran {krauter,
Application of Design Patterns to Geometric Decompositions V. Balaji, Thomas L. Clune, Robert W. Numrich and Brice T. Womack.
GMAO Seasonal Forecast
Parallel Programming By J. H. Wang May 2, 2017.
Storage Virtualization
Component Frameworks:
Joint GEOS-Chem and NCAR Modeling Workshop:
WRF-GC: on-line two-way coupling of WRF and GEOS-Chem
Analysis models and design models
An Introduction to Software Architecture
Chapter 15: File System Internals
Parallel Programming in C with MPI and OpenMP
Presentation transcript:

Design and Performance of the MPAS-A Non-hydrostatic atmosphere model Michael Duda1 and Doug Jacobsen2 1National Center for Atmospheric Research*, NESL 2Los Alamos National Laboratories, COSIM *NCAR is funded by the National Science Foundation

WHAT IS the Model for Prediction across scales? A collaboration between NCAR (MMM) and LANL (COSIM) to develop models for climate, regional climate, and NWP applications: MPAS-Atmosphere (NCAR) MPAS-Ocean (LANL) MPAS-Ice (LANL) MPAS framework, infrastructure* (NCAR, LANL) These models use a centroidal Voronoi tessellation (CVT) with a C-grid staggering for their horizontal discretization *The MPAS infrastructure handles general (conformal?) unstructured horizontal grids! Prognostic velocities are velocities normal to cell faces (“edges”) at the point where the edge intersects the arc joining cells on either side from Ringler et al. (2008)

MPAS software architecture Driver layers – The high-level DRIVER calls init, run, finalize methods implemented by the core-independent SUBDRIVER; DRIVER can be replaced by a coupler, and SUBDRIVER can include import and export methods for model state 2. MPAS core – The CORE contains science code that performs the computational work (pre-, post-processing, model time integration, etc.) of MPAS; each core’s implementation lives in a separate sub-directory and is selected at compile-time 3. Infrastructure – The infrastructure provides data types used by the core and the rest of the model infrastructure, communication, I/O, and generic computational operations on CVT meshes such as interpolation Arrows indicate interaction between components of the MPAS architecture

Parallel decomposition The dual mesh of a Voronoi tessellation is a Delaunay triangulation – essentially the connectivity graph of the cells Parallel decomposition of an MPAS mesh then becomes a graph partitioning problem: equally distribute nodes among partitions (give each process equal work) while minimizing the edge cut (minimizing parallel communication) Graph partitioning We use the Metis package for parallel graph decomposition Currently done as a pre-processing step, but could be done “on-line” Metis also handles weighted graph partitioning Given a priori estimates for the computational costs of each grid cell, we can better balance the load among processes

Parallel decomposition (2) Given an assignment of cells to a process, any number of layers of halo (ghost) cells may be added Block of cells owned by a process Cells are stored in a 1d array (2d with vertical dimension, etc.), with halo cells at the end of the array; the order of real cells may be updated to provide better cache re-use Block plus one layer of halo/ghost cells With a complete list of cells stored in a block, adjacent edge and vertex locations can be found; we apply a simple rule to determine ownership of edges and vertices adjacent to real cells in different blocks Block plus two layers of halo/ghost cells

Model infrastructure DDTs: The MPAS infrastructure contains definitions for derived data types domain encapsulates complete state of computational domain for a process block contains model fields, mesh description, and parallel information for a single block field stores single field’s data and metadata on a single block Dimensions, dimension names, allocation status, halo info, pointer to next block for the field, etc. MPAS model core ultimately uses field array component directly from field types dminfo contains MPI communicator and other information used by PARALLELISM parinfo contains information about which cells/edges/vertices in a mesh are in a the halo region, etc.

Model infrastructure I/O: Provides parallel I/O through an API that uses infrastructure DDTs High-level interface for creating “streams” (groups of fields that are read/written at the same time from/to a file) Underlying I/O functionality is provided by CESM’s PIO PARALLELISM: Implements operations on field types needed for parallelism E.g., add halo cells to a block, halo cell update, all-to-all Callable from either serial or parallel code (no-op for serial code) For multiple blocks per process, differences between shared-memory and MPI are hidden OPERATORS: Provides implementations of general operations on CVT meshes Horizontal interpolation via RBFs, 1d spline interpolation Ongoing work to add a generic advection operator for C-grid staggered CVTs

Use of blocks in an MPAS model core Besides blocks themselves, the types within blocks are also joined into linked lists Infrastructure routines can be called with the, e.g., the field from the head of the list, and all blocks for that field can be operated upon The developer of an MPAS core must take care to properly support multiple blocks per process

The MPAS registry The need to support different cores in the MPAS framework suggests that the developer of a core would need to write “copy-and-paste” code to handle aspects of each field such as: Field definition Allocation/deallocation of field structures Halo setup I/O calls

The MPAS Registry MPAS has employed a computer-aided software engineering tool (the “registry”) to isolate the developer of a core from the details of the data structures used inside the framework An idea borrowed from the WRF model (Michalakes (2004)) The Registry is a “data dictionary”: each field has an entry providing meta-data and other attributes (type, dims, I/O streams, etc.) Each MPAS core is paired with its own registry file At compile time, a small C program is first compiled; the program runs, parses registry file, and generates Fortran code Among other things, creates code to allocate, read, and write fields For dynamics-only non-hydrostatic atmosphere model, Registry generates ~23,200 lines of code vs 5100 lines hand-written for dynamics and 23,500 lines hand-written for infrastructure

Role of the registry in coupling The registry can generate more than just Fortran code – anything we’d like it to generate based on registry entries, in fact! Information for meta-data driven couplers Documentation (similar idea to doxygen for generating source-code documentation) The syntax of the MPAS registry files is easily changed or updated Could be extended to permit additional attributes and metadata We’re considering a new format for the registry files to accommodate richer metadata field { name:u dimensions:nVertLevels,nCells units:”m s-1” description:”normal velocity on cell faces” coupled-write:true coupled-read:needed }

60-km mesh, yellowstone and bluefire MPAS-A scalability The full MPAS-A solver (physics+dynamics, no I/O) achieves >75% efficiency down to about 160 owned cells per MPI task MPI tasks Cells per task Speedup Efficiency 16 10240 1.00 100.00% 32 5120 1.97 98.40% 64 2560 3.90 97.49% 128 1280 7.67 95.88% 256 640 14.65 91.57% 512 320 27.56 86.12% 1024 160 48.49 75.77% 2048 80 85.21 66.57% 4096 40 151.43 59.15% MPAS-A scaling 60-km mesh, yellowstone and bluefire MPAS-A scaling – 60-km mesh, yellowstone

MPAS-A scalability Halo communication (“comm”) accounts for a rapidly growing share of the total solver time Physics are currently all column-independent and scale almost perfectly Redundant computation in the halos limit scalability of the dynamics MPAS-A (60-km mesh, yellowstone) timing breakdown Lower bound for the number of ghost cells in two halo layers, Ng, is where No is the number of owned cells No = 80 -> Ng = 76 No = 40 -> Ng = 57

Strategies for minimizing communication costs Aggregate halo exchanges for fields with the same stencil Not currently implemented In MPAS-A, limited areas where we exchange multiple halos at the same time; restructuring of the solver code might help Use one MPI task per shared-memory node, and assign that task as many blocks as there are cores on the node Supported already in the MPAS infrastructure Initial testing underway in MPAS-O and the MPAS shallow water model; block loops parallelized with OpenMP Overlap computation and communication by splitting halo exchanges into a begin phase and an end phase with non-blocking communication Prototype code has been written to do this; looks promising Restructuring of the MPAS-A solver might improve opportunities to take advantage of this option At odds with aggregated halo exchanges?

Summary MPAS is a family of Earth-system component models sharing a common software framework Infrastructure should be general enough for most horizontally unstructured (conformal?) grids Extensive use of derived types enable simple interfaces to infrastructure functionality Besides PIO, we’ve chosen to implement functionality “from scratch” The Registry mechanism in MPAS could be further leveraged for maintenance of metadata and coupling purposes We’re just beginning to experiment with new approaches to minimizing communication costs in the MPAS-A solver Any improvements to infrastructure can be leveraged by all MPAS cores