00001
00002
00003
00004
00005
00006
00007
00008 #include "ad_testfs.h"
00009 #include "adioi.h"
00010
00011
00012
00013
00014
00015 void ADIOI_TESTFS_IreadContig(ADIO_File fd, void *buf, int count,
00016 MPI_Datatype datatype, int file_ptr_type,
00017 ADIO_Offset offset, ADIO_Request *request, int
00018 *error_code)
00019 {
00020 ADIO_Status status;
00021 int myrank, nprocs, typesize, len;
00022
00023 *error_code = MPI_SUCCESS;
00024
00025 MPI_Comm_size(fd->comm, &nprocs);
00026 MPI_Comm_rank(fd->comm, &myrank);
00027 MPI_Type_size(datatype, &typesize);
00028 FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_IreadContig called on %s\n",
00029 myrank, nprocs, fd->filename);
00030 FPRINTF(stdout, "[%d/%d] calling ADIOI_TESTFS_ReadContig\n",
00031 myrank, nprocs);
00032
00033 len = count * typesize;
00034 ADIOI_TESTFS_ReadContig(fd, buf, len, MPI_BYTE, file_ptr_type,
00035 offset, &status, error_code);
00036
00037 MPIO_Completed_request_create(&fd, len, error_code, request);
00038 }
00039
00040 void ADIOI_TESTFS_IreadStrided(ADIO_File fd, void *buf, int count,
00041 MPI_Datatype datatype, int file_ptr_type,
00042 ADIO_Offset offset, ADIO_Request *request, int
00043 *error_code)
00044 {
00045 ADIO_Status status;
00046 int myrank, nprocs;
00047 int typesize;
00048
00049 MPI_Comm_size(fd->comm, &nprocs);
00050 MPI_Comm_rank(fd->comm, &myrank);
00051 MPI_Type_size(datatype, &typesize);
00052 FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_IreadStrided called on %s\n",
00053 myrank, nprocs, fd->filename);
00054 FPRINTF(stdout, "[%d/%d] calling ADIOI_TESTFS_ReadStrided\n",
00055 myrank, nprocs);
00056
00057 ADIOI_TESTFS_ReadStrided(fd, buf, count, datatype, file_ptr_type,
00058 offset, &status, error_code);
00059 MPIO_Completed_request_create(&fd, count*typesize, error_code, request);
00060 }
00061