A C/MPI program that is executed using two processes. Process 0 hold a 4 × 4 array A that contains the floating-point values shown below.

1.0  2.0   3.0    4.0   
5.0  6.0   7.0    8.0     A[4][4]
9.0  10.0  11.0  12.0   
13.0 14.0  15.0  16.0   

What is the ordered sequence of the values of the array A that are sent by process 0 to 1 in the following two fragments of code?

MPI_Type_contiguous( 8, MPI_FLOAT, &atype );
    MPI_Type_commit( &atype );
    if ( rank == 0 ) { 
    MPI_Send( a, 1, atype, 1, TAG, MPI_COMM_WORLD );
    }



MPI_Type_vector( 4, 2, 2, MPI_FLOAT, &atype );
   MPI_Type_commit( &atype );
    if ( rank == 0 ) { 
    MPI_Send( a, 1, atype, 1, TAG, MPI_COMM_WORLD );
    }

Any help on this would be great

How are these functions being called? Where and how are rank and atype defined? I need more context to answer this question.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.