Brussels / 3 & 4 February 2018


The Julia programming language

A look at arrays and Trilinos integration

The Julia programming language is a high-level language, primarily developed for scientific computing. It uses just-in-time compilation to get a performance level that is comparable to C/C++. It was designed to overcome the “two-language problem”, where a proof-of-concept in a high-level language needs to be translated to a compiled language by specialists to get the required performance. In this talk, the main features of the language will be highlighted from the perspective of a “convert” coming from C++ and with a focus on scientific programming aspects. As an application, arrays and the work on making parts of the Trilinos library available will be discussed.

In the first part of the talk, a general overview of Julia will be presented. Julia is a typed language, where users can build their own types and write functions that operate on them. In this system, there are no “privileged” types, i.e. user defined types are treated equally to predefined types. A central concept in the system is “multiple dispatch”, where the function that is to be called is decided based on the passed arguments, thus making it possible to overload existing functions for new types. The decision on what function to call can happen both dynamically and at compile time, depending on the information available at compile time. As will be shown, this system, while very simple on the surface, results in surprisingly elegant and fast code.

In the second part, a concrete example, based on my Trilinos.jl package, will illustrate how an existing HPC library can be leveraged from within Julia. Current focus is on making the Belos solvers from Trilinos available, using the Tpetra sparse matrix stack. Views into the C++ data are available using the native Julia array syntax. As a concrete example, we have a 2D laplace example that demonstrates low-level linear system assembly using Julia but at the same speed as C++.


Bart Janssens