MPI

class dolfin.cpp.common.MPI

Bases: object

This class provides utility functions for easy communication with MPI and handles cases when DOLFIN is not configured with MPI.

static barrier(*args)

Set a barrier (synchronization point)

static compute_local_range(*args)

Return local range for given process, splitting [0, N - 1] into size() portions of almost equal size

static gather(*args)

Overloaded versions

  • gather(comm, in_values, out_values, receiving_process=0)

    Gather values on one process

  • gather(comm, in_values, out_values, receiving_process=0)

    Gather strings on one process

static global_offset(*args)

Find global offset (index) (wrapper for MPI_(Ex)Scan with MPI_SUM as reduction op)

static index_owner(*args)

Return which process owns index (inverse of local_range)

static is_broadcaster(*args)

Determine whether we should broadcast (based on current parallel policy)

static is_receiver(*args)

Determine whether we should receive (based on current parallel policy)

static local_range(*args)

Overloaded versions

  • local_range(comm, N)

    Return local range for local process, splitting [0, N - 1] into size() portions of almost equal size

  • local_range(comm, process, N)

    Return local range for given process, splitting [0, N - 1] into size() portions of almost equal size

static max(*args)

Return global max value

static min(*args)

Return global min value

static rank(*args)

Return process rank for the communicator

static size(*args)

Return size of the group (number of processes) associated with the communicator

static sum(*args)

Sum values and return sum

thisown

The membership flag