00001
00002
00003
00004
00005
00006
00007 #include "ad_nfs.h"
00008
00009 #ifdef ROMIO_HAVE_WORKING_AIO
00010
00011 void ADIOI_NFS_IreadContig(ADIO_File fd, void *buf, int count,
00012 MPI_Datatype datatype, int file_ptr_type,
00013 ADIO_Offset offset, ADIO_Request *request,
00014 int *error_code)
00015 {
00016 int len, typesize;
00017 int aio_errno = 0;
00018 static char myname[] = "ADIOI_NFS_IREADCONTIG";
00019
00020 MPI_Type_size(datatype, &typesize);
00021 len = count * typesize;
00022
00023 if (file_ptr_type == ADIO_INDIVIDUAL) offset = fd->fp_ind;
00024 aio_errno = ADIOI_NFS_aio(fd, buf, len, offset, 0, request);
00025 if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += len;
00026
00027 fd->fp_sys_posn = -1;
00028
00029 if (aio_errno != 0) {
00030
00031 MPIO_ERR_CREATE_CODE_ERRNO(myname, aio_errno, error_code);
00032 return;
00033
00034 }
00035 else *error_code = MPI_SUCCESS;
00036 }
00037 #endif