pylops_mpi.MPILinearOperator#

class pylops_mpi.MPILinearOperator(Op=None, shape=None, dtype=None, base_comm=<mpi4py.MPI.Intracomm object>)[source]#

MPI-enabled PyLops Linear Operator

Common interface for performing matrix-vector products in distributed fashion.

In practice, this class provides methods to perform matrix-vector and adjoint matrix-vector products between any pylops.LinearOperator (which must be the same across ranks) and a pylops_mpi.DistributedArray with Partition.BROADCAST and Partition.UNSAFE_BROADCAST partition. It internally handles the extraction of the local array from the distributed array and the creation of the output pylops_mpi.DistributedArray.

Note that whilst this operator could also be used with different pylops.LinearOperator across ranks, and with a pylops_mpi.DistributedArray with Partition.SCATTER, it is however reccomended to use the pylops_mpi.basicoperators.MPIBlockDiag operator instead as this can also handle distributed arrays with subcommunicators.

Parameters:
Oppylops.LinearOperator, optional

PyLops Linear Operator to wrap. Defaults to None.

shapetuple(int, int), optional

Shape of the MPI Linear Operator. Defaults to None.

dtypestr, optional

Type of elements in input array. Defaults to None.

base_commmpi4py.MPI.Comm, optional

MPI Base Communicator. Defaults to mpi4py.MPI.COMM_WORLD.

Methods

__init__([Op, shape, dtype, base_comm])

adjoint()

Adjoint MPI LinearOperator

conj()

Complex conjugate operator

dot(x)

Matrix Vector Multiplication

matvec(x)

Matrix-vector multiplication.

rmatvec(x)

Adjoint Matrix-vector multiplication.

transpose()

Transposition of MPI LinearOperator

Examples using pylops_mpi.MPILinearOperator#

CGLS Solver

CGLS Solver

Derivatives

Derivatives

MPILinearOperator

MPILinearOperator

Stacked Array

Stacked Array

Stacking Operators

Stacking Operators

Least-squares Migration

Least-squares Migration

Post Stack Inversion - 3D

Post Stack Inversion - 3D