Octopus
partition_oct_m::partition_t Type Reference

The partition is an array that contains the mapping between some global index and a process, such that point ip will be stored in process partitionpart(ip). More...

Detailed Description

The partition is an array that contains the mapping between some global index and a process, such that point ip will be stored in process partitionpart(ip).

In this module this array is distributed among the processes, such that each process only stores a portion of the full array. Because each process needs to know in a straighforward way (i.e. without having to perform any kind of communication or lengthy operations) which process stores the partition corresponding to any giving point, the distribution of the points is done using a block data decomposition:

  • partition i: starts at floor((i-1) * np_global/npart) + 1
  • partition i: ends at floor( i * np_global/npart)
  • element j stored on partition: floor(npart*(j+1)/np_global) + 1

Note 1: this module can be a bit confusing as they are in fact two partitions. One is the partition of some array (in the case of Octopus, this is typically the mesh functions), which is the main information stored in the partition_t object, and then there is the partition of the partition itself, as this is also distributed.

Note 2: in principle, the mpi group used by the processes for the partition distribution does not need to be the same as the mpi group of the processes the partition refers to.

Definition at line 165 of file partition.F90.

Private Attributes

type(mpi_grp_tmpi_grp
 The mpi group use for distributing the partition data. More...
 
integer(int64) np_global
 The total number of points. More...
 
integer npart
 The number of partitions. More...
 
integer, dimension(:), allocatable np_local_vec
 The number of points for each partition. More...
 
integer(int64), dimension(:), allocatable istart_vec
 The position of the first point for each partition. More...
 
integer partno
 local partition number (i.e. rank + 1) More...
 
integer np_local
 The number of points of the partition stored in this process. More...
 
integer(int64) istart
 The position of the first point stored in this process. More...
 
integer, dimension(:), allocatable part
 The local portion of the partition. More...
 

Member Data Documentation

◆ mpi_grp

type(mpi_grp_t) partition_oct_m::partition_t::mpi_grp
private

The mpi group use for distributing the partition data.

Definition at line 169 of file partition.F90.

◆ np_global

integer(int64) partition_oct_m::partition_t::np_global
private

The total number of points.

Definition at line 170 of file partition.F90.

◆ npart

integer partition_oct_m::partition_t::npart
private

The number of partitions.

Definition at line 171 of file partition.F90.

◆ np_local_vec

integer, dimension(:), allocatable partition_oct_m::partition_t::np_local_vec
private

The number of points for each partition.

Definition at line 172 of file partition.F90.

◆ istart_vec

integer(int64), dimension(:), allocatable partition_oct_m::partition_t::istart_vec
private

The position of the first point for each partition.

Definition at line 173 of file partition.F90.

◆ partno

integer partition_oct_m::partition_t::partno
private

local partition number (i.e. rank + 1)

Definition at line 176 of file partition.F90.

◆ np_local

integer partition_oct_m::partition_t::np_local
private

The number of points of the partition stored in this process.

Definition at line 177 of file partition.F90.

◆ istart

integer(int64) partition_oct_m::partition_t::istart
private

The position of the first point stored in this process.

Definition at line 178 of file partition.F90.

◆ part

integer, dimension(:), allocatable partition_oct_m::partition_t::part
private

The local portion of the partition.

Definition at line 179 of file partition.F90.


The documentation for this type was generated from the following file: