Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ompi/mca/common/ompio/common_ompio_file_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,14 @@ int mca_common_ompio_file_close (mca_io_ompio_file_t *ompio_fh)
int delete_flag = 0;
char name[256];

ret = ompio_fh->f_comm->c_coll.coll_barrier ( ompio_fh->f_comm, ompio_fh->f_comm->c_coll.coll_barrier_module);
if ( OMPI_SUCCESS != ret ) {
/* Not sure what to do */
opal_output (1,"mca_common_ompio_file_close: error in Barrier \n");
return ret;
}


if(mca_io_ompio_coll_timing_info){
strcpy (name, "WRITE");
if (!mca_common_ompio_empty_print_queue(ompio_fh->f_coll_write_time)){
Expand Down
28 changes: 22 additions & 6 deletions ompi/mca/io/ompio/io_ompio_file_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,18 +230,34 @@ int mca_io_ompio_file_set_size (ompi_file_t *fh,

tmp = size;

data->ompio_fh.f_comm->c_coll.coll_bcast (&tmp,
1,
OMPI_OFFSET_DATATYPE,
OMPIO_ROOT,
data->ompio_fh.f_comm,
data->ompio_fh.f_comm->c_coll.coll_bcast_module);
ret = data->ompio_fh.f_comm->c_coll.coll_bcast (&tmp,
1,
OMPI_OFFSET_DATATYPE,
OMPIO_ROOT,
data->ompio_fh.f_comm,
data->ompio_fh.f_comm->c_coll.coll_bcast_module);
if ( OMPI_SUCCESS != ret ) {
opal_output(1, ",mca_io_ompio_file_set_size: error in bcast\n");
return ret;
}


if (tmp != size) {
return OMPI_ERROR;
}

ret = data->ompio_fh.f_fs->fs_file_set_size (&data->ompio_fh, size);
if ( OMPI_SUCCESS != ret ) {
opal_output(1, ",mca_io_ompio_file_set_size: error in fs->set_size\n");
return ret;
}

ret = data->ompio_fh.f_comm->c_coll.coll_barrier (data->ompio_fh.f_comm,
data->ompio_fh.f_comm->c_coll.coll_barrier_module);
if ( OMPI_SUCCESS != ret ) {
opal_output(1, ",mca_io_ompio_file_set_size: error in barrier\n");
return ret;
}

return ret;
}
Expand Down