YAC 3.21.0
Yet Another Coupler
Loading...
Searching...
No Matches
Process Sphere Partition

Decomposition algorithm for partitioning the whole sphere among all processes. More...

Data Structures

struct  proc_sphere_part_node_data
 Data structure for the process sphere partition. More...
 
struct  proc_sphere_part_node
 Inner node of the process sphere partition tree. More...
 

Functions

void yac_proc_sphere_part_new (yac_coordinate_pointer vertex_coordinates[2], size_t *num_vertices, struct proc_sphere_part_node **proc_sphere_part, yac_int **global_vertex_ids[2], int **vertex_ranks[2], MPI_Comm comm)
 
void yac_proc_sphere_part_node_delete (struct proc_sphere_part_node *node)
 
void yac_proc_sphere_part_do_point_search (struct proc_sphere_part_node *node, yac_coordinate_pointer search_coords, size_t count, int *ranks)
 
void yac_proc_sphere_part_do_bnd_circle_search (struct proc_sphere_part_node *node, struct bounding_circle bnd_circle, int *ranks, int *rank_count)
 
void yac_proc_sphere_part_get_neigh_ranks (struct proc_sphere_part_node *node, uint64_t *leaf_sizes, uint64_t min_size, int *send_flags, int *recv_flags, int comm_rank, int comm_size)
 

Detailed Description

Decomposition algorithm for partitioning the whole sphere among all processes.

The process sphere partition is used to store YAC's internal decomposition of the sphere among all processes. It is collectively generated by all processes and stored on each process.

After creation, the process sphere partition can be used to determine which process is responsible for a given point on the sphere.

The partition is represented as a binary tree, where each inner node corresponds to a great circle that splits the sphere into two parts, and each leaf node represents a region of the sphere. Each leaf of the tree is assigned to a single process.

Function Documentation

◆ yac_proc_sphere_part_do_bnd_circle_search()

void yac_proc_sphere_part_do_bnd_circle_search ( struct proc_sphere_part_node * node,
struct bounding_circle bnd_circle,
int * ranks,
int * rank_count )

Searches for the ranks of the processes responsible for a given bounding circle on the sphere.

This is a local operation, which requires no communication between processes.

Parameters
[in]nodepointer to the root node of the process sphere partition
[in]bnd_circlebounding circle for which the responsible ranks should be determined
[out]ranksarray in which the responsible ranks will be stored (user has to make sure that the array is large enough to store all ranks)
[out]rank_countnumber of responsible ranks found

Definition at line 1296 of file proc_sphere_part.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_proc_sphere_part_do_point_search()

void yac_proc_sphere_part_do_point_search ( struct proc_sphere_part_node * node,
yac_coordinate_pointer search_coords,
size_t count,
int * ranks )

Searches for the ranks of the processes responsible for a given set of points on the sphere.

This is a local operation, which requires no communication between processes.

Parameters
[in]nodepointer to the root node of the process sphere partition
[in]search_coordscoordinates of the points for which the responsible ranks should be determined
[in]countnumber of points in search_coords
[out]ranksarray of size count, in which the responsible ranks will be stored

Definition at line 1182 of file proc_sphere_part.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_proc_sphere_part_get_neigh_ranks()

void yac_proc_sphere_part_get_neigh_ranks ( struct proc_sphere_part_node * node,
uint64_t * leaf_sizes,
uint64_t min_size,
int * send_flags,
int * recv_flags,
int comm_rank,
int comm_size )

Determines neighbouring ranks (based on provided decomposition) whose combined leaf size is at least min_size.

This can be used by the n-nearest-neighbour interpolation to ensure a process has enough local data to perform an initial search for the nearest neighbours, which can then be used to determine the final result.

The result contain information about all ranks that contain information required by the local process and about all processes that required information from the local process.

This is a local operation, which requires no communication between processes.

Parameters
[in]nodepointer to the root node of the process sphere partition
[in]leaf_sizesarray containing the sizes of the leaves; has to be provided by the user since the process sphere partition does not store this information; this also allows the user to take field masks into account
[in]min_sizeminimum size of the combined leaf sizes of the neighbouring ranks
[out]send_flagsarray indicating which ranks should receive data from the local process
[out]recv_flagsarray indicating which ranks should send data to the local process
[in]comm_rankrank of the current process
[in]comm_sizetotal number of processes in the communicator

Definition at line 1419 of file proc_sphere_part.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_proc_sphere_part_new()

void yac_proc_sphere_part_new ( yac_coordinate_pointer vertex_coordinates[2],
size_t * num_vertices,
struct proc_sphere_part_node ** proc_sphere_part,
yac_int ** global_vertex_ids[2],
int ** vertex_ranks[2],
MPI_Comm comm )

Constructor for the process sphere partition.

Devides the whole surface of the sphere among all processes. It tries to generate a partition that is as balanced as possible, i.e. processes are assigned regions of the sphere that have similar numbers of vertices.

The algorithm requires two sets of vertices as input. Each unique vertex coordinate in a set is required to have a unique global vertex id (i.e. no two vertices with different coordinates in the same set can have the same global vertex id). If global ids are not provided, they will be generated internally.

Parameters
[in]vertex_coordinatestwo arbitrary sized sets of vertices used for the partitioning
[in]num_verticesnumber of vertices in each of the two sets
[out]proc_sphere_partpointer to the generated process sphere partition
[in,out]global_vertex_idsglobal vertex ids for each set, if available (if not available, they will be generated internally)
[out]vertex_ranksranks of the processes owning each vertex for each set
[in]commMPI communicator containing all processes that should be included in the partition

Definition at line 983 of file proc_sphere_part.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_proc_sphere_part_node_delete()

void yac_proc_sphere_part_node_delete ( struct proc_sphere_part_node * node)

Destructor for the process sphere partition.

Parameters
[in]nodepointer to the root node of the process sphere partition

Definition at line 1452 of file proc_sphere_part.c.

Here is the call graph for this function:
Here is the caller graph for this function: