io/ompio: execute barrier before sync
this ensures that all processes are done modifying a file before syncing. Fixes an error in the testmpio testsuite. Signed-off-by: Edgar Gabriel <egabriel@central.uh.edu>
Этот коммит содержится в:
родитель
bf058ca6b0
Коммит
849d0452a0
@ -9,7 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2008-2016 University of Houston. All rights reserved.
|
||||
* Copyright (c) 2008-2018 University of Houston. All rights reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
|
||||
@ -372,6 +372,13 @@ int mca_io_ompio_file_sync (ompi_file_t *fh)
|
||||
OPAL_THREAD_UNLOCK(&fh->f_lock);
|
||||
return MPI_ERR_ACCESS;
|
||||
}
|
||||
// Make sure all processes reach this point before syncing the file.
|
||||
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 ( MPI_SUCCESS != ret ) {
|
||||
OPAL_THREAD_UNLOCK(&fh->f_lock);
|
||||
return ret;
|
||||
}
|
||||
ret = data->ompio_fh.f_fs->fs_file_sync (&data->ompio_fh);
|
||||
OPAL_THREAD_UNLOCK(&fh->f_lock);
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user