Skip to content

Commit a10b45b

Browse files
authored
Merge pull request #8492 from rhc54/topic/dss
Remove stale OPAL dss and opal_tree code
2 parents 674d831 + 772bc83 commit a10b45b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+208
-11279
lines changed

.gitignore

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -640,15 +640,6 @@ test/datatype/position_noncontig
640640
test/datatype/unpack_ooo
641641
test/datatype/unpack_hetero
642642

643-
test/dss/dss_buffer
644-
test/dss/dss_copy
645-
test/dss/dss_size
646-
test/dss/dss_cmp
647-
test/dss/dss_release
648-
test/dss/dss_payload
649-
test/dss/dss_set_get
650-
test/dss/dss_print
651-
652643
test/event/signal-test
653644
test/event/event-test
654645
test/event/time-test

configure.ac

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1489,7 +1489,6 @@ AC_CONFIG_FILES([
14891489
test/event/Makefile
14901490
test/asm/Makefile
14911491
test/datatype/Makefile
1492-
test/dss/Makefile
14931492
test/class/Makefile
14941493
test/mpool/Makefile
14951494
test/support/Makefile

contrib/check_unnecessary_headers.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ SEARCH_HEADER[6]="opal/class/opal_list.h opal_list_t opal_list_item_t opal_list_
9191
SEARCH_HEADER[7]="opal/class/opal_object.h opal_object_t opal_class_t opal_construct_t opal_destruct_t OPAL_OBJ_STATIC_INIT OBJ_CLASS OBJ_CLASS_INSTANCE OBJ_CLASS_DECLARATION OBJ_NEW OBJ_RETAIN OBJ_RELEASE OBJ_CONSTRUCT OBJ_DESTRUCT opal_class_initialize opal_class_finalize opal_obj_run_constructors opal_obj_run_destructors opal_obj_new opal_obj_update"
9292
SEARCH_HEADER[8]="opal/class/opal_pointer_array.h opal_pointer_array_t opal_pointer_array_init opal_pointer_array_add opal_pointer_array_set_item opal_pointer_array_get_item opal_pointer_array_get_size opal_pointer_array_set_size opal_pointer_array_test_and_set_item opal_pointer_array_remove_all"
9393
SEARCH_HEADER[9]="opal/class/opal_value_array.h opal_value_array_t opal_value_array_init opal_value_array_reserve opal_value_array_get_size opal_value_array_set_size OPAL_VALUE_ARRAY_GET_ITEM opal_value_array_get_item OPAL_VALUE_ARRAY_SET_ITEM opal_value_array_set_item opal_value_array_append_item opal_value_array_remove_item OPAL_VALUE_ARRAY_GET_BASE"
94-
SEARCH_HEADER[10]="opal/constants.h OPAL_SUCCESS OPAL_ERROR OPAL_ERR_ OPAL_EXISTS"
95-
SEARCH_HEADER[11]="opal/dss/dss.h opal_dss_open opal_dss_close opal_dss_t opal_dss"
96-
SEARCH_HEADER[12]="opal/dss/dss_internal.h OPAL_DSS_DEFAULT_INITIAL_SIZE OPAL_DSS_DEFAULT_THRESHOLD_SIZE DSS_TYPE_SIZE_T DSS_TYPE_BOOL DSS_TYPE_INT DSS_TYPE_UINT DSS_TYPE_PID_T UNPACK_SIZE_MISMATCH opal_dss_type_info_t opal_dss_initialized opal_dss_debug opal_dss_verbose opal_dss_initial_size opal_dss_threshold_size opal_dss_types opal_dss_num_reg_types opal_dss_set opal_dss_get opal_dss_pack opal_dss_unpack opal_dss_copy opal_dss_compare opal_dss_print opal_dss_dump opal_dss_size opal_dss_peek opal_dss_unload opal_dss_load opal_dss_copy_payload opal_dss_register opal_dss_release opal_dss_lookup_data_type opal_dss_dump_data_types opal_dss_pack_buffer opal_dss_unpack_buffer opal_dss_std_copy opal_dss_compare_ opal_dss_std_size opal_dss_size_ opal_dss_print_ opal_dss_std_release opal_dss_std_obj_release opal_dss_release_byte_object opal_dss_buffer_extend opal_dss_too_small opal_dss_find_type opal_dss_store_data_type opal_dss_get_data_type"
97-
SEARCH_HEADER[13]="opal/dss/dss_types.h OPAL_DATA_TYPE_T OPAL_DSS_ID_MAX OPAL_DSS_ID_INVALID OPAL_UNDEF OPAL_BYTE OPAL_BOOL OPAL_STRING OPAL_SIZE OPAL_PID OPAL_INT OPAL_UINT OPAL_BYTE_OBJECT OPAL_DATA_TYPE OPAL_NULL OPAL_DATA_VALUE OPAL_PSTAT OPAL_DSS_ID_DYNAMIC OPAL_VALUE1_GREATER OPAL_VALUE2_GREATER OPAL_EQUAL opal_dss_value_t OPAL_DATA_VALUE_EMPTY OPAL_PSTAT_MAX_STRING_LEN opal_pstats_t OPAL_DSS_STRUCTURED OPAL_DSS_UNSTRUCTURED OPAL_DSS_BUFFER_NON_DESC OPAL_DSS_BUFFER_FULLY_DESC OPAL_DSS_BUFFER_TYPE_HTON OPAL_DSS_BUFFER_TYPE_NTOH opal_buffer_t"
94+
SEARCH_HEADER[10]="opal/constants.h OPAL_EXISTS"
95+
SEARCH_HEADER[11]="OPAL_SUCCESS"
96+
SEARCH_HEADER[12]="OPAL_ERROR"
97+
SEARCH_HEADER[13]="OPAL_ERR_"
9898
SEARCH_HEADER[14]="opal/hash_string.h OPAL_HASH_STR"
9999
SEARCH_HEADER[15]="opal/mca/crs.h OPAL_CRS_ opal_crs"
100100
SEARCH_HEADER[16]="opal/opal_socket_errno.h opal_socket_errno"

ompi/communicator/comm.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* Copyright (c) 2014-2020 Intel, Inc. All rights reserved.
2424
* Copyright (c) 2015 Mellanox Technologies. All rights reserved.
2525
* Copyright (c) 2017 IBM Corporation. All rights reserved.
26+
* Copyright (c) 2021 Nanook Consulting. All rights reserved.
2627
* $COPYRIGHT$
2728
*
2829
* Additional copyrights may follow
@@ -36,7 +37,6 @@
3637

3738
#include "ompi/constants.h"
3839
#include "opal/mca/hwloc/base/base.h"
39-
#include "opal/dss/dss.h"
4040
#include "opal/mca/pmix/pmix-internal.h"
4141
#include "opal/util/string_copy.h"
4242

@@ -1549,7 +1549,7 @@ int ompi_comm_get_rprocs ( ompi_communicator_t *local_comm,
15491549
ompi_proc_t **rprocs=NULL;
15501550
int32_t size_len;
15511551
int int_len=0, rlen;
1552-
opal_buffer_t *sbuf=NULL, *rbuf=NULL;
1552+
pmix_data_buffer_t *sbuf=NULL, *rbuf=NULL;
15531553
void *sendbuf=NULL;
15541554
char *recvbuf;
15551555
ompi_proc_t **proc_list = NULL;
@@ -1559,7 +1559,7 @@ int ompi_comm_get_rprocs ( ompi_communicator_t *local_comm,
15591559
local_size = ompi_comm_size (local_comm);
15601560

15611561
if (local_rank == local_leader) {
1562-
sbuf = OBJ_NEW(opal_buffer_t);
1562+
PMIX_DATA_BUFFER_CREATE(sbuf);
15631563
if (NULL == sbuf) {
15641564
rc = OMPI_ERR_OUT_OF_RESOURCE;
15651565
goto err_exit;
@@ -1579,7 +1579,9 @@ int ompi_comm_get_rprocs ( ompi_communicator_t *local_comm,
15791579
if ( OMPI_SUCCESS != rc ) {
15801580
goto err_exit;
15811581
}
1582-
if (OPAL_SUCCESS != (rc = opal_dss.unload(sbuf, &sendbuf, &size_len))) {
1582+
PMIX_DATA_BUFFER_UNLOAD(sbuf, sendbuf, size_len);
1583+
if (NULL == sendbuf) {
1584+
rc = OMPI_ERR_UNPACK_FAILURE;
15831585
goto err_exit;
15841586
}
15851587

@@ -1662,21 +1664,19 @@ int ompi_comm_get_rprocs ( ompi_communicator_t *local_comm,
16621664
goto err_exit;
16631665
}
16641666

1665-
rbuf = OBJ_NEW(opal_buffer_t);
1667+
PMIX_DATA_BUFFER_CREATE(rbuf);
16661668
if (NULL == rbuf) {
16671669
rc = OMPI_ERR_OUT_OF_RESOURCE;
16681670
goto err_exit;
16691671
}
16701672

1671-
if (OMPI_SUCCESS != (rc = opal_dss.load(rbuf, recvbuf, rlen))) {
1672-
goto err_exit;
1673-
}
1673+
PMIX_DATA_BUFFER_LOAD(rbuf, recvbuf, rlen);
16741674

16751675
/* decode the names into a proc-list -- will never add a new proc
16761676
as the result of this operation, so no need to get the newprocs
16771677
list or call PML add_procs(). */
16781678
rc = ompi_proc_unpack(rbuf, rsize, &rprocs, NULL, NULL);
1679-
OBJ_RELEASE(rbuf);
1679+
PMIX_DATA_BUFFER_RELEASE(rbuf);
16801680
if (OMPI_SUCCESS != rc) {
16811681
goto err_exit;
16821682
}
@@ -1713,10 +1713,10 @@ int ompi_comm_get_rprocs ( ompi_communicator_t *local_comm,
17131713
}
17141714
/* make sure the buffers have been released */
17151715
if (NULL != sbuf) {
1716-
OBJ_RELEASE(sbuf);
1716+
PMIX_DATA_BUFFER_RELEASE(sbuf);
17171717
}
17181718
if (NULL != rbuf) {
1719-
OBJ_RELEASE(rbuf);
1719+
PMIX_DATA_BUFFER_RELEASE(rbuf);
17201720
}
17211721
if ( NULL != proc_list ) {
17221722
free ( proc_list );

ompi/communicator/comm_cid.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* Copyright (c) 2016 IBM Corporation. All rights reserved.
2424
* Copyright (c) 2017 Mellanox Technologies. All rights reserved.
2525
* Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved.
26+
* Copyright (c) 2021 Nanook Consulting. All rights reserved.
2627
* $COPYRIGHT$
2728
*
2829
* Additional copyrights may follow
@@ -32,7 +33,6 @@
3233

3334
#include "ompi_config.h"
3435

35-
#include "opal/dss/dss.h"
3636
#include "opal/mca/pmix/base/base.h"
3737
#include "opal/util/printf.h"
3838

@@ -953,28 +953,28 @@ static int ompi_comm_allreduce_pmix_reduce_complete (ompi_comm_request_t *reques
953953
int32_t size_count = context->count;
954954
pmix_info_t info;
955955
pmix_pdata_t pdat;
956-
opal_buffer_t sbuf;
956+
pmix_data_buffer_t sbuf;
957957
int rc;
958958
int bytes_written;
959959
char *key;
960960
const int output_id = 0;
961961
const int verbosity_level = 1;
962962

963-
OBJ_CONSTRUCT(&sbuf, opal_buffer_t);
963+
PMIX_DATA_BUFFER_CONSTRUCT(&sbuf);
964964

965-
if (OPAL_SUCCESS != (rc = opal_dss.pack(&sbuf, context->tmpbuf, (int32_t)context->count, OPAL_INT))) {
966-
OBJ_DESTRUCT(&sbuf);
967-
opal_output_verbose (verbosity_level, output_id, "pack failed. rc %d\n", rc);
968-
return rc;
965+
rc = PMIx_Data_pack(NULL, &sbuf, context->tmpbuf, (int32_t)context->count, PMIX_INT);
966+
if (PMIX_SUCCESS != rc) {
967+
PMIX_DATA_BUFFER_DESTRUCT(&sbuf);
968+
opal_output_verbose (verbosity_level, output_id, "pack failed: %s\n", PMIx_Error_string(rc));
969+
return opal_pmix_convert_status(rc);
969970
}
970971

971972
PMIX_PDATA_CONSTRUCT(&pdat);
972973
PMIX_INFO_CONSTRUCT(&info);
973974
info.value.type = PMIX_BYTE_OBJECT;
974975

975-
opal_dss.unload(&sbuf, (void**)&info.value.data.bo.bytes, &rc);
976-
info.value.data.bo.size = rc;
977-
OBJ_DESTRUCT(&sbuf);
976+
PMIX_DATA_BUFFER_UNLOAD(&sbuf, info.value.data.bo.bytes, info.value.data.bo.size);
977+
PMIX_DATA_BUFFER_DESTRUCT(&sbuf);
978978

979979
bytes_written = opal_asprintf(&key,
980980
cid_context->send_first ? "%s:%s:send:%d"
@@ -1015,21 +1015,21 @@ static int ompi_comm_allreduce_pmix_reduce_complete (ompi_comm_request_t *reques
10151015
rc = opal_pmix_base_exchange(&info, &pdat, 600); // give them 10 minutes
10161016
PMIX_INFO_DESTRUCT(&info);
10171017
if (OPAL_SUCCESS != rc) {
1018-
OBJ_DESTRUCT(&pdat);
1018+
PMIX_PDATA_DESTRUCT(&pdat);
10191019
return rc;
10201020
}
10211021
if (PMIX_BYTE_OBJECT != pdat.value.type) {
1022-
OBJ_DESTRUCT(&pdat);
1022+
PMIX_PDATA_DESTRUCT(&pdat);
10231023
return OPAL_ERR_TYPE_MISMATCH;
10241024
}
10251025

1026-
OBJ_CONSTRUCT(&sbuf, opal_buffer_t);
1027-
opal_dss.load(&sbuf, pdat.value.data.bo.bytes, pdat.value.data.bo.size);
1026+
PMIX_DATA_BUFFER_CONSTRUCT(&sbuf);
1027+
PMIX_DATA_BUFFER_LOAD(&sbuf, pdat.value.data.bo.bytes, pdat.value.data.bo.size);
10281028

1029-
rc = opal_dss.unpack (&sbuf, context->outbuf, &size_count, OPAL_INT);
1030-
OBJ_DESTRUCT(&sbuf);
1031-
if (OPAL_UNLIKELY(OPAL_SUCCESS != rc)) {
1032-
return rc;
1029+
rc = PMIx_Data_unpack(NULL, &sbuf, context->outbuf, &size_count, PMIX_INT);
1030+
PMIX_DATA_BUFFER_DESTRUCT(&sbuf);
1031+
if (OPAL_UNLIKELY(PMIX_SUCCESS != rc)) {
1032+
return opal_pmix_convert_status(rc);
10331033
}
10341034

10351035
ompi_op_reduce (context->op, context->tmpbuf, context->outbuf, size_count, MPI_INT);

ompi/communicator/ft/comm_ft.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
* of Tennessee Research Foundation. All rights
66
* reserved.
77
*
8+
* Copyright (c) 2021 Nanook Consulting. All rights reserved.
89
* $COPYRIGHT$
910
*
1011
* Additional copyrights may follow
1112
*
1213
* $HEADER$
1314
*/
1415

15-
#include "opal/dss/dss.h"
16-
1716
#include "ompi/runtime/params.h"
1817
#include "ompi/group/group.h"
1918
#include "ompi/communicator/communicator.h"

ompi/communicator/ft/comm_ft_detector.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* of Tennessee Research Foundation. All rights
44
* reserved.
55
*
6+
* Copyright (c) 2021 Nanook Consulting. All rights reserved.
67
* $COPYRIGHT$
78
*
89
* Additional copyrights may follow
@@ -205,9 +206,9 @@ int ompi_comm_failure_detector_finalize(void) {
205206
/* wait until the observed process confirms he is not putting in our
206207
* memory (or everybody else is dead) */
207208
while( MPI_PROC_NULL != (observing = detector->hb_observing) ) {
209+
#if !FD_LOCAL_PROCS
208210
ompi_proc_t* proc = ompi_comm_peer_lookup(detector->comm, observing);
209211
assert( NULL != proc );
210-
#if !FD_LOCAL_PROCS
211212
if( OPAL_PROC_ON_LOCAL_NODE(proc->super.proc_flags) ) {
212213
break;
213214
}

ompi/dpm/dpm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* Copyright (c) 2014-2020 Research Organization for Information Science
2121
* and Technology (RIST). All rights reserved.
2222
* Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved.
23+
* Copyright (c) 2021 Nanook Consulting. All rights reserved.
2324
* $COPYRIGHT$
2425
*
2526
* Additional copyrights may follow
@@ -44,7 +45,6 @@
4445
#include "opal/util/proc.h"
4546
#include "opal/util/show_help.h"
4647
#include "opal/util/printf.h"
47-
#include "opal/dss/dss.h"
4848
#include "opal/mca/hwloc/base/base.h"
4949
#include "opal/mca/pmix/base/base.h"
5050

@@ -421,7 +421,7 @@ int ompi_dpm_connect_accept(ompi_communicator_t *comm, int root,
421421
/* get their locality string */
422422
val = NULL;
423423
OPAL_MODEX_RECV_VALUE_IMMEDIATE(rc, PMIX_LOCALITY_STRING,
424-
&proc->super.proc_name, &val, OPAL_STRING);
424+
&proc->super.proc_name, &val, PMIX_STRING);
425425
if (OPAL_SUCCESS == rc && NULL != ompi_process_info.locality) {
426426
u16 = opal_hwloc_compute_relative_locality(ompi_process_info.locality, val);
427427
free(val);

ompi/errhandler/errhandler.c

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* Copyright (c) 2015 Research Organization for Information Science
1717
* and Technology (RIST). All rights reserved.
1818
* Copyright (c) 2015-2019 Intel, Inc. All rights reserved.
19+
* Copyright (c) 2021 Nanook Consulting. All rights reserved.
1920
* $COPYRIGHT$
2021
*
2122
* Additional copyrights may follow
@@ -423,20 +424,31 @@ typedef struct ompi_errhandler_event_s {
423424
int status;
424425
opal_process_name_t source;
425426
int nvalue;
426-
opal_value_t value[];
427+
pmix_info_t info[];
427428
} ompi_errhandler_event_t;
428429

429430
static void *ompi_errhandler_event_cb(int fd, int flags, void *context) {
430431
ompi_errhandler_event_t *event = (ompi_errhandler_event_t*) context;
431432
int status = event->status;
432433
opal_process_name_t source = event->source;
434+
opal_process_name_t prc;
435+
int rc;
433436
#if OPAL_ENABLE_FT_MPI
434437
if( PMIX_ERR_PROC_ABORTED == status ) {
435438
int i;
436439
for(i = 0; i < event->nvalue; i++) {
437-
if(OPAL_NAME != event->value[i].type) continue;
438-
ompi_proc_t *proc = (ompi_proc_t*)ompi_proc_for_name(event->value[i].data.name);
439-
if( NULL == proc ) continue; /* we are not 'MPI connected' with this proc. */
440+
if (PMIX_PROC != event->info[i].value.type) {
441+
continue;
442+
}
443+
OPAL_PMIX_CONVERT_PROCT(rc, &prc, event->info[i].value.data.proc);
444+
if (OPAL_SUCCESS != rc) {
445+
OPAL_ERROR_LOG(rc);
446+
break;
447+
}
448+
ompi_proc_t *proc = (ompi_proc_t*)ompi_proc_for_name(prc);
449+
if( NULL == proc ) {
450+
continue; /* we are not 'MPI connected' with this proc. */
451+
}
440452
assert( !ompi_proc_is_sentinel(proc) );
441453
ompi_errhandler_proc_failed_internal(proc, status, false);
442454
}
@@ -490,7 +502,7 @@ void ompi_errhandler_callback(size_t refid, pmix_status_t status,
490502
/* an error has been found, report to the MPI layer and let it take
491503
* further action. */
492504
/* transition this from the RTE thread to the MPI progress engine */
493-
ompi_errhandler_event_t *event = malloc(sizeof(*event)+ninfo*sizeof(opal_value_t));
505+
ompi_errhandler_event_t *event = malloc(sizeof(*event)+ninfo*sizeof(pmix_info_t));
494506
if(NULL == event) {
495507
OMPI_ERROR_LOG(OMPI_ERR_OUT_OF_RESOURCE);
496508
goto error;
@@ -503,8 +515,8 @@ void ompi_errhandler_callback(size_t refid, pmix_status_t status,
503515
goto error;
504516
}
505517
event->nvalue = ninfo;
506-
for(i = 0; i < ninfo; i++) {
507-
opal_pmix_value_unload(&event->value[i], &info[i].value);
518+
for (i = 0; i < ninfo; i++) {
519+
PMIX_INFO_XFER(&event->info[i], &info[i]);
508520
}
509521
opal_event_set(opal_sync_event_base, &event->super, -1, OPAL_EV_READ,
510522
ompi_errhandler_event_cb, event);

0 commit comments

Comments
 (0)