Saiph

Programming Models

Saiph is a Domain Specific Language developed at BSC for simulating physical phenomena modeled by Partial Differential Equations systems designed for users  that are not experts in numerical methods neither programming for supercomputers

Software Author: 

Sergi Mateo

Sandra Macià

Alejandro Fernández (former employee)

Research Lines:
Contacte:

pm-dsls@bsc.es

Primary tabs

Summary

What if you were able to simulate the world around you? Saiph is a Domain Specific Language developed at BSC for simulating physical phenomena modeled by Partial Differential Equations systems designed for users  that are not experts in numerical methods neither programming for supercomputers.

We expect to ease the development of scientist applications by allowing domain experts to transcribe their equations into Saiph code and then generating HPC-ready code that efficiently exploits the computational resources of modern heterogeneous supercomputers while dealing with all the specific aspects of solving partial differential equations systems.

To achieve that, Saiph provides a high-level syntax that directly maps with concepts of the domain, hiding from the user all the complexities related to the numerical methods. Users only have to translate their equations to our language and specify few things more; initial and boundary conditions, how to post-process data, etc. Later, this equation's system is solved in parallel by a supercomputer, distributing the work across several nodes (using MPI) and applying intra-node tecniques (using OpenMP/OmpSs) to achieve a high performance.

Main features
In this section we present the key features of our language.

 

Units type-checking

One of the main features of Saiph is that it has a representation for the different types of units of measurement. This information is used by our compiler to check the correctness of user's equations.
The user has to provide the units of the variables of their system and Saiph internally uses this information to verify that all the operators applied to these variables are valid, preventing users to do illegal operations such as adding together two different units (e. g. Meters + Seconds -> Error!).

 

Cartesian meshes & Terms
Currently, Saiph only works with 3D Cartesian meshes.
The unknowns of a system of equations are modeled in our language as Terms or Constants whose values are located at the nodes of the mesh.

 

Boundary conditions
Saiph supports a wide-range of boundary conditions:
• Periodic conditions to define cyclic volumes.
• Dirichlet conditions to force a value for a set of points of a Term.
• Neumann conditions to impose the value of the first-order spatial derivative for a set of points.
• Absorbing boundary conditions to simulate an infinite medium.

 

Supported operators
The next table shows the operators supported by Saiph:

Add operator Minus operator
Product operator Division operator
Component-wise product operator Unary minus operator
Exponential function Invert function
Sum operator Subscripting operator
First time derivatice First spatial derivative
Second time derivative Second spatial derivative
Gradient operator Divergence operator
Laplacian operator Component operator

 

 

 

 

 

 

 

 

 

 

 

 

 

Post-process phase

The post-process phase defines how the results of the simulation are sampled and in which data format the results are generated.

Supported sampling methods:

• Just final state of the simulation
• Take snapshoot each x steps
• Flush every computational step

Supported output formats:
• VTK images
• XDMF + Raw binary files

 

Some results

Here we present some VTK images of two examples of simulations performed using Saiph.

Fig1. Sound waves interacting between each others in a 3D space with Neumann boundary conditions

 

Fig2. Heat diffusion in an homogeneous 3D space with Dirichlet boundary condition at the bottom, simulating a constant hot temperature source.