Skip to content
/ dawn Public
forked from MeteoSwiss-APN/dawn

Compiler toolchain to enable generation of high-level DSLs for geophysical fluid dynamics models

License

Notifications You must be signed in to change notification settings

twicki/dawn

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dawn
Version Travis status License: MIT Documentation

Introduction

Dawn is a compiler toolchain for developing high-level DSLs for geophysical fluid dynamics models. A tutorial and reference documentation is provided here (or you can download it as a pdf here).

Motivation

Development productivity of large scientific codes, like geophysical fluid dynamics (GFD) models, decreased drastically in recent times due to the fact these community models often have to run efficiently on multiple computing architectures that impose the use of different programming models. Embedded domain specific languages (EDSLs) in C ++ have been used successfully in the past to enable a clear separation of concerns between the domain algorithms and the implementation strategy, thus allowing a single source code which is performance portable across heterogeneous architectures. Yet, using EDSLs in a correct and efficient manner often requires expert knowledge in high-performance computing. In addition, current DSLs are usually designed and developed for a specific scientific model with little to no reusability among DSLs.

We introduce a new compiler framework, Dawn, that decouples optimization and code generation from high level DSLs. By exposing a Stencil Intermediate Representation (SIR), we allow users to share the toolchain to optimize and generate code among several DSLs. This allows the design of expressive, concise DSLs that can focus on applicability and don't need to bother with the aspect of high-performance computing. Using Dawn as a common compiler infrastructure can drastically reduce development and maintenance effort, while increasing the performance of the generated code, for new and existing DSLs in the GFD model domain.

Core Features

  • Dawn allows the user to generate fast performing code for several back-ends from a relatively simple Stencil Intermediate Representation (SIR).
  • Dawn exposes several APIs in different languages (C++, Java, Python) to parse and process the SIR.
  • Dawn is able to generate code to be run on Distributed Memory Machines based on MPI, Machines with access to GPUs based on CUDA as well as naive C++ code with close to no parallelism for debugging.
  • Dawn offers a wide range of optimization and static analysis passes to guarantee correctness as well as performance of the generated parallel program.

Building

Dawn only depends on Protobuf (>= 3.4) and requires a C++11 compiler as well as CMake. To compile the library you need to point CMake to protobuf-config.cmake (the CMake configuration file of Protobuf). The following will install Dawn locally into <dawn-dir>/install/

git clone [email protected]:MeteoSwiss-APN/dawn.git
cd dawn
mkdir build && cd build
cmake .. -DProtobuf_DIR=<protobuf-dir>/lib/cmake/protobuf
make -j4
make install

For a more detailed guide on how to build Dawn (and Protobuf), see here.

Continuous Integration

Linux

Toolchain Config Status
GCC 5.4 Release GCC 5.4
GCC 5.4 RelWithDebInfo GCC 5.4
GCC 6.3 Release GCC 6.3
GCC 6.3 RelWithDebInfo GCC 6.3
Clang 3.8 Release Clang 3.8
Clang 3.8 RelWithDebInfo Clang 3.8
Clang 4.0 Release Clang 4.0
Clang 4.0 RelWithDebInfo Clang 4.0
Clang 5.0 Release Clang 5.0
Clang 5.0 RelWithDebInfo Clang 5.0

About

This project is funded by the PASCHA project and developed by ETH Zurich and MeteoSwiss. Significant contributions were made by Fabian Thuering (Master Thesis), Carlos Osuna and Tobias Wicky.

License

The full license can be found here.

This project is licensed under the terms of the MIT license.

About

Compiler toolchain to enable generation of high-level DSLs for geophysical fluid dynamics models

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 94.6%
  • CMake 2.8%
  • Python 1.2%
  • Other 1.4%