• No results found

MOAB + Applications: Connecting, Data Sharing, etc.

N/A
N/A
Protected

Academic year: 2021

Share "MOAB + Applications: Connecting, Data Sharing, etc."

Copied!
11
0
0

Loading.... (view fulltext now)

Full text

(1)

MOAB + Applications:

Connecting, Data Sharing, etc.

Tim Tautges

Mathematics & Computer Science Division

Argonne National Laboratory

(2)

Outline

MOAB primer

Connecting to applications: Nek5000, UNIC

Data sharing

(3)

Mesh-Oriented datABase (MOAB)

Library for representing, manipulating structured, unstructured

mesh models

Supported mesh types:

– FE zoo (vertices, edges, tri, quad, tet, pyramid, wedge, knife, hex) – Polygons/polyhedra

– Structured mesh

Optimized for memory usage first, speed second

Implemented in C++, but uses array-based storage model

– Avoids C++ object-based allocation/deallocation

– Allows access in contiguous arrays of data ●

Mostly an ITAPS-like data model

– Entity, entity set, tag, interface ●

Mesh I/O from/to various formats

– HDF5 (custom), vtk, CCMIO (Star CD/CCM+), Abaqus, CGM, Exodus ●

Main parts:

– Core representation

(4)

4

MOAB Parallel Model

Each proc has one MOAB instance, which appears locally as a serial

mesh

• All serial MOAB function calls available locally

Parallel model based on element-based partition

• Each element contained in exactly one part (entity set), with vertices (& possibly elements) shared between processes but owned by one

• Arbitrary number of layers of ghost elements

Supported parallel mesh constructs:

• For each shared entity, every sharing proc knows all other sharing procs & handles on those

• Sharing data stored as either (proc,handle) or (procs[n]/handles[n])

• Shared/multishared/interface/owned status also stored (bitmask)

Parallel model usually initialized by loading from some decomposition

in file

• Can be any subset structure that’s a “covering” (each entity in exactly 1 subset)

• Material set, geometric volume, or Zoltan-generated partitioning

Single-file parallel read/write using parallel HDF5

(5)

MOAB Entity Storage

Entity Handle:

• Unsigned long type • Bitmask

• Sorts by dimension,

type 4-bit type 28-or 60-bit ID

EntitySequences:

Represent used portions of handle space  Have pointer to SequenceData

 Have start and end handle values  Arranged in binary tree by start handle

Typically one

EntitySequence for an entire SequenceData

SequenceData:

Represent allocated

portions of handle space

 Have start and end handle  Coordinates or Connectivity  Dense Tag Data

Connectivity array

(6)

6

Two Example Applications

Nek5000

UNIC

Physics

Incompressible NS

Neutron transport

Discretization

SEM

(NxNxN GLL basis)

FEM

(linear, quadratic)

Solver

Native semi-implicit

with AMG

3-level hierarchy

(power, energy, space/angle),

with PETSc for space/angle

Materials, BCs

User-defined

functions

ExodusII-like element blocks,

sidesets

Mesh type

Ucd hex

Ucd hex, tet, prism

Implementation

F77 + C

F90

Mesh, data storage

Common blocks

'include TOTAL'

F90 modules

Basic steps for MOAB-based execution:

– Import verts & elements, material types, boundary conditions – [Nek: Compute GLL points]

– Copy state vars to MOAB @ each timestep

(7)

Ordering Issues

● partition generated w/o regard to

material types

● element, set order from file, ghost

order from ghost exchange

● fluid elements first, then solid

elements

● one contiguous index space

● distinguish between “modeled” (has

non-ghost elems) and “unmodeled” (no non-ghost elems) ghost materials

elements material_set 2 1 3 1 vertices P0 ghosts

Serial/file:

P1 P2

MOAB/Parallel:

P0 P1 P2

Nek:

fluid solid P0 modeled P1 P2

UNIC:

unmodeled

(8)

Application-MOAB Solution Memory Sharing

Recent enhancement in MOAB allows applications to get pointer to

(dense & sparse) tag memory, connectivity, vertex coordinates

(9)

Application-MOAB Solution Memory Sharing

Recent enhancement in MOAB allows applications to get pointer to

(dense & sparse) tag memory, connectivity, vertex coordinates

Implemented as tag/connect/coord iterator over contiguous chunks:

Range::iterator iter = myrange.begin(); int count; double *data;

while (iter != myrange.end()) {

tag_iterate(tag_handle, iter, myrange.end(), count, (void*&)data_ptr ); iter += count;

}

In most cases, including parallel with ghosts, will have 1 chunk

– Each unique combination of (entity type, #verts/entity) is a separate chunk ●

Exposed in iMesh (as extension) too

pointer (rpxm1, xm1(lx1, ly1, lz1))

call iMesh_initEntArrIter(%VAL(imeshh), %VAL(rootset), %VAL(iBase_REGION), %VAL(iMesh_HEXAHEDRON),%VAL(num_hexes), iter, ierr)

(10)

10

Application-MOAB Solution Memory Sharing: Pros/Cons

Pros:

– Any mesh library-based services can operate with no data copying (solution transfer, parallel I/O, partitioning)

– Future advances possible & free once application is hooked up: in-situ viz (w/ help from LANL CESAR participants), many-core memory movement ●

Cons/questions

– Lower cache efficiency than globally-numbered DOFs ordered for locality (e.g. vertex-edge-face-element variables)

● How many apps order vertex-based and element-based variables together?

– May not work for dynamic mesh applications?

But, reordering/compression of handle/field space always necessary in

(11)

Going Forward

Working with LANL on vtk copy-less data arrays as part of CESAR

– Should allow in-situ viz out of the box

● Complication: visualizing higher-order fields stored in GLL basis...

Will start shortly on implementing petsc_vec interface on top of MOAB

tags

References

Related documents

(1) only during FORS observing runs; (2) for (U)BVRI filters only and under photometric conditions only; (3) internal accuracy - not considering instrumental flexures - see

GOOD SAMURAI HORSE Cannot sidestep, used to combat but unused to firearms. GOOD HORSE

development in Latin America: a case study in Chile. Elena Pisani and

RIPE 51/Oct 2005 14 Beyond Broadband Existing services: Bandwidth access Value-Added Services: Security, Personalization High-quality infrastructures for meeting various requirements

Most of the time Division II coaches start the recruiting process during the spring of a player’s junior year of high school or after the first season for a junior college

Abstract This work aims to characterize levels and phase distribution of polycyclic aromatic hydrocarbons (PAHs) in indoor air of preschool environment and to assess the impact

Fly ash was emitted from power plants located in Southern Poland, where Upper Silesian bituminous coal or bituminous coal/biomass fuel was combusted in di ff erent types of boilers

Impact of Inundation and Changes in Garrison Diversion Project Plans on the North Dakota Economy, Agricultural Economics Report No.. 127, Department