This repository was archived by the owner on Sep 30, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 2727
2828static const char FUNC_NAME [] = "MPI_Win_get_info" ;
2929
30+ static void _win_info_set (ompi_info_t * info , const char * key , int set )
31+ {
32+ ompi_info_set (info , key , set ? "true" : "false" );
33+ }
3034
3135int MPI_Win_get_info (MPI_Win win , MPI_Info * info_used )
3236{
@@ -50,11 +54,10 @@ int MPI_Win_get_info(MPI_Win win, MPI_Info *info_used)
5054
5155 if (OMPI_SUCCESS == ret && * info_used ) {
5256 /* set standard info keys based on what the OSC module is using */
53- if (win -> w_flags & OMPI_WIN_NO_LOCKS ) {
54- ompi_info_set (* info_used , "no_locks" , "true" );
55- } else {
56- ompi_info_set (* info_used , "no_locks" , "false" );
57- }
57+
58+ _win_info_set (* info_used , "no_locks" , win -> w_flags & OMPI_WIN_NO_LOCKS );
59+ _win_info_set (* info_used , "same_size" , win -> w_flags & OMPI_WIN_SAME_SIZE );
60+ _win_info_set (* info_used , "same_disp_unit" , win -> w_flags & OMPI_WIN_SAME_DISP );
5861 }
5962
6063 OMPI_ERRHANDLER_RETURN (ret , win , ret , FUNC_NAME );
Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ BEGIN_C_DECLS
4141#define OMPI_WIN_FREED 0x00000001
4242#define OMPI_WIN_INVALID 0x00000002
4343#define OMPI_WIN_NO_LOCKS 0x00000004
44+ #define OMPI_WIN_SAME_DISP 0x00000008
45+ #define OMPI_WIN_SAME_SIZE 0x00000010
4446
4547OMPI_DECLSPEC extern opal_pointer_array_t ompi_mpi_windows ;
4648
You can’t perform that action at this time.
0 commit comments