MPI advanced Flashcards
persistent communication
when we use same call reptedly in a loop
setup persistent communication
int MPI_Send_init(const void* buffer,
int count,
MPI_Datatype datatype,
int recipient,
int tag,
MPI_Comm communicator,
MPI_Request* request);
MPI_Send_init(&buffer_sent, 1, MPI_INT, RECEIVER, 0, MPI_COMM_WORLD, &request);
prepares a request handle for sending using persistent communications
persistent communication start
launches the communication represented by the request handle passed
int MPI_Start(MPI_Request* request);
MPI_Start(&request)
persistent comm free
MPI_Request_free(req)
partitioned communication
used to transfer data by dividing it in chunks
MPI type contiguous
int MPI_Type_contiguous(int count,
MPI_Datatype old_datatype,
MPI_Datatype* new_datatype);
how to set up mpi data type creation
MPI_Datatype
MPI_Type_commit()
MPI_Type_free()
MPY type vector
int MPI_Type_vector(int block_count,
int block_length,
int stride,
MPI_Datatype old_datatype,
MPI_Datatype* new_datatype);
MPI type indexed
int MPI_Type_indexed(int block_count,
const int block_lengths[],
const int displacements[],
MPI_Datatype old_datatype,
MPI_Datatype* new_datatype);
Mpi TYPE create struct
int MPI_Type_create_struct(int block_count,
const int block_lengths[],
const MPI_Aint displacements[],
MPI_Datatype block_types[],
MPI_Datatype* new_datatype);
Mpi TYPE create subarray
int MPI_Type_create_subarray(int dim_count,
const int array_element_counts[],
const int subarray_element_counts[],
const int subarray_coordinates[],
int order,
MPI_Datatype old_datatype,
MPI_Datatype* new_datatype);
when to use MPI types
- messages wth multiple types
- simplify code
- often access spread out data
MPI type duplicate
MPI_Type_dup