qimpy.mpi.TaskDivisionCustom
- class TaskDivisionCustom(*, n_mine, comm)
Bases:
TaskDivisionCustomized division of a number of tasks over MPI.
- Parameters:
n_mine (int)
comm (Comm | None)
- __init__(*, n_mine, comm)
Initialize given local number of tasks on each processes.
- Parameters:
n_mine (int)
comm (Comm | None)
- Return type:
None
Methods
Initialize given local number of tasks on each processes.
is_mineReturn whether current process is responsible for task i
Return process index i_proc responsible for task i
whose_eachReturn process index i_proc responsible for each task in i
Attributes
Custom number of tasks on each process
n_totTotal number of tasks over all processes
n_procsNumber of processes to split over
i_procRank of current process
n_eachNumber of tasks on each process (till we run out)
n_prevCumulative task counts (n_procs+1 ints)
i_startTask start index on current process
i_stopTask stop index on current process
n_mineNumber of tasks on current 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