qimpy.mpi.TaskDivisionCustom
- class TaskDivisionCustom(*, n_mine, comm)
Bases:
TaskDivision
Customized 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_mine
Return whether current process is responsible for task i
Return process index i_proc responsible for task i
whose_each
Return process index i_proc responsible for each task in i
Attributes
Custom number of tasks on each process
n_tot
Total number of tasks over all processes
n_procs
Number of processes to split over
i_proc
Rank of current process
n_each
Number of tasks on each process (till we run out)
n_prev
Cumulative task counts (n_procs+1 ints)
i_start
Task start index on current process
i_stop
Task stop index on current process
n_mine
Number 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