kml_fft(f)_mpi_split_world
描述了所有进程数据的大小和位置。
接口定义
C interface:
void kml_fft_mpi_split_world(const int *world, const int *proc_grid, int(*box_low)[3], int(*box_high)[3]);
void kml_fftf_mpi_split_world(const int *world, const int *proc_grid, int(*box_low)[3], int(*box_high)[3]);
返回值
无返回值。
参数
| 参数名 | 数据类型 | 描述 | 输入/输出 | 
|---|---|---|---|
| world | const int* | n是长度为3的数组,包含各维度的大小; | 输入 | 
| proc_grid | const int* | proc_grid是长度为3的数组,包含各维度进程分布数量 | 输入 | 
| box_low | int** | 所有进程三个维度切分后的起点 | 输出 | 
| bow_high | int** | 所有进程三个维度切分后的终点 | 输出 | 
依赖
C: "kfft-mpi.h"
示例
C interface:
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | const int n0 = 32, n1 = 32, n2 = 32; kml_fft_plan plan; int provided; MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided); MPI_Comm comm = MPI_COMM_WORLD; int size; MPI_Comm_size(comm, &size); /* get local data size and allocate */ int low[size][3]; int high[size][3]; int world[3] = {n0, n1, n2}; int proc_grid[3] = {1, 1, size}; kml_fft_mpi_split_world(world, proc_grid, low, high); MPI_Finalize(); | 
父主题: MPI Local Size函数