mpi_comm.c
//Create MPI datatypes needed for communication of processes
Create MPI datatypes needed for communication of processes
Create MPI datatypes needed for communication of processes
void createDatatypes(int width, int height)
{
    MPI_Type_vector(height, 1, width , MPI_FLOAT, &mpi_column);
    MPI_Type_commit(&mpi_column);
    MPI_Type_vector(1, width, 0, MPI_FLOAT, &mpi_row);
    MPI_Type_commit(&mpi_row);
    MPI_Type_vector(1, width * height, 0, MPI_FLOAT, &mpi_block);
    MPI_Type_commit(&mpi_block);
}
void createDatatypes ( int width , int height ) { MPI_Type_vector ( height , 1 , width , MPI_FLOAT , & mpi_column ) ; MPI_Type_commit ( & mpi_column ) ; MPI_Type_vector ( 1 , width , 0 , MPI_FLOAT , & mpi_row ) ; MPI_Type_commit ( & mpi_row ) ; MPI_Type_vector ( 1 , width * height , 0 , MPI_FLOAT , & mpi_block ) ; MPI_Type_commit ( & mpi_block ) ; }
Create MPI datatypes needed for communication of processes
Create MPI datatypes needed for communication of processes