diff --git a/docs.it4i/software/mpi/mpi4py-mpi-for-python.md b/docs.it4i/software/mpi/mpi4py-mpi-for-python.md index 08257005720a14d1431dfbb8871d38fcc469cd96..d5b2676d17a58f98516376dcde87bf7d4ae017fe 100644 --- a/docs.it4i/software/mpi/mpi4py-mpi-for-python.md +++ b/docs.it4i/software/mpi/mpi4py-mpi-for-python.md @@ -4,13 +4,13 @@ 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. -This package is constructed on top of the MPI-1/2 specifications and provides an object oriented interface which closely follows MPI-2 C++ bindings. It supports point-to-point (sends, receives) and collective (broadcasts, scatters, gathers) communications of any picklable Python object, as well as optimized communications of Python object exposing the single-segment buffer interface (NumPy arrays, builtin bytes/string/array objects). +This package is constructed on top of the MPI-1/2 specifications and provides an object-oriented interface, which closely follows MPI-2 C++ bindings. It supports point-to-point (sends, receives) and collective (broadcasts, scatters, gathers) communications of any picklable Python object, as well as optimized communications of Python object exposing the single-segment buffer interface (NumPy arrays, builtin bytes/string/array objects). MPI4Py is available in standard Python modules on the clusters. ## Modules -MPI4Py is build for OpenMPI. Before you start with MPI4Py you need to load Python and OpenMPI modules. +MPI4Py is built for OpenMPI. Before you start with MPI4Py, you need to load the Python and OpenMPI modules. ```console $ ml av Python/ @@ -36,19 +36,19 @@ OpenMPI/1.8.6-GNU-5.1.0-2.25 OpenMPI/1.8.8-GNU-5.1.0-2.25 OpenMPI/1.10.1-GN ## Execution -You need to import MPI to your python program. Include the following line to the python script: +You need to import MPI to your Python program. Include the following line to the Python script: ```python from mpi4py import MPI ``` -The MPI4Py enabled python programs [execute as any other OpenMPI][1] code.The simpliest way is to run +The MPI4Py-enabled Python programs [execute as any other OpenMPI][1] code. The simpliest way is to run: ```console $ mpiexec python <script>.py ``` -For example +For example: ```console $ mpiexec python hello_world.py @@ -106,7 +106,7 @@ $ ml OpenMPI $ mpiexec -bycore -bind-to-core python hello_world.py ``` -In this example, we run MPI4Py enabled code on 4 nodes, 16 cores per node (total of 64 processes), each python process is bound to a different core. More examples and documentation can be found on [MPI for Python webpage][a]. +In this example, we run MPI4Py-enabled code on 4 nodes, 16 cores per node (total of 64 processes), each Python process is bound to a different core. More examples and documentation can be found on [MPI for Python webpage][a]. ### Adding Numbers