1 /*
2 * Copyright (C) by Argonne National Laboratory
3 * See COPYRIGHT in top-level directory
4 *
5 * This file is automatically generated by buildiface
6 * DO NOT EDIT
7 */
8
9 #include "cdesc.h"
10
MPIR_File_read_ordered_cdesc(MPI_File x0,CFI_cdesc_t * x1,int x2,MPI_Datatype x3,MPI_Status * x4)11 int MPIR_File_read_ordered_cdesc(MPI_File x0, CFI_cdesc_t* x1, int x2, MPI_Datatype x3, MPI_Status * x4)
12 {
13 int err = MPI_SUCCESS;
14 #ifdef MPI_MODE_RDONLY
15 void *buf1 = x1->base_addr;
16 int count1 = x2;
17 MPI_Datatype dtype1 = x3;
18
19 if (buf1 == &MPIR_F08_MPI_BOTTOM) {
20 buf1 = MPI_BOTTOM;
21 }
22
23 if (x1->rank != 0 && !CFI_is_contiguous(x1)) {
24 err = cdesc_create_datatype(x1, x2, x3, &dtype1);
25 count1 = 1;
26 }
27
28 err = MPI_File_read_ordered(x0, buf1, count1, dtype1, x4);
29
30 if (dtype1 != x3) MPI_Type_free(&dtype1);
31 #else
32 err = MPI_ERR_INTERN;
33 #endif
34 return err;
35 }
36