title: How to use MPI_Type_create_subarray?
body: <p>It is clear that its arguments are:</p>
  
  <pre><code>int MPI_Type_create_subarray(
    int ndims,
    int array_of_sizes[],
    int array_of_subsizes[],
    int array_of_starts[],
    int order,
    MPI_Datatype oldtype,
    MPI_Datatype *newtype
  );
  </code></pre>
  
  <p>However, I cannot understand how this method receives the original array which we want to split and where it returns the new subarray (as this method should return an integer). In other words, I simply would like to see a simple implementation of this method in C++, which I am not able to find on the Internet.</p>