1 /* -*- Mode: C; c-basic-offset:4 ; -*- */
5 * Copyright (C) 1997 University of Chicago.
6 * See COPYRIGHT notice in top-level directory.
11 void ADIOI_PIOFS_IreadContig(ADIO_File fd
, void *buf
, int count
,
12 MPI_Datatype datatype
, int file_ptr_type
,
13 ADIO_Offset offset
, ADIO_Request
*request
, int *error_code
)
18 /* PIOFS does not support nonblocking I/O. Therefore, use blocking I/O */
20 *request
= ADIOI_Malloc_request();
21 (*request
)->optype
= ADIOI_READ
;
23 (*request
)->queued
= 0;
24 (*request
)->datatype
= datatype
;
26 MPI_Type_size(datatype
, &typesize
);
27 len
= count
* typesize
;
28 ADIOI_PIOFS_ReadContig(fd
, buf
, len
, MPI_BYTE
, file_ptr_type
, offset
,
31 #ifdef HAVE_STATUS_SET_BYTES
32 if (*error_code
== MPI_SUCCESS
) {
33 MPI_Get_elements(&status
, MPI_BYTE
, &len
);
34 (*request
)->nbytes
= len
;
43 void ADIOI_PIOFS_IreadStrided(ADIO_File fd
, void *buf
, int count
,
44 MPI_Datatype datatype
, int file_ptr_type
,
45 ADIO_Offset offset
, ADIO_Request
*request
, int
49 #ifdef HAVE_STATUS_SET_BYTES
53 /* PIOFS does not support nonblocking I/O. Therefore, use blocking I/O */
55 *request
= ADIOI_Malloc_request();
56 (*request
)->optype
= ADIOI_READ
;
58 (*request
)->queued
= 0;
59 (*request
)->datatype
= datatype
;
61 ADIOI_PIOFS_ReadStrided(fd
, buf
, count
, datatype
, file_ptr_type
,
62 offset
, &status
, error_code
);
66 #ifdef HAVE_STATUS_SET_BYTES
67 if (*error_code
== MPI_SUCCESS
) {
68 MPI_Type_size(datatype
, &typesize
);
69 (*request
)->nbytes
= count
* typesize
;