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