@@ -373,17 +373,18 @@ static inline bool ompi_proc_is_sentinel (ompi_proc_t *proc)
373
373
* we assume an ompi_proc_t is at least aligned on two bytes,
374
374
* so if the LSB of a pointer to an ompi_proc_t is 1, we have to handle
375
375
* this pointer as a sentinel instead of a pointer.
376
- * a sentinel can be seen as a 64 bits array with the following format :
376
+ * a sentinel can be seen as an uint64_t with the following format :
377
377
* - bit 0 : 1
378
378
* - bits 1-15 : local jobid
379
379
* - bits 16-31 : job family
380
380
* - bits 32-63 : vpid
381
381
*/
382
382
static inline uintptr_t ompi_proc_name_to_sentinel (opal_process_name_t name )
383
383
{
384
- uintptr_t tmp , sentinel = 0x1 ;
384
+ uintptr_t tmp , sentinel = 0 ;
385
385
/* local jobid must fit in 15 bits */
386
386
assert (! (ORTE_LOCAL_JOBID (name .jobid ) & 0x8000 ));
387
+ sentinel |= 0x1 ;
387
388
tmp = (uintptr_t )ORTE_LOCAL_JOBID (name .jobid );
388
389
sentinel |= ((tmp << 1 ) & 0xfffe );
389
390
tmp = (uintptr_t )ORTE_JOB_FAMILY (name .jobid );
@@ -396,7 +397,7 @@ static inline uintptr_t ompi_proc_name_to_sentinel (opal_process_name_t name)
396
397
static inline opal_process_name_t ompi_proc_sentinel_to_name (uintptr_t sentinel )
397
398
{
398
399
opal_process_name_t name ;
399
- uint16_t local , family ;
400
+ uint32_t local , family ;
400
401
uint32_t vpid ;
401
402
assert (sentinel & 0x1 );
402
403
local = (sentinel >> 1 ) & 0x7fff ;
0 commit comments