@@ -220,8 +220,8 @@ int orte_util_nidmap_create(opal_pointer_array_t *pool,
220
220
221
221
int orte_util_decode_nidmap (opal_buffer_t * buf )
222
222
{
223
- uint8_t u8 , * vp8 = NULL , * flags = NULL ;
224
- uint16_t * vp16 = NULL , * slots = NULL ;
223
+ uint8_t u8 , * vp8 = NULL ;
224
+ uint16_t * vp16 = NULL ;
225
225
uint32_t * vp32 = NULL , vpid ;
226
226
int cnt , rc , nbytes , n ;
227
227
bool compressed ;
@@ -364,98 +364,6 @@ int orte_util_decode_nidmap(opal_buffer_t *buf)
364
364
vp8 = NULL ;
365
365
}
366
366
367
-
368
- /* unpack compression flag for slots */
369
- cnt = 1 ;
370
- if (OPAL_SUCCESS != (rc = opal_dss .unpack (buf , & compressed , & cnt , OPAL_BOOL ))) {
371
- ORTE_ERROR_LOG (rc );
372
- goto cleanup ;
373
- }
374
-
375
- /* if compressed, get the uncompressed size */
376
- if (compressed ) {
377
- cnt = 1 ;
378
- if (OPAL_SUCCESS != (rc = opal_dss .unpack (buf , & sz , & cnt , OPAL_SIZE ))) {
379
- ORTE_ERROR_LOG (rc );
380
- goto cleanup ;
381
- }
382
- }
383
-
384
- /* unpack the slots object */
385
- cnt = 1 ;
386
- if (OPAL_SUCCESS != (rc = opal_dss .unpack (buf , & boptr , & cnt , OPAL_BYTE_OBJECT ))) {
387
- ORTE_ERROR_LOG (rc );
388
- goto cleanup ;
389
- }
390
-
391
- /* if compressed, decompress */
392
- if (compressed ) {
393
- if (!opal_compress .decompress_block ((uint8_t * * )& slots , sz ,
394
- boptr -> bytes , boptr -> size )) {
395
- ORTE_ERROR_LOG (ORTE_ERROR );
396
- if (NULL != boptr -> bytes ) {
397
- free (boptr -> bytes );
398
- }
399
- free (boptr );
400
- rc = ORTE_ERROR ;
401
- goto cleanup ;
402
- }
403
- } else {
404
- slots = (uint16_t * )boptr -> bytes ;
405
- boptr -> bytes = NULL ;
406
- boptr -> size = 0 ;
407
- }
408
- if (NULL != boptr -> bytes ) {
409
- free (boptr -> bytes );
410
- }
411
- free (boptr );
412
-
413
-
414
- /* unpack compression flag for node flags */
415
- cnt = 1 ;
416
- if (OPAL_SUCCESS != (rc = opal_dss .unpack (buf , & compressed , & cnt , OPAL_BOOL ))) {
417
- ORTE_ERROR_LOG (rc );
418
- goto cleanup ;
419
- }
420
-
421
- /* if compressed, get the uncompressed size */
422
- if (compressed ) {
423
- cnt = 1 ;
424
- if (OPAL_SUCCESS != (rc = opal_dss .unpack (buf , & sz , & cnt , OPAL_SIZE ))) {
425
- ORTE_ERROR_LOG (rc );
426
- goto cleanup ;
427
- }
428
- }
429
-
430
- /* unpack the node flags object */
431
- cnt = 1 ;
432
- if (OPAL_SUCCESS != (rc = opal_dss .unpack (buf , & boptr , & cnt , OPAL_BYTE_OBJECT ))) {
433
- ORTE_ERROR_LOG (rc );
434
- goto cleanup ;
435
- }
436
-
437
- /* if compressed, decompress */
438
- if (compressed ) {
439
- if (!opal_compress .decompress_block ((uint8_t * * )& flags , sz ,
440
- boptr -> bytes , boptr -> size )) {
441
- ORTE_ERROR_LOG (ORTE_ERROR );
442
- if (NULL != boptr -> bytes ) {
443
- free (boptr -> bytes );
444
- }
445
- free (boptr );
446
- rc = ORTE_ERROR ;
447
- goto cleanup ;
448
- }
449
- } else {
450
- flags = (uint8_t * )boptr -> bytes ;
451
- boptr -> bytes = NULL ;
452
- boptr -> size = 0 ;
453
- }
454
- if (NULL != boptr -> bytes ) {
455
- free (boptr -> bytes );
456
- }
457
- free (boptr );
458
-
459
367
/* if we are the HNP, we don't need any of this stuff */
460
368
if (ORTE_PROC_IS_HNP ) {
461
369
goto cleanup ;
@@ -478,12 +386,6 @@ int orte_util_decode_nidmap(opal_buffer_t *buf)
478
386
nd = OBJ_NEW (orte_node_t );
479
387
nd -> name = names [n ];
480
388
opal_pointer_array_set_item (orte_node_pool , n , nd );
481
- /* set the #slots */
482
- nd -> slots = slots [n ];
483
- /* set the flags */
484
- if (1 == flags [n ]) {
485
- ORTE_FLAG_SET (nd , ORTE_NODE_FLAG_SLOTS_GIVEN );
486
- }
487
389
/* set the topology - always default to homogeneous
488
390
* as that is the most common scenario */
489
391
nd -> topology = t ;
@@ -526,6 +428,18 @@ int orte_util_decode_nidmap(opal_buffer_t *buf)
526
428
}
527
429
528
430
cleanup :
431
+ if (NULL != vp8 ) {
432
+ free (vp8 );
433
+ }
434
+ if (NULL != vp16 ) {
435
+ free (vp16 );
436
+ }
437
+ if (NULL != vp32 ) {
438
+ free (vp32 );
439
+ }
440
+ if (NULL != names ) {
441
+ opal_argv_free (names );
442
+ }
529
443
return rc ;
530
444
}
531
445
0 commit comments