Faster

Increasing ICON’s model resolution and thus explicitly resolving a greater bandwidth of physical processes (Better) brings a higher demands for computing capacity. Fortunately, recent years have recent significant leaps in HPS performance – to effectively leverage such advances, the Faster module reconfigures ICON’s code base to enable faster run-times. Constructing a more nimble and clear cut code structure will also allow for an easier integration of external components, thus smoothing possibilities for future collaborations and model enhancements.

In this context, the Faster module critically restructures ICON’s architecture into a more agile and scalable version. Transitioning from a monolithic code structure to a more modular one (blogpost) makes it possible to more easily add, remove or replace individual components without affecting the entire model architecture. Overall, this significantly improves the speed and flexibility with which model developments can be both tested and integrated. Together, these steps lead toward the central goal of the Faster module, which is to deliver a first release of ICON-consolidated.

To persue this goal in the most optimal way Faster is split into four activity groups which are named for the different phases of a spaceship launch. Mission control will monitor the overall ICON development and connect to the other WarmWorld modules. Ignitions goal is to change the current structure of the ICON code so it can be better implemented on modern HPC systems. Lift-Off will enlarge the capabilities for simulations in Better by opening ICON for next-generation HPC systems and scalable development. Finally Stage Separation will eventually introduce an ICON version that is able to extend its development to other programming languages, event-driven programming and external model components by using the principle of a modular design.

The WarmWorld Module Faster officially started on 01.09.2022 and is coordinated by DKRZ. Further Project partners are the Alfred-Wegener-Institut Helmholtz Zentrum für Polar- und Meeresforschung, Deutscher Wetterdienst, European Centre for Medium-Range Weather Forecasts, Forschungszentrum Jülich, Karlsruher Institut für Technologie and the Max-Planck-Institut für Meteorologie

Project partners:

How Librarization Can Make ICON More Modular

ICON is a very efficient model which can be run on supercomputers to produce forecasts for long periods of time, making it well-suited for climate research as well as for operational weather prediction. The ICON model is monolithic in nature. It is a single, large program with convoluted dependencies, which makes the code difficult to understand and maintain. One of the key objectives within the WarmWorld-Faster project is to address this issue by developing a more modular code base under the ongoing effort of ‘Modularization’. The key steps involve breaking the model code down into smaller, more manageable component modules that can be developed and tested independently. This will make improving the model and adding new features easier. Additionally, the modular structure of ICON will improve scalability and allow for the model’s implementation on larger computing facilities. This article does not delve deeper into the specifics of ‘Modularisation’; instead, the focus here is to discuss how the dependencies of the new ‘modules’ on the ICON model code are resolved through the ‘Librarization’ efforts.

Within the developmental framework of ICON, the term ‘Librarization’ was coined to describe efforts of creating external shared libraries made up of model components. These ’libraries’ are not directly related to the physics behind Numerical Weather Prediction (NWP) or climate modelling but are still essential to it.

The external shared libraries created through ‘Librarization’ are foundational to ICON, which are now extracted from the model code. The selection of library routines is based on the dependencies that the newly refactored ‘modules’ would have on the basic routines of ICON. These new shared libraries make the underlying routines available externally. Therefore, the ‘modules’ will not have any problem accessing them without having any explicit dependence on the model code of ICON. The dependency that the model code has on these library routines stays as it was before the extraction.

The shared libraries created within this ‘Librarization’ effort are currently divided into two groups.

  • The first group, also known as the ‘Level One’ libraries, are the ones which are more or less ICON-agnostic. Utility functions to support Fortran implementation within ICON put together in a library are examples of these libraries. These are already made available under the name ‘fortran-support’. Other libraries of this category include utility functions to support mathematical operations and physics needed for ‘Modularization’. They are presently under development and will become available soon.
  • The second group of ‘Level Two’ libraries are more specific to ICON as they use the same data structure as ICON. Interpolation, calculation of gradients and similar mathematical functionalities are put together to create math-libraries under this category. Contents of these math-libraries are essential for the development of independent component modules. Additionally, a new library interface is also built to facilitate access to highly structured variables within ICON without exposing the full data structure.

The old routines from ICON are refactored before they are extracted to external libraries so that they can work without any dependence on ICON. This important step also reduces the number of movable files in this process and keeps core ICON-specific files inside the model code. While creating these libraries, it is crucial to ensure that these developments do not adversely affect the performance of the software, and several steps have been taken to achieve that. These new shared libraries have also been proven to be a useful platform for successfully testing new CMake-based build-system and unit testing, two important technical features essential for any software development. This forms the first step toward incorporating new features into ICON. While the introduction of the CMake-base build-system will make the compilation of the code more efficient, unit tests can detect flaws in the code at an earlier stage of development.

To conclude, external shared libraries, developed under the ‘Librarization’ effort, have emerged as a key part of the WarmWorld-Faster project. These libraries will help build new component modules to improve ICON and make it more efficient for the user. Moreover, further algorithmic development within these libraries also has the potential to positively impact the model code.