QInchworm.mpi
QInchworm.mpi
— ModuleMPI-related utility functions.
QInchworm.mpi.ismaster
— Functionismaster() -> Bool
ismaster(comm::MPI.Comm) -> Bool
Check whether the calling process has the rank 0 within the group associated with the communicator comm
.
QInchworm.mpi.rank_sub_range
— Functionrank_sub_range(N::Integer; comm) -> UnitRange{Int64}
Split the range 1:N
between MPI processes in the communicator comm
as evenly as possible and return the sub-range 'owned' by the calling process.
QInchworm.mpi.all_gather
— Methodall_gather(subvec::Array{T, 1}; comm) -> Any
Perform the MPI collective operation Allgather
for vectors of elements of a generic type T
.
Parameters
subvec
: Subvector to be gathered.comm
: MPI communicator.
Returns
The gathered vector of the same element type T
.
QInchworm.mpi.all_reduce!
— Methodall_reduce!(
sbm::Dict{Int64, Tuple{Int64, Matrix{ComplexF64}}},
op;
comm
)
Perform the in-place MPI collective operation Allreduce
for a sector block matrix.
Parameters
sbm
: Sector block matrices to be reduced.op
: Reduction operation.comm
: MPI communicator.
Returns
The gathered vector of the same element type T
.