@@ -64,7 +64,7 @@ static inline void orte_pre_condition_transports_use_rand(uint64_t* unique_key)
6464char * orte_pre_condition_transports_print (uint64_t * unique_key )
6565{
6666 unsigned int * int_ptr ;
67- size_t i , string_key_len , written_len ;
67+ size_t i , j , string_key_len , written_len ;
6868 char * string_key = NULL , * format = NULL ;
6969
7070 /* string is two 64 bit numbers printed in hex with a dash between
@@ -92,6 +92,12 @@ char* orte_pre_condition_transports_print(uint64_t *unique_key)
9292 /* print the first number */
9393 int_ptr = (unsigned int * ) & unique_key [0 ];
9494 for (i = 0 ; i < sizeof (uint64_t ) / sizeof (unsigned int ) ; ++ i ) {
95+ if (0 == int_ptr [i ]) {
96+ /* inject some energy */
97+ for (j = 0 ; j < sizeof (unsigned int ); j ++ ) {
98+ int_ptr [i ] |= j << j ;
99+ }
100+ }
95101 snprintf (string_key + written_len ,
96102 string_key_len - written_len ,
97103 format , int_ptr [i ]);
@@ -105,6 +111,12 @@ char* orte_pre_condition_transports_print(uint64_t *unique_key)
105111 /* print the second number */
106112 int_ptr = (unsigned int * ) & unique_key [1 ];
107113 for (i = 0 ; i < sizeof (uint64_t ) / sizeof (unsigned int ) ; ++ i ) {
114+ if (0 == int_ptr [i ]) {
115+ /* inject some energy */
116+ for (j = 0 ; j < sizeof (unsigned int ); j ++ ) {
117+ int_ptr [i ] |= j << j ;
118+ }
119+ }
108120 snprintf (string_key + written_len ,
109121 string_key_len - written_len ,
110122 format , int_ptr [i ]);
0 commit comments