aces workshopjun-031 access software system & high level modelling languages by...
TRANSCRIPT
![Page 2: ACES WorkshopJun-031 ACcESS Software System & High Level Modelling Languages by gross@access.edu.au](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f295503460f94c41e1d/html5/thumbnails/2.jpg)
ACES Workshop Jun-03 2
Modeling the Earth
• Short & medium-term processes– Interactive faults, earthquakes– Particle, FE methods, CA
• Long-term processes– Mantel convection– FEM & PIC
• Mineralization, surface processes (FEM)
• Coupling
![Page 3: ACES WorkshopJun-031 ACcESS Software System & High Level Modelling Languages by gross@access.edu.au](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f295503460f94c41e1d/html5/thumbnails/3.jpg)
ACES Workshop Jun-03 3
ACcESS
• Major National Research Facility (MNRF)– Hardware installation
• to provides sufficient compute power
– Software development• to develop tools and models
![Page 4: ACES WorkshopJun-031 ACcESS Software System & High Level Modelling Languages by gross@access.edu.au](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f295503460f94c41e1d/html5/thumbnails/4.jpg)
ACES Workshop Jun-03 4
ACcESS (cont.)
ESyS Software System
Hardware:1-2Tflops
OpenMP+MPI
Scripting language:algorithms & models
Middleware:data structures
Kernels (BLAS):performance
Terminal Grid/XMLACcESSScience
ResearchCommuity
![Page 5: ACES WorkshopJun-031 ACcESS Software System & High Level Modelling Languages by gross@access.edu.au](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f295503460f94c41e1d/html5/thumbnails/5.jpg)
ACES Workshop Jun-03 5
User’s Profile
• Modelers: mathematical background– Development environment
• Fast Prototyping
• Debugging
– Unified access to software tools
• High-end users: strong scope knowledge– Using tested models– set parameters via XML/GUI/web
![Page 6: ACES WorkshopJun-031 ACcESS Software System & High Level Modelling Languages by gross@access.edu.au](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f295503460f94c41e1d/html5/thumbnails/6.jpg)
ACES Workshop Jun-03 6
Components
ESyS: Python
Web Services Interactive
Models &High level algorithms
Data bases VisualizationMesh/Particle
GenerationDiscretization
GUI
![Page 7: ACES WorkshopJun-031 ACcESS Software System & High Level Modelling Languages by gross@access.edu.au](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f295503460f94c41e1d/html5/thumbnails/7.jpg)
ACES Workshop Jun-03 7
ESyS Functionality
• Interactive modelling environment in Python– platform and data structure independent
• Provides ‘templates’ for implementations – with lean interface– to generic tools: PDE solver, visualization– specific functionality: surface processes
• Coarse grain parallelization• Facilitates the coupling of models• Provides a Grid service(s)
![Page 8: ACES WorkshopJun-031 ACcESS Software System & High Level Modelling Languages by gross@access.edu.au](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f295503460f94c41e1d/html5/thumbnails/8.jpg)
ACES Workshop Jun-03 8
Discretization
ESyS
FEMMOP
PIC
DEM
ESyS-Finley:Data structure: array
ESyS-LSMEarthData structure: lists
CA
ESyS-CAData structure: array
![Page 9: ACES WorkshopJun-031 ACcESS Software System & High Level Modelling Languages by gross@access.edu.au](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f295503460f94c41e1d/html5/thumbnails/9.jpg)
ACES Workshop Jun-03 9
ESyS-Finley
• Realizes a general PDE solver for ESyS– 3D unstructured/structured grid FEM/PIC code – in C– parallelized & optimized for SGI Altix
• Application: – long scale processes– Interacting fault
• See also:– VECFEM: general, 3D, unstructured, parallel– FASTFLO
![Page 10: ACES WorkshopJun-031 ACcESS Software System & High Level Modelling Languages by gross@access.edu.au](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f295503460f94c41e1d/html5/thumbnails/10.jpg)
ACES Workshop Jun-03 10
A Simple Example
1820T
20T
Domain0n
TA 0
n
TA
.12
0
A
TATagged with 1
Tagged with 3
![Page 11: ACES WorkshopJun-031 ACcESS Software System & High Level Modelling Languages by gross@access.edu.au](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f295503460f94c41e1d/html5/thumbnails/11.jpg)
ACES Workshop Jun-03 11
Example
import Finleyimport OpenDXfrom ESyS import *# get meshmsh=Finley.Mesh(“file.msh”)# identify faces:top=msh.face([1])bottom=msh.face([3])# set values on the faces:tmpTp=Scalar(top.nodes(),value=20.)tmpBttm=Scalar(bottom.nodes(),value=1820.)# assemble and solve the PDEmat,rhs=Assemble(A=12.,c=[tmpTp,tmpBttm])T=mat.solve(rhs)# visualizationfig=OpenDX.Figure(msh)fig.addCarpet(T)
![Page 12: ACES WorkshopJun-031 ACcESS Software System & High Level Modelling Languages by gross@access.edu.au](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f295503460f94c41e1d/html5/thumbnails/12.jpg)
ACES Workshop Jun-03 12
assemble Method
• General interface:Assemble(A,B,C,D,X,Y,a,b,c)
– A: matrix or scalar (=diag(A)) or not present (=0)– B,C,X: vectors or not present (=0)– a,b,c: scalars or not present (=0)
![Page 13: ACES WorkshopJun-031 ACcESS Software System & High Level Modelling Languages by gross@access.edu.au](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f295503460f94c41e1d/html5/thumbnails/13.jpg)
ACES Workshop Jun-03 13
assemble (cont.)
• Coefficients can– constant/piecewise constant
or– depending on location
• live on nodes or elements
or– equal zero/not present
![Page 14: ACES WorkshopJun-031 ACcESS Software System & High Level Modelling Languages by gross@access.edu.au](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f295503460f94c41e1d/html5/thumbnails/14.jpg)
ACES Workshop Jun-03 14
Some relevant Class
Finley.Mesh
ESyS.Structure ESyS.Domain ESyS.Atoms
Region
Face
Points
Nodes
Elements
libFinley.so
inheritance
instantiate
access
generic
interfaces
implementationSciSL/BLAS
![Page 15: ACES WorkshopJun-031 ACcESS Software System & High Level Modelling Languages by gross@access.edu.au](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f295503460f94c41e1d/html5/thumbnails/15.jpg)
ACES Workshop Jun-03 15
Data
libnumarray.so
ESyS.Data
numarray
access to coefficients
Scalar
Vector
Tensor
Tensor4
inherits
Implemented by
libFinley.so
Finley.assemble
ESyS.assemble
![Page 16: ACES WorkshopJun-031 ACcESS Software System & High Level Modelling Languages by gross@access.edu.au](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f295503460f94c41e1d/html5/thumbnails/16.jpg)
ACES Workshop Jun-03 16
Another Example
import Finleyfrom ESyS import *lam,mu,dt=1.E12,0.1E5,0.1coeff=msh=Finley.Mesh(“file.msh”)dim=msh.getDim()top=msh.face([1])uAtTop=Vector(top.nodes(),value=[1,0])*dtuAtBottom=Vector(bottom.nodes(),value=[-1,0])*dt# initialize stress,displacement,times=Tensor(msh.elements(),Value=0.)d=Vector(msh.nodes(),Value=0.)t=0while t<1. mat,rhs=Assemble(A=coeff,X=s,c=[uAtTop,uAtBottom]) dd=mat.solve(rhs) g=gradient(dd) ds=lam*(g+transpose(g))/2+mu*trace(g)*Id(dim) s+=ds d+=dd t+=dt
![Page 17: ACES WorkshopJun-031 ACcESS Software System & High Level Modelling Languages by gross@access.edu.au](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f295503460f94c41e1d/html5/thumbnails/17.jpg)
ACES Workshop Jun-03 17
Operations on Data
• Binary operations:– arguments on the same Atoms or constant– add ,sub ,mult, div, power– in place: +=,-=,…
• Unitary operation– abs, cos, sin, transpose, trace, …
• Set & get slices/items: s=v[1], v[2]=s• In Finley: implemented through numarray
![Page 18: ACES WorkshopJun-031 ACcESS Software System & High Level Modelling Languages by gross@access.edu.au](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f295503460f94c41e1d/html5/thumbnails/18.jpg)
ACES Workshop Jun-03 18
Substitutes for Finley
• Candidates:– SNARK: for clusters, based of PETSc– GeoFEM: for the EarthSimulator
• no changes to the model codes
• has to pass the Finley test bed in Python.
![Page 19: ACES WorkshopJun-031 ACcESS Software System & High Level Modelling Languages by gross@access.edu.au](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f295503460f94c41e1d/html5/thumbnails/19.jpg)
ACES Workshop Jun-03 19
Beyond software integration
• Lazy evaluation of expressions– Replaces partially numarray– local evaluation => improves efficiency
• Expression differentials: non-linear problems
• Code generation• Nicer interface for assemble• …