Replacing legacy Fortran in a hydroelectrical critical system

07/27/2023, 7:00 PM — 7:30 PM UTC
32-123

Abstract:

Hydro-Quebec is a public electricity utility for the province of Quebec in Canada. Its demand forecast team has been working for decades with Fortran models used daily in a critical system. Julia was selected as the replacement for Fortran. An optimisation library with call-backs was converted to Julia. The Julia version of the library is exempt of Fortran interface, and we present how the Fortran applications are modified to call either version of the library as to compare their behaviours.

Description:

Hydro-Quebec is the main public electricity utility for the province of Quebec. Its demand forecast team has been working for decades with Fortran coded models. Julia was selected as the replacement for Fortran. Since those models are used daily in a critical system and history vouches for their reliability, great care will be taken to ensure the quality of the Julia replacements. The first step undertaken in this transition is to replace one of the optimisation libraries, ENLSIP, written in the 80’s. This is a least square error minimisation library for non-linear equations with non-linear constraints. Conversion and upgrade of that library is in the process but before improving the optimisation process, current efforts are made to ensure that the Julia version reproduces the original Fortran version. To that effect, Julia-Fortran interface is used to create a Julia application that allows to compare both versions of the library in context of the calling applications, still in Fortran. The talk will describe the intertwining of Fortran and Julia as the optimisation library is provided with call back functions to calculate the errors and derivates. In a nutshell, Julia calls Fortran that calls Julia which calls Fortran. This approach isolated the Julia version of the library which can be called by a Julia application devoid of Fortran code as the callback subroutines were wrapped in Julia. An example stripped of the proprietary code illustrating the handling of data and functions will be made public. We will also cover in the talk the tests methodology and graphical tools used to analyze the search space.

Platinum sponsors

JuliaHub

Gold sponsors

ASML

Silver sponsors

Pumas AIQuEra Computing Inc.Relational AIJeffrey Sarnoff

Bronze sponsors

Jolin.ioBeacon Biosignals

Academic partners

NAWA

Local partners

Postmates

Fiscal Sponsor

NumFOCUS