Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions orte/mca/ess/pmi/ess_pmi_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ static int rte_init(void)
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
return ORTE_ERR_OUT_OF_RESOURCE;
}
opal_output_verbose(2, orte_ess_base_framework.framework_output,
"%s transport key %s",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), string_key);
asprintf(&envar, OPAL_MCA_PREFIX"orte_precondition_transports=%s", string_key);
putenv(envar);
added_transport_keys = true;
Expand Down
14 changes: 13 additions & 1 deletion orte/util/pre_condition_transports.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static inline void orte_pre_condition_transports_use_rand(uint64_t* unique_key)
char* orte_pre_condition_transports_print(uint64_t *unique_key)
{
unsigned int *int_ptr;
size_t i, string_key_len, written_len;
size_t i, j, string_key_len, written_len;
char *string_key = NULL, *format = NULL;

/* string is two 64 bit numbers printed in hex with a dash between
Expand Down Expand Up @@ -92,6 +92,12 @@ char* orte_pre_condition_transports_print(uint64_t *unique_key)
/* print the first number */
int_ptr = (unsigned int*) &unique_key[0];
for (i = 0 ; i < sizeof(uint64_t) / sizeof(unsigned int) ; ++i) {
if (0 == int_ptr[i]) {
/* inject some energy */
for (j=0; j < sizeof(unsigned int); j++) {
int_ptr[i] |= j << j;
}
}
snprintf(string_key + written_len,
string_key_len - written_len,
format, int_ptr[i]);
Expand All @@ -105,6 +111,12 @@ char* orte_pre_condition_transports_print(uint64_t *unique_key)
/* print the second number */
int_ptr = (unsigned int*) &unique_key[1];
for (i = 0 ; i < sizeof(uint64_t) / sizeof(unsigned int) ; ++i) {
if (0 == int_ptr[i]) {
/* inject some energy */
for (j=0; j < sizeof(unsigned int); j++) {
int_ptr[i] |= j << j;
}
}
snprintf(string_key + written_len,
string_key_len - written_len,
format, int_ptr[i]);
Expand Down