MPI¶
-
class
dolfin.cpp.common.MPI¶ Bases:
objectThis class provides utility functions for easy communication with
MPIand handles cases when DOLFIN is not configured withMPI.-
static
MPI_AVG()¶
-
static
all_gather()¶ Gather values, one primitive from each process (MPI_Allgather). Specialization for std::string
Parameters: - comm (MPI_Comm) –
- std::string & in_values (const) –
- std::string > & out_values (std::vector<) –
Return type: void
-
static
avg()¶ Return average across comm; implemented only for T ==
Table.Parameters: - comm (MPI_Comm) –
- T & value (const) –
Return type: T
-
static
barrier()¶ Seta barrier (synchronization point)Parameters: comm (MPI_Comm) – Return type: void
-
static
compute_local_range()¶ Return local range for given process, splitting [0, N - 1] into
sizeportions of almost equal sizeParameters: Return type: std::pair< std::int64_t, std::int64_t >
-
static
gather()¶ Gather strings on one process.
Parameters: - comm (MPI_Comm) –
- std::string & in_values (const) –
- std::string > & out_values (std::vector<) –
- int receiving_process (unsigned) –
Return type: void
-
static
global_offset()¶ Find global offset (index) (wrapper for MPI_(Ex)Scan with MPI_SUM as reduction op)
Parameters: Return type: std::size_t
-
static
index_owner()¶ Return which process owns index (inverse of local_range)
Parameters: - comm (MPI_Comm) –
- index (std::size_t) –
- N (std::size_t) –
Return type: unsigned int
-
static
is_broadcaster(comm: dolfin.cpp.common.MPI_Comm) → bool¶ Determine whether we should broadcast (based on current parallel policy)
Parameters: comm (MPI_Comm) – Return type: bool
-
static
is_receiver(comm: dolfin.cpp.common.MPI_Comm) → bool¶ Determine whether we should receive (based on current parallel policy)
Parameters: comm (MPI_Comm) – Return type: bool
-
static
local_range()¶ Return local range for given process, splitting [0, N - 1] into
sizeportions of almost equal sizeParameters: Return type: std::pair< std::int64_t, std::int64_t >
-
static
max()¶ Return global max value.
Parameters: - comm (MPI_Comm) –
- T & value (const) –
Return type: T
-
static
min()¶ Return global min value.
Parameters: - comm (MPI_Comm) –
- T & value (const) –
Return type: T
-
static
rank()¶ Return process rank for the communicator.
Parameters: comm (MPI_Comm) – Return type: unsigned int
-
static
size()¶ Return size of the group (number of processes) associated with the communicator
Parameters: comm (MPI_Comm) – Return type: unsigned int
-
static
sum()¶ Sum values and return sum.
Parameters: - comm (MPI_Comm) –
- T & value (const) –
Return type: T
-
thisown¶ The membership flag
-
static