Miscellaneous functions to obtain informations about the properties of the distributed array.
More...
|
int | AL_Get_size (int isz, int *size) |
|
int | AL_Get_rank (int isz, int *rank) |
|
int | AL_Get_comm (int isz, MPI_Comm *comm) |
|
int | AL_Get_cart_comm (int isz, MPI_Comm *cart_comm) |
|
int | AL_Get_dimensions (int isz, int *ndim) |
|
int | AL_Get_type (int isz, MPI_Datatype *type) |
|
int | AL_Get_type_size (int isz, int *tsize) |
|
int | AL_Get_buffsize (int sz_ptr, int *buffsize) |
|
int | AL_Get_global_dim (int isz, int *gdims) |
|
int | AL_Get_local_dim (int isz, int *ldims) |
|
int | AL_Get_local_dim_gp (int sz_ptr, int *ldims_gp) |
|
int | AL_Get_offsets (int sz_ptr, int *offset) |
|
int | AL_Get_stride (int sz_ptr, int *stride) |
|
int | AL_Get_cart_sizes (int isz, int *cart_sizes) |
|
int | AL_Get_parallel_dim (int isz, int *pardims) |
|
int | AL_Get_periodic_dim (int isz, int *periods) |
|
int | AL_Get_staggered_dim (int isz, int *stagger) |
|
int | AL_Get_ghosts (int isz, int *ghosts) |
|
int | AL_Get_lbounds (int isz, int *lbeg, int *lend, int *gp, int style) |
|
int | AL_Get_bounds (int isz, int *beg, int *end, int *gp, int style) |
|
int | AL_Get_gbounds (int isz, int *gbeg, int *gend, int *gp, int style) |
|
- Author
- A. Malagoli (University of Chicago)
- Date
- Jul 17, 1999
int AL_Get_bounds |
( |
int |
isz, |
|
|
int * |
beg, |
|
|
int * |
end, |
|
|
int * |
gp, |
|
|
int |
style |
|
) |
| |
Get the global indexes for the local portion of a distributed array
- Parameters
-
[in] | isz | Integer pointer to the input array descriptor |
[out] | beg | Array of ndim integers containing the start points |
[out] | end | Array of ndim integers containing the end points |
[out] | gp | Array of ndim integers containing the ghost points |
[in] | style | Index style: AL_C_INDEXES or AL_FORTRAN_INDEXES |
int AL_Get_buffsize |
( |
int |
sz_ptr, |
|
|
int * |
buffsize |
|
) |
| |
Get the local buffer size for a distributed array, including the number of elements of the ghsot regions.
- Parameters
-
[in] | sz_ptr | Integer pointer to the input array descriptor |
[out] | buffsize | Buffer size [in number of elements] |
int AL_Get_cart_comm |
( |
int |
isz, |
|
|
MPI_Comm * |
cart_comm |
|
) |
| |
Get the cartesian communicator for a distributed array
- Parameters
-
[in] | isz | Integer pointer to the input array descriptor |
[out] | cart_comm | Pointer to cartesian communicator |
int AL_Get_cart_sizes |
( |
int |
isz, |
|
|
int * |
cart_sizes |
|
) |
| |
Get the sizes of the cartesian communicator
- Parameters
-
[in] | isz | Integer pointer to the input array descriptor |
[out] | cart_sizes | Array of integers with cartesian sizes |
int AL_Get_comm |
( |
int |
isz, |
|
|
MPI_Comm * |
comm |
|
) |
| |
Get the communicator for a distributed array
- Parameters
-
[in] | isz | Integer pointer to the input array descriptor |
[out] | comm | Pointer to communicator |
int AL_Get_dimensions |
( |
int |
isz, |
|
|
int * |
ndim |
|
) |
| |
Get the dimensions of the distributed array
- Parameters
-
[in] | isz | Integer pointer to the input array descriptor |
[out] | ndim | Pointer to integer number of dimensions |
int AL_Get_gbounds |
( |
int |
isz, |
|
|
int * |
gbeg, |
|
|
int * |
gend, |
|
|
int * |
gp, |
|
|
int |
style |
|
) |
| |
Get the global bounds of the global array
- Parameters
-
[in] | isz | Integer pointer to the input array descriptor |
[out] | gbeg | Array of ndim integers containing the start points |
[out] | gend | Array of ndim integers containing the end points |
[out] | gp | Array of ndim integers containing the ghost points |
[in] | style | Index style: AL_C_INDEXES or AL_FORTRAN_INDEXES |
int AL_Get_ghosts |
( |
int |
isz, |
|
|
int * |
ghosts |
|
) |
| |
Get the ghost points of the distributed array
- Parameters
-
[in] | isz | Integer pointer to the input array descriptor |
[out] | ghost | Array of integers with size of ghost points in each dimension |
int AL_Get_global_dim |
( |
int |
isz, |
|
|
int * |
gdims |
|
) |
| |
Get the global dimensions of the distributed array
- Parameters
-
[in] | isz | Integer pointer to the input array descriptor |
[out] | gdims | Array of integers with global dimensions |
int AL_Get_lbounds |
( |
int |
isz, |
|
|
int * |
lbeg, |
|
|
int * |
lend, |
|
|
int * |
gp, |
|
|
int |
style |
|
) |
| |
Get the local indexes for the local portion of a distributed array
- Parameters
-
[in] | isz | Integer pointer to the input array descriptor |
[out] | lbeg | Array of ndim integers containing the start points |
[out] | lend | Array of ndim integers containing the end points |
[out] | gp | Array of ndim integers containing the ghost points |
[in] | style | Index style: AL_C_INDEXES or AL_FORTRAN_INDEXES |
int AL_Get_local_dim |
( |
int |
isz, |
|
|
int * |
ldims |
|
) |
| |
Get the local dimensions of a distributed array WITHOUT GHOST POINTS
- Parameters
-
[in] | isz | Integer pointer to the input array descriptor |
[out] | ldims | Array of integers with local dimensions |
int AL_Get_local_dim_gp |
( |
int |
sz_ptr, |
|
|
int * |
ldims_gp |
|
) |
| |
Get the local dimensions of a distributed array WITH GHOST POINTS
- Parameters
-
[in] | sz_ptr | Integer pointer to the input array descriptor |
[out] | ldims_gp | Array of integers with local dimensions (including ghost points) |
int AL_Get_offsets |
( |
int |
sz_ptr, |
|
|
int * |
offset |
|
) |
| |
Get the offsets for the for loop index calculation
NOTE: The typical multidimensional C for loop will look like, for example:
... ;
AL_Get_offsets(sz_ptr, offset);
for(k=kbeg; k<=kend; k++){ koff = k*offset[2]; for(j=jbeg; j<=jend; j++){ joff = j*offset[1]; for(i=ibeg; i<=iend; i++){ ioff = i*offset[0]+joff+koff; a[ioff] = ... ; } } } ... ;
Where a[ioff] is a generic 3D array.
- Parameters
-
[in] | sz_ptr | Integer pointer to the input array descriptor |
[out] | offset | Array of integers with offsets |
int AL_Get_parallel_dim |
( |
int |
isz, |
|
|
int * |
pardims |
|
) |
| |
Get the parallel dimensions of a distributed array
- Parameters
-
[in] | isz | Integer pointer to the input array descriptor |
[out] | pardims | Array of integers with parallel dimensions [AL_TRUE|AL_FALSE] |
int AL_Get_periodic_dim |
( |
int |
isz, |
|
|
int * |
periods |
|
) |
| |
Get the periodic dimensions of the distributed arrays
- Parameters
-
[in] | isz | Integer pointer to the input array descriptor |
[out] | periods | Array of integers with periodic dimensions [AL_TRUE|AL_FALSE] |
int AL_Get_rank |
( |
int |
isz, |
|
|
int * |
rank |
|
) |
| |
Get the rank of this node in the communicator associated with a distributed array
- Parameters
-
[in] | isz | Integer pointer to the input array descriptor |
[out] | rank | Integer pointer to rank |
- Returns
- If the current node does not belong to the communicator, AL_UNDEFINED (same as MPI_UNDEFINED) is returned. Otherwise AL_SUCCESS is returned.
int AL_Get_size |
( |
int |
isz, |
|
|
int * |
size |
|
) |
| |
Get the size of the communicator associated with a distributed array
- Parameters
-
[in] | isz | Integer pointer to the input array descriptor (input) |
[in] | size | Integer pointer to size (output) |
int AL_Get_staggered_dim |
( |
int |
isz, |
|
|
int * |
stagger |
|
) |
| |
Get the staggered dimensions of the distributed array
- Parameters
-
[in] | isz | Integer pointer to the input array descriptor |
[out] | stagger | Array of integers with staggered dimensions [AL_TRUE|AL_FALSE] |
int AL_Get_stride |
( |
int |
sz_ptr, |
|
|
int * |
stride |
|
) |
| |
Get the strides for the for loop index calculation NOTE: The typical multidimensional C for loop will look like, for example:
... ;
AL_Get_stride(sz_ptr, stride);
for(k=kbeg; k<=kend; k++){ koff = k*stride[2]; for(j=jbeg; j<=jend; j++){ joff = j*stride[1]; for(i=ibeg; i<=iend; i++){ ioff = i*stride[0]+joff+koff; a[ioff] = ... ; } } } ... ;
Where a[ioff] is a generic 3D array.
- Parameters
-
[in] | sz_ptr | Integer pointer to the input array descriptor |
[out] | stride | Array of strides |
int AL_Get_type |
( |
int |
isz, |
|
|
MPI_Datatype * |
type |
|
) |
| |
Get the basic data type of a distributed array
- Parameters
-
[in] | isz | Integer pointer to the input array descriptor |
[out] | type | Pointer to datatype |
int AL_Get_type_size |
( |
int |
isz, |
|
|
int * |
tsize |
|
) |
| |
Get size of the basic data type of a distributed array
- Parameters
-
[in] | isz | Integer pointer to the input array descriptor |
[out] | tsize | Integer pointer to size of datatype. |