ompi/win: add internal support for returning same_size and same_disp_unit info keys
Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
Этот коммит содержится в:
родитель
b933eda36b
Коммит
b8356dae05
@ -27,6 +27,10 @@
|
||||
|
||||
static const char FUNC_NAME[] = "MPI_Win_get_info";
|
||||
|
||||
static void _win_info_set (ompi_info_t *info, const char *key, int set)
|
||||
{
|
||||
ompi_info_set (info, key, set ? "true" : "false");
|
||||
}
|
||||
|
||||
int MPI_Win_get_info(MPI_Win win, MPI_Info *info_used)
|
||||
{
|
||||
@ -50,11 +54,10 @@ int MPI_Win_get_info(MPI_Win win, MPI_Info *info_used)
|
||||
|
||||
if (OMPI_SUCCESS == ret && *info_used) {
|
||||
/* set standard info keys based on what the OSC module is using */
|
||||
if (win->w_flags & OMPI_WIN_NO_LOCKS) {
|
||||
ompi_info_set (*info_used, "no_locks", "true");
|
||||
} else {
|
||||
ompi_info_set (*info_used, "no_locks", "false");
|
||||
}
|
||||
|
||||
_win_info_set (*info_used, "no_locks", win->w_flags & OMPI_WIN_NO_LOCKS);
|
||||
_win_info_set (*info_used, "same_size", win->w_flags & OMPI_WIN_SAME_SIZE);
|
||||
_win_info_set (*info_used, "same_disp_unit", win->w_flags & OMPI_WIN_SAME_DISP);
|
||||
}
|
||||
|
||||
OMPI_ERRHANDLER_RETURN(ret, win, ret, FUNC_NAME);
|
||||
|
@ -41,6 +41,8 @@ BEGIN_C_DECLS
|
||||
#define OMPI_WIN_FREED 0x00000001
|
||||
#define OMPI_WIN_INVALID 0x00000002
|
||||
#define OMPI_WIN_NO_LOCKS 0x00000004
|
||||
#define OMPI_WIN_SAME_DISP 0x00000008
|
||||
#define OMPI_WIN_SAME_SIZE 0x00000010
|
||||
|
||||
OMPI_DECLSPEC extern opal_pointer_array_t ompi_mpi_windows;
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user