Rate This Document
Findability
Accuracy
Completeness
Readability

kml_fft(f)_mpi_split_world

Describe the size and location of all process data.

Interface Definition

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]);

Return Value

None

Parameters

Parameter

Data Type

Description

Input/Output

world

const int*

n is an array with a length of 3, containing the size of each dimension.

Input

proc_grid

const int*

proc_grid is an array with a length of 3, containing the number of processes distributed in each dimension.

Input

box_low

int**

Start points of all processes after three-dimensional splitting.

Output

box_high

int**

End points of all processes after three-dimensional splitting.

Output

Dependencies

C: "kfft-mpi.h"

Examples

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 box_low[size][3];
    int box_high[size][3];
    int world[3] = {n0, n1, n2};
    int proc_grid[3] = {1, 1, size};
    kml_fft_mpi_split_world(world, proc_grid, box_low, box_high);
    MPI_Finalize();