MPI

class dolfin.cpp.common.MPI(*args)

Bases: object

This class provides utility functions for easy communcation with MPI.

static barrier(*args)

Set a barrier (synchronization point)

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(N)

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

  • local_range(process, N)

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

  • local_range(process, N, num_processes)

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

static max(*args)

Return global max value

static min(*args)

Return global min value

static num_processes(*args)

Return number of processes

static process_number(*args)

Return proccess number

static sum(*args)

Sum values and return sum

thisown

The membership flag