qimpy.mpi.TaskDivisionCustom

class TaskDivisionCustom(*, n_mine, comm)

Bases: TaskDivision

Customized division of a number of tasks over MPI.

Parameters
  • n_mine (int) –

  • comm (Optional[Comm]) –

__init__(*, n_mine, comm)

Initialize given local number of tasks on each processes.

Parameters
  • n_mine (int) –

  • comm (Optional[Comm]) –

Return type

None

Methods

__init__

Initialize given local number of tasks on each processes.

is_mine

Return whether current process is responsible for task i

whose

Return process index i_proc responsible for task i

whose_each

Return process index i_proc responsible for each task in i

Attributes

n_each_custom

Custom number of tasks on each process

whose(i)

Return process index i_proc responsible for task i

Parameters

i (int) –

Return type

int

n_each_custom: ndarray

Custom number of tasks on each process