Skip to content

Parallel-in-Time/time4apint

Repository files navigation

Call of PinTy : BlockOps

Motivations

Develop a python code based on a generic framework allowing to investigate and analyze the performance of iterative parallel-in-time (PinT) algorithms : blockops

In addition to this code, a website framework is provided to allow building of Application Webpage (or WebApp), that uses the code for specific applications and experiments.

See the current online demo website, that has a few WebApps implemented :

🔔 The WebApps are now under development : current will be improved, and other WebApps will be added soon ... Also note that most of the links below do not work on the website (yet), so you'll have to see this page on the github repository to follow them.

Base Convention

Represent an iterative PinT algorithm with a block iteration of the form

$$u_{n+1}^{k+1} = B_1^0 u_{n+1}^k + B_0^0 u_{n}^k + B_0^1 u_{n}^{k+1} + ...$$

with $B_i^j$ the block coefficient, built using one or a combination of block operators (addition, substraction, multiplication, inverse). For instance, looking at the Parareal algorithm, we have

$$u_{n+1}^{k+1} = (F - G) u_{n}^k + G u_{n}^{k+1},$$

with $F$ and $G$ the block operators. Then we have two block coefficients $B_0^0 = F-G$ and $B_0^1 = G$. Note that the same block operator can be present in several block coefficients.

🔔 Note : block coefficients indices don't depend on $k$ and $n$, but on the offset. Hence, $B_1^0$ is the block coefficient for the $u_{n+1}^{k+0}$ term, and the block coefficient for the $u_{n-1}^{k+1}$ term would then be $B_{-1}^{1}$.

Any combination of block operators can be seen as a unique block operator, hence a block coefficient is itself a combination of block operators and also a block operator. This aspect is fully used in the framework implementation.

Core Concepts

⚠️ As this project is currently in continuous development, this part may be partially incomplete or outdated. Don't hesitate to use the project's Discussions Forum to ask for more details.

  1. BlockOperator : base object, used to represents, manipulate and evaluate block operators and block coefficients. Implemented here, with some documentation details provided here.
  2. BlockIteration : object implementing a block iteration (i.e one given algorithm), using a given set of block coefficients. Implemented here, with some documentation details provided here.
  3. BlockProblem : object representing a given problem, i.e the numerical solution of the ODE problem represented as a linear system where each time solution is an unknown of the problem. Implemented here, with some documentation details provided here.
  4. Task Graph: TODO
  5. Schedule: TODO

📜 Important notes :

  • BlockOperator objects can be either symbolic or numerical block operator. Symbolic block operator only have a given cost and symbol, and can be used for speedup analysis. Numerical block operator have a cost and a matrix representation (more details here), and can be used for error and speedup analysis.
  • BlockIteration objects depend only on BlockOperator objects, and are enough alone o define and analyse the speedup of a given block iteration (if relying only on symbolic BlockOperator)
  • BlockProblem represent the time-integration of a Dahlquist problem on a given time interval with a given number of blocks. It defines the appropriate numerical BlockOperator, and can be used to generate some classical BlockIteration objects.

Project structure

Base library :

  • blockops : the main library developped for this project
  • old : some previous implementations (:ghost: to be integrated/removed later in the current code ...)

🔔 requires at minimum Python 3.10, check requirements.txt for packages dependencies

Scripts and Notebook

Those shows from basic to complexe usage example of the library. It uses relative symbolic link to the blockops directory, directly integrated in the following subdirectory, to avoid any modification of the local PYTHONPATH or else.

  • notebook : sub-directory for Jupyter Notebook. Those are basic examples that can be used for starters.
  • scripts : sub-directory for Python scripts. Those are more complex examples of use, with less documentation, mostly developped when a new functionnality is added to the blockops library.

Additional scripts :

  • main.py : some classical Block Iterations and their representation (:ghost: to be removed ...)
  • testing.py : some basic testing of the framework with Parareal (:ghost: to be removed ...)
  • test_FCF.py : some basic testing of the framework with FCF relaxation (:ghost: to be removed ...)

Acknowledgements

This repository results from a collaboration between University of Wuppertal (Jens HAHNE) and Hamburg University of Technology (Thibaut LUNET), as part of the Time-X project.

                 

This project has received funding from the European High-Performance Computing Joint Undertaking (JU) under grant agreement No 955701 (Time-X). The JU receives support from the European Union’s Horizon 2020 research and innovation programme and Belgium, France, Germany, and Switzerland. This project also received funding from the German Federal Ministry of Education and Research (BMBF) grant 16HPC048.

                 

Web Interface

You can run the website on your own computer : install the dependencies stated in the requirements.txt and then open a browser at 127.0.0.1:8000 after running

python web.py