This source file includes following definitions.
- ADIOI_TESTFS_ReadContig
- ADIOI_TESTFS_ReadStrided
   1 
   2 
   3 
   4 
   5 
   6 
   7 #include "ad_testfs.h"
   8 #include "adioi.h"
   9 
  10 void ADIOI_TESTFS_ReadContig(ADIO_File fd, void *buf, int count, 
  11                              MPI_Datatype datatype, int file_ptr_type,
  12                              ADIO_Offset offset, ADIO_Status *status, int
  13                              *error_code)
  14 {
  15     int myrank, nprocs;
  16     MPI_Count datatype_size;
  17 
  18     *error_code = MPI_SUCCESS;
  19 
  20     MPI_Comm_size(fd->comm, &nprocs);
  21     MPI_Comm_rank(fd->comm, &myrank);
  22     MPI_Type_size_x(datatype, &datatype_size);
  23     FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_ReadContig called on %s\n", myrank, 
  24             nprocs, fd->filename);
  25     if (file_ptr_type != ADIO_EXPLICIT_OFFSET)
  26     {
  27         offset = fd->fp_ind;
  28         fd->fp_ind += datatype_size * count;
  29         fd->fp_sys_posn = fd->fp_ind;
  30     }
  31     else {
  32         fd->fp_sys_posn = offset + datatype_size * count;
  33     }
  34 
  35     FPRINTF(stdout, "[%d/%d]    reading (buf = %p, loc = %lld, sz = %lld)\n",
  36             myrank, nprocs, buf, (long long) offset, 
  37             (long long) datatype_size * count);
  38 
  39 #ifdef HAVE_STATUS_SET_BYTES
  40     MPIR_Status_set_bytes(status, datatype, datatype_size * count);
  41 #endif
  42 }
  43 
  44 void ADIOI_TESTFS_ReadStrided(ADIO_File fd, void *buf, int count,
  45                               MPI_Datatype datatype, int file_ptr_type,
  46                               ADIO_Offset offset, ADIO_Status *status, int
  47                               *error_code)
  48 {
  49     int myrank, nprocs;
  50 
  51     *error_code = MPI_SUCCESS;
  52 
  53     MPI_Comm_size(fd->comm, &nprocs);
  54     MPI_Comm_rank(fd->comm, &myrank);
  55     FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_ReadStrided called on %s\n", myrank, 
  56             nprocs, fd->filename);
  57     FPRINTF(stdout, "[%d/%d]    calling ADIOI_GEN_ReadStrided\n", myrank, 
  58             nprocs);
  59 
  60     ADIOI_GEN_ReadStrided(fd, buf, count, datatype, file_ptr_type, offset,
  61                           status, error_code);
  62 }