1
1

finishing the changes for the non-blocking and split cpllective I/O operations. Everything except for the

interface changes to the io framework is done.
Этот коммит содержится в:
Edgar Gabriel 2015-06-18 06:22:41 -05:00
родитель 3b11a8b61c
Коммит dedeee9771

Просмотреть файл

@ -726,6 +726,45 @@ int mca_io_ompio_file_write_ordered_end (ompi_file_t *fp,
/* Split collectives . Not really used but infrastructure is in place */
/**********************************************************************/
int mca_io_ompio_file_write_all_begin (ompi_file_t *fh,
void *buf,
int count,
struct ompi_datatype_t *datatype)
{
int ret = OMPI_SUCCESS;
mca_io_ompio_file_t *fp;
mca_io_ompio_data_t *data;
data = (mca_io_ompio_data_t *) fh->f_io_selected_data;
fp = &data->ompio_fh;
if ( true == fp->f_split_coll_in_use ) {
printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n");
return MPI_ERR_OTHER;
}
ret = mca_io_ompio_file_iwrite_all ( fh, buf, count, datatype, &fp->f_split_coll_req );
fp->f_split_coll_in_use = true;
return ret;
}
int mca_io_ompio_file_write_all_end (ompi_file_t *fh,
void *buf,
ompi_status_public_t *status)
{
int ret = OMPI_SUCCESS;
mca_io_ompio_file_t *fp;
mca_io_ompio_data_t *data;
data = (mca_io_ompio_data_t *) fh->f_io_selected_data;
fp = &data->ompio_fh;
ret = ompi_request_wait ( &fp->f_split_coll_req, status );
/* remove the flag again */
fp->f_split_coll_in_use = false;
return ret;
}
int mca_io_ompio_file_write_at_all_begin (ompi_file_t *fh,
OMPI_MPI_OFFSET_TYPE offset,
void *buf,
@ -736,7 +775,7 @@ int mca_io_ompio_file_write_at_all_begin (ompi_file_t *fh,
mca_io_ompio_data_t *data;
data = (mca_io_ompio_data_t *) fh->f_io_selected_data;
ret = ompio_io_ompio_file_write_at_all_begin (&data->ompio_fh, offset, buf, count, datatype );
ret = ompio_io_ompio_file_write_at_all_begin ( &data->ompio_fh, offset, buf, count, datatype );
return ret;
}
@ -747,17 +786,13 @@ int ompio_io_ompio_file_write_at_all_begin (mca_io_ompio_file_t *fh,
struct ompi_datatype_t *datatype)
{
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);
/* 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_write_all_begin operation
*/
ompi_io_ompio_set_explicit_offset (fh, prev_offset);
if ( true == fh->f_split_coll_in_use ) {
printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n");
return MPI_ERR_REQUEST;
}
ret = mca_io_ompio_file_iwrite_at_all ( fh->f_fh, offset, buf, count, datatype, &fh->f_split_coll_req );
fh->f_split_coll_in_use = true;
return ret;
}
@ -769,8 +804,7 @@ int mca_io_ompio_file_write_at_all_end (ompi_file_t *fh,
mca_io_ompio_data_t *data;
data = (mca_io_ompio_data_t *) fh->f_io_selected_data;
ret = ompio_io_ompio_file_write_at_all_end(&data->ompio_fh,buf,status);
ret = ompio_io_ompio_file_read_at_all_end ( &data->ompio_fh, buf, status );
return ret;
}
@ -779,33 +813,10 @@ int ompio_io_ompio_file_write_at_all_end (mca_io_ompio_file_t *fh,
ompi_status_public_t * status)
{
int ret = OMPI_SUCCESS;
ret = ompi_request_wait ( &fh->f_split_coll_req, status );
return ret;
}
int mca_io_ompio_file_write_all_begin (ompi_file_t *fh,
void *buf,
int count,
struct ompi_datatype_t *datatype)
{
int ret = OMPI_SUCCESS;
mca_io_ompio_data_t *data;
data = (mca_io_ompio_data_t *) fh->f_io_selected_data;
return ret;
}
int mca_io_ompio_file_write_all_end (ompi_file_t *fh,
void *buf,
ompi_status_public_t *status)
{
int ret = OMPI_SUCCESS;
mca_io_ompio_data_t *data;
data = (mca_io_ompio_data_t *) fh->f_io_selected_data;
/* remove the flag again */
fh->f_split_coll_in_use = false;
return ret;
}