How can a problem be split into smaller pieces that can be executed in parallel? How to do it efficiently? These are the key questions when designing a parallel algorithm. …
In this exercise you learn how to write the simplest possible MPI program. Source code for this exercise is located in mpi/hello-world/ Write a parallel Python program using MPI that …
In MPI, a parallel program is executed as a set of independent processes. In this video we illustrate in more detail the execution and data model in MPI.
Message Passing Interface (MPI) is an application programming interface (API) for communication between separate processes. MPI programs are extremely portable and can have good performance even on the largest of …
Parallel processing is normally based either on using multiple processes or multiple threads. In this video we discuss the most important differences between them.
Before beginning to program for parallel computers, we need to start with few basic concepts. Computing in parallel The underlying idea in parallel computing is that the computational problem can …
We hope that you have enjoyed the third week of Python in High Performance Computing! This week, we have discussed Cython, optimising static compiler for Python. By adding static type …
Using Fortran in heat equation solver The code for this exercise is located under interface/fortran. ~/hpc-python$ cd interface/fortran The file evolve.f90 contain a pure Fortran implementation of thesingle time step …
Fortran is still a widely used programming language in scientific computing and it is actually well suited for numerically intensive applications. Utilising Fortran code from Python is one plausible way …
As Cython code compiles down to C code, it is relatively straightforward to utilize also Cython for interfacing with C. In order to use C functions and variables from the …
Many high-performance libraries have nowadays also Python interfaces, and can thus be used directly from Python code. However, sometimes one might want to utilize a library that does not have …
Using C code in the heat equation The code for this exercise is located under interface/c. ~/hpc-python$ cd interface/c Using cffi The files evolve.h and evolve.c contain a pure C …
As the first rule of optimization is to measure performance before starting any optimization work, one should have made profile of the pure Python code before starting any Cythonization. However, …
In this exercise you can practice different optimization techniques with the heat equation solver. The code for the exercise is located under under cython/heat-equation. Creating a Cython extension Write a …