Parallel Executing Python Scripts on Neumann

Using MPI4PY for executing pyhton scripts parallel on Neumann


MPI for Python provides bindings of the Message Passing Interface (MPI) standard for the Python programming language, allowing any Python program to exploit multiple processors.

MPI, the Message Passing Interface, is a standardized and portable message-passing system designed to function on a wide variety of parallel computers. The standard defines the syntax and semantics of library routines and allows users to write portable programs in the main scientific programming languages (Fortran, C, or C++).

MPI for Python enables the use of MPI for user-written python scripts.

See the documentation for help writting python scripts that are executable with MPI4PY: MPI4Py's Documentation

Requiered Modules

MPI4Py is installed as a python module on Neumann (for python3.6)

To execute python programms on Neumann with MPI following modules need to be loaded:

  • python/3.6
  • openmpi/gcc/64/1.8.4
    • make sure this is version 1.8.4, because MPI4PY was compiled with this version

sbatch script

Example python script

This example script parallelizes a for loop and gathers the results on the root process. The number of processes can be defined in the corresponding sbatch script.

Example MPI4Py Script

guide/neumann/parallel_executing_python_scripts_on_neumann.txt · Last modified: 2020/02/28 11:06 by franzsch
Back to top
CC Attribution-Share Alike 3.0 Unported = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0