Fix issue that came up with testing some LANL romio applications.
MPI_FILE_GET_INFO should return the info currently in use, not the one used to create the file handle. ROMIO adds a bunch of keys, so you can create a file handle with MPI_INFO_NULL and have MPI_FILE_GET_INFO return something totatlly different. This commit was SVN r10312.
Этот коммит содержится в:
родитель
57bdb323b0
Коммит
480ffd3045
@ -51,7 +51,8 @@ struct ompi_file_t {
|
||||
/** Amode that this file was created with */
|
||||
int f_amode;
|
||||
|
||||
/** MPI_Info that this file was created with */
|
||||
/** MPI_Info that this file was created with. Note that this is
|
||||
*NOT* what should be returned from OMPI_FILE_GET_INFO! */
|
||||
struct ompi_info_t *f_info;
|
||||
|
||||
/** Bit flags */
|
||||
|
@ -48,14 +48,20 @@ int MPI_File_get_info(MPI_File fh, MPI_Info *info_used)
|
||||
OMPI_ERRHANDLER_CHECK(rc, fh, rc, FUNC_NAME);
|
||||
}
|
||||
|
||||
/* Copy the handle and increase the refcount if it's not NULL */
|
||||
/* Call the back-end io component function */
|
||||
|
||||
*info_used = fh->f_info;
|
||||
if (NULL != fh->f_info) {
|
||||
OBJ_RETAIN(fh->f_info);
|
||||
switch (fh->f_io_version) {
|
||||
case MCA_IO_BASE_V_1_0_0:
|
||||
rc = fh->f_io_selected_module.v1_0_0.
|
||||
io_module_file_get_info(fh, info_used);
|
||||
break;
|
||||
|
||||
default:
|
||||
rc = MPI_ERR_INTERN;
|
||||
break;
|
||||
}
|
||||
|
||||
/* One of the few times that we know that we can succeed. Woot! */
|
||||
|
||||
return MPI_SUCCESS;
|
||||
/* All done */
|
||||
|
||||
OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME);
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user