Commit 07a30168 authored by Rob Latham's avatar Rob Latham
Browse files

optionally display ROMIO hints



We often have a pretty good idea what hints are in use but it's not a
big deal to dump to stdout a list of the key-value pairs to confirm.
Signed-off-by: default avatarPaul Coffman <pkcoff@us.ibm.com>
parent 2d947bf5
......@@ -126,7 +126,12 @@ MPI_File ADIO_Open(MPI_Comm orig_comm,
if (*error_code != MPI_SUCCESS)
goto fn_exit;
}
/* for debugging, it can be helpful to see the hints selected */
char *p = getenv("ROMIO_PRINT_HINTS");
if (rank == 0 && p != NULL ) {
ADIOI_Info_print_keyvals(fd->info);
}
/* deferred open: if we are an aggregator, create a new communicator.
* we'll use this aggregator communicator for opens and closes.
* otherwise, we have a NULL communicator until we try to do independent
......
......@@ -40,24 +40,23 @@
#define ROMIO_HINT_DEFAULT_CFG "/etc/romio-hints"
#define ROMIO_HINT_ENV_VAR "ROMIO_HINTS"
/* should suppress unused warnings on GCC */
static void dump_keys(MPI_Info info) ATTRIBUTE((unused, used));
/* debug function: a routine I want in the library to make my life easier when
* using a source debugger. please ignore any "defined but not used" warnings
*/
static void dump_keys(MPI_Info info)
* using a source debugger. Now optionally used in ADIO_Open. */
void ADIOI_Info_print_keyvals(MPI_Info info)
{
int i, nkeys, flag;
char key[MPI_MAX_INFO_KEY];
char value[MPI_MAX_INFO_VAL];
if (info == MPI_INFO_NULL)
return;
MPI_Info_get_nkeys(info, &nkeys);
for (i=0; i<nkeys; i++) {
MPI_Info_get_nthkey(info, i, key);
ADIOI_Info_get(info, key, MPI_MAX_INFO_VAL-1, value, &flag);
printf("key = %s, value = %s\n", key, value);
printf("key = %-25s value = %-10s\n", key, value);
}
return;
}
......
......@@ -345,6 +345,7 @@ void ADIOI_Get_byte_offset(ADIO_File fd, ADIO_Offset offset,
void ADIOI_process_system_hints(MPI_Info info);
void ADIOI_incorporate_system_hints(MPI_Info info, MPI_Info sysinfo,
MPI_Info *new_info);
void ADIOI_Info_print_keyvals(MPI_Info info);
void ADIOI_GEN_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment