1
1

Merge pull request #5561 from edgargabriel/pr/file_open_sharedfp_ordering

common/ompio: fix an ordering problem during file_open
Этот коммит содержится в:
Edgar Gabriel 2018-08-20 10:18:14 -05:00 коммит произвёл GitHub
родитель eaabfdd028 2742273ee3
Коммит e6a344ba63
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23

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

@ -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-2017 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.
@ -164,15 +164,6 @@ int mca_common_ompio_file_open (ompi_communicator_t *comm,
goto fn_fail;
}
/* Set default file view */
mca_common_ompio_set_view(ompio_fh,
0,
&ompi_mpi_byte.dt,
&ompi_mpi_byte.dt,
"native",
info);
if ( true == use_sharedfp ) {
/* open the file once more for the shared file pointer if required.
** Can be disabled by the user if no shared file pointer operations
@ -191,6 +182,15 @@ int mca_common_ompio_file_open (ompi_communicator_t *comm,
}
}
/* Set default file view */
mca_common_ompio_set_view(ompio_fh,
0,
&ompi_mpi_byte.dt,
&ompi_mpi_byte.dt,
"native",
info);
/* If file has been opened in the append mode, move the internal
file pointer of OMPIO to the very end of the file. */
@ -506,7 +506,7 @@ int mca_common_ompio_file_delete (const char *filename,
return ret;
}
ret = fh->f_fs->fs_file_delete (filename, NULL);
ret = fh->f_fs->fs_file_delete ( (char *)filename, NULL);
free(fh);
if (OMPI_SUCCESS != ret) {