|
YAC 3.21.0
Yet Another Coupler
|
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) |
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.
| 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.
| [in] | node | pointer to the root node of the process sphere partition |
| [in] | bnd_circle | bounding circle for which the responsible ranks should be determined |
| [out] | ranks | array 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_count | number of responsible ranks found |
Definition at line 1296 of file proc_sphere_part.c.


| 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.
| [in] | node | pointer to the root node of the process sphere partition |
| [in] | search_coords | coordinates of the points for which the responsible ranks should be determined |
| [in] | count | number of points in search_coords |
| [out] | ranks | array of size count, in which the responsible ranks will be stored |
Definition at line 1182 of file proc_sphere_part.c.


| 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.
| [in] | node | pointer to the root node of the process sphere partition |
| [in] | leaf_sizes | array 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_size | minimum size of the combined leaf sizes of the neighbouring ranks |
| [out] | send_flags | array indicating which ranks should receive data from the local process |
| [out] | recv_flags | array indicating which ranks should send data to the local process |
| [in] | comm_rank | rank of the current process |
| [in] | comm_size | total number of processes in the communicator |
Definition at line 1419 of file proc_sphere_part.c.


| 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.
| [in] | vertex_coordinates | two arbitrary sized sets of vertices used for the partitioning |
| [in] | num_vertices | number of vertices in each of the two sets |
| [out] | proc_sphere_part | pointer to the generated process sphere partition |
| [in,out] | global_vertex_ids | global vertex ids for each set, if available (if not available, they will be generated internally) |
| [out] | vertex_ranks | ranks of the processes owning each vertex for each set |
| [in] | comm | MPI communicator containing all processes that should be included in the partition |
Definition at line 983 of file proc_sphere_part.c.


| void yac_proc_sphere_part_node_delete | ( | struct proc_sphere_part_node * | node | ) |
Destructor for the process sphere partition.
| [in] | node | pointer to the root node of the process sphere partition |
Definition at line 1452 of file proc_sphere_part.c.

