This source file includes following definitions.
- ADIOI_FAKE_IreadContig
- ADIOI_FAKE_IreadStrided
1
2
3
4
5
6
7
8 #include "adio.h"
9 #include "mpiu_greq.h"
10
11
12
13
14 void ADIOI_FAKE_IreadContig(ADIO_File fd, void *buf, int count,
15 MPI_Datatype datatype, int file_ptr_type,
16 ADIO_Offset offset, ADIO_Request *request,
17 int *error_code)
18 {
19 ADIO_Status status;
20 MPI_Count typesize;
21 MPI_Offset len;
22
23 MPI_Type_size_x(datatype, &typesize);
24 len = (MPI_Offset)count * (MPI_Offset)typesize;
25
26
27
28
29 ADIOI_Assert(len == (int) len);
30 ADIO_ReadContig(fd, buf, (int)len, MPI_BYTE, file_ptr_type, offset,
31 &status, error_code);
32 if (*error_code != MPI_SUCCESS) {
33 len=0;
34 }
35 MPIO_Completed_request_create(&fd, len, error_code, request);
36 }
37
38
39
40
41
42 void ADIOI_FAKE_IreadStrided(ADIO_File fd, void *buf, int count,
43 MPI_Datatype datatype, int file_ptr_type,
44 ADIO_Offset offset, ADIO_Request *request,
45 int *error_code)
46 {
47 ADIO_Status status;
48 MPI_Count typesize;
49 MPI_Offset nbytes=0;
50
51
52
53
54 ADIO_ReadStrided(fd, buf, count, datatype, file_ptr_type,
55 offset, &status, error_code);
56 if (*error_code == MPI_SUCCESS) {
57 MPI_Type_size_x(datatype, &typesize);
58 nbytes = (MPI_Offset)count*(MPI_Offset)typesize;
59 }
60 MPIO_Completed_request_create(&fd, nbytes, error_code, request);
61 }