int ompio_io_ompio_file_iwrite_at (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, void *buf, int count, struct ompi_datatype_t *datatype, ompi_request_t **request) { int ret = OMPI_SUCCESS; OMPI_MPI_OFFSET_TYPE prev_offset; ompio_io_ompio_file_get_position (fh, &prev_offset ); ompi_io_ompio_set_explicit_offset (fh, offset); ret = ompio_io_ompio_file_iwrite (fh, buf, count, datatype, request); /* An explicit offset file operation is not suppsed to modify ** the internal file pointer. So reset the pointer ** to the previous value ** It is OK to reset the position already here, althgouth ** the operation might still be pending/ongoing, since ** the entire array of <offset, length, memaddress> have ** already been constructed in the file_iwrite operation */ ompi_io_ompio_set_explicit_offset (fh, prev_offset); return ret; }
int ompio_io_ompio_file_iwrite_at_all (mca_io_ompio_file_t *fp, OMPI_MPI_OFFSET_TYPE offset, void *buf, int count, struct ompi_datatype_t *datatype, ompi_request_t **request) { int ret = OMPI_SUCCESS; OMPI_MPI_OFFSET_TYPE prev_offset; ompio_io_ompio_file_get_position (fp, &prev_offset ); ompi_io_ompio_set_explicit_offset (fp, offset); if ( NULL != fp->f_fcoll->fcoll_file_iwrite_all ) { ret = fp->f_fcoll->fcoll_file_iwrite_all (fp, buf, count, datatype, request); } else { /* this fcoll component does not support non-blocking collective I/O operations. WE fake it with individual non-blocking I/O operations. */ ret = ompio_io_ompio_file_iwrite ( fp, buf, count, datatype, request ); } ompi_io_ompio_set_explicit_offset (fp, prev_offset); return ret; }
int mca_io_ompio_file_iwrite_all (ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, ompi_request_t **request) { int ret = OMPI_SUCCESS; mca_io_ompio_data_t *data=NULL; mca_io_ompio_file_t *fp=NULL; data = (mca_io_ompio_data_t *) fh->f_io_selected_data; fp = &data->ompio_fh; if ( NULL != fp->f_fcoll->fcoll_file_iwrite_all ) { ret = fp->f_fcoll->fcoll_file_iwrite_all (&data->ompio_fh, buf, count, datatype, request); } else { /* this fcoll component does not support non-blocking collective I/O operations. WE fake it with individual non-blocking I/O operations. */ ret = ompio_io_ompio_file_iwrite ( fp, buf, count, datatype, request ); } return ret; }
int mca_io_ompio_file_iwrite (ompi_file_t *fp, void *buf, int count, struct ompi_datatype_t *datatype, ompi_request_t **request) { int ret = OMPI_SUCCESS; mca_io_ompio_data_t *data; data = (mca_io_ompio_data_t *) fp->f_io_selected_data; ret = ompio_io_ompio_file_iwrite(&data->ompio_fh,buf,count,datatype,request); return ret; }