This chapter covers parallel computing and the module mpi4py. Complex and time-consuming computational tasks can often be divided into subtasks, which can be carried out simultaneously if there is capacity for it. When these subtasks are independent of each other, executing them in parallel can be especially efficient. Situations where subtasks have to wait until another subtask is completed are less suited for parallel computing.
Consider the task of computing an integral of a function by a quadrature rule:
with . If the evaluation of  is time-consuming and  is large , it would be advantageous to split the problem into two or several subtasks of smaller size:
                       ...