From 492f98f8a5502e281976f4d13efeaf43916b4661 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Fri, 21 Jul 2017 09:40:57 -0700 Subject: [PATCH] Update to latest PMIx v2.1.0a Signed-off-by: Ralph Castain --- opal/mca/pmix/pmix2x/Makefile.am | 2 +- opal/mca/pmix/pmix2x/pmix/VERSION | 8 +- .../pmix2x/pmix/config/pmix_setup_libevent.m4 | 9 +- .../pmix/src/buffer_ops/internal_functions.c | 118 --- .../pmix/pmix2x/pmix/src/client/pmix_client.c | 104 ++- .../pmix2x/pmix/src/client/pmix_client_get.c | 112 +-- .../pmix2x/pmix/src/mca/bfrops/base/base.h | 756 +++++++++--------- .../src/mca/bfrops/base/bfrop_base_frame.c | 30 - .../pmix2x/pmix/src/mca/bfrops/bfrops_types.h | 20 - .../pmix2x/pmix/src/mca/gds/ds12/.pmix_ignore | 0 .../pmix2x/pmix/src/mca/gds/ds12/gds_dstore.c | 53 +- opal/mca/pmix/pmix2x/pmix/src/mca/gds/gds.h | 33 + .../pmix2x/pmix/src/mca/gds/hash/gds_hash.c | 108 ++- .../pmix/pmix2x/pmix/src/mca/pnet/base/base.h | 20 +- .../pmix/pmix2x/pmix/src/mca/preg/Makefile.am | 2 +- .../pmix/pmix2x/pmix/src/mca/preg/base/base.h | 6 +- .../pmix/src/mca/preg/base/preg_base_frame.c | 30 + .../pmix/src/mca/preg/native/preg_native.c | 2 +- opal/mca/pmix/pmix2x/pmix/src/mca/preg/preg.h | 2 + .../pmix2x/pmix/src/mca/preg/preg_types.h | 59 ++ .../pmix/pmix2x/pmix/src/mca/psec/base/base.h | 4 +- .../pmix2x/pmix/src/mca/pshmem/base/base.h | 4 +- .../pmix/pmix2x/pmix/src/mca/ptl/base/base.h | 2 +- .../pmix2x/pmix/src/server/pmix_server_get.c | 66 +- .../pmix/pmix2x/pmix/src/threads/wait_sync.h | 1 - 25 files changed, 725 insertions(+), 826 deletions(-) delete mode 100644 opal/mca/pmix/pmix2x/pmix/src/buffer_ops/internal_functions.c delete mode 100644 opal/mca/pmix/pmix2x/pmix/src/mca/gds/ds12/.pmix_ignore create mode 100644 opal/mca/pmix/pmix2x/pmix/src/mca/preg/preg_types.h diff --git a/opal/mca/pmix/pmix2x/Makefile.am b/opal/mca/pmix/pmix2x/Makefile.am index 206f22c225..049238c6a4 100644 --- a/opal/mca/pmix/pmix2x/Makefile.am +++ b/opal/mca/pmix/pmix2x/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright (c) 2014-2016 Intel, Inc. All rights reserved. +# Copyright (c) 2014-2017 Intel, Inc. All rights reserved. # Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. diff --git a/opal/mca/pmix/pmix2x/pmix/VERSION b/opal/mca/pmix/pmix2x/pmix/VERSION index 3a804c6ca4..174815ddd2 100644 --- a/opal/mca/pmix/pmix2x/pmix/VERSION +++ b/opal/mca/pmix/pmix2x/pmix/VERSION @@ -13,8 +13,8 @@ # major, minor, and release are generally combined in the form # ... -major=3 -minor=0 +major=2 +minor=1 release=0 # greek is used for alpha or beta release tags. If it is non-empty, @@ -30,7 +30,7 @@ greek= # command, or with the date (if "git describe" fails) in the form of # "date". -repo_rev=gitd26d689 +repo_rev=git59f8ecb # If tarball_version is not empty, it is used as the version string in # the tarball filename, regardless of all other versions listed in @@ -44,7 +44,7 @@ tarball_version= # The date when this release was created -date="Jul 06, 2017" +date="Jul 21, 2017" # The shared library version of each of PMIx's public libraries. # These versions are maintained in accordance with the "Library diff --git a/opal/mca/pmix/pmix2x/pmix/config/pmix_setup_libevent.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_setup_libevent.m4 index e8e62a914e..7643863965 100644 --- a/opal/mca/pmix/pmix2x/pmix/config/pmix_setup_libevent.m4 +++ b/opal/mca/pmix/pmix2x/pmix/config/pmix_setup_libevent.m4 @@ -3,6 +3,8 @@ # Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved. # Copyright (c) 2013-2017 Intel, Inc. All rights reserved. +# Copyright (c) 2017 Research Organization for Information Science +# and Technology (RIST). All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -39,8 +41,11 @@ AC_DEFUN([_PMIX_LIBEVENT_EMBEDDED_MODE],[ AC_MSG_CHECKING([for libevent]) AC_MSG_RESULT([assumed available (embedded mode)]) - PMIX_EVENT_HEADER="$with_libevent_header" - PMIX_EVENT2_THREAD_HEADER="$with_libevent_header" + AS_IF([test -z "$with_libevent_header" || test "$with_libevent_header" = "yes"], + [PMIX_EVENT_HEADER="" + PMIX_EVENT2_THREAD_HEADER=""], + [PMIX_EVENT_HEADER="$with_libevent_header" + PMIX_EVENT2_THREAD_HEADER="$with_libevent_header"]) ]) diff --git a/opal/mca/pmix/pmix2x/pmix/src/buffer_ops/internal_functions.c b/opal/mca/pmix/pmix2x/pmix/src/buffer_ops/internal_functions.c deleted file mode 100644 index d22333ffce..0000000000 --- a/opal/mca/pmix/pmix2x/pmix/src/buffer_ops/internal_functions.c +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2006 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * Copyright (c) 2004-2005 The Regents of the University of California. - * All rights reserved. - * Copyright (c) 2015-2017 Intel, Inc. All rights reserved. - * Copyright (c) 2016 IBM Corporation. All rights reserved. - * Copyright (c) 2017 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include - - -#include -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "src/class/pmix_pointer_array.h" - -#include "src/buffer_ops/internal.h" - -/** - * Internal function that resizes (expands) an inuse buffer if - * necessary. - */ -char* pmix_bfrop_buffer_extend(pmix_buffer_t *buffer, size_t bytes_to_add) -{ - size_t required, to_alloc; - size_t pack_offset, unpack_offset; - char *tmp; - - /* Check to see if we have enough space already */ - - if ((buffer->bytes_allocated - buffer->bytes_used) >= bytes_to_add) { - return buffer->pack_ptr; - } - - required = buffer->bytes_used + bytes_to_add; - if (required >= pmix_bfrop_threshold_size) { - to_alloc = (required + pmix_bfrop_threshold_size - 1) & ~(pmix_bfrop_threshold_size - 1); - } else { - to_alloc = buffer->bytes_allocated ? buffer->bytes_allocated : pmix_bfrop_initial_size; - while(to_alloc < required) { - to_alloc <<= 1; - } - } - - pack_offset = ((char*) buffer->pack_ptr) - ((char*) buffer->base_ptr); - unpack_offset = ((char*) buffer->unpack_ptr) - ((char*) buffer->base_ptr); - tmp = (char*)realloc(buffer->base_ptr, to_alloc); - if (NULL == tmp) { - return NULL; - } - - buffer->base_ptr = tmp; - - /* This memset is meant to keep valgrind happy. If possible it should be removed - * in the future. */ - memset(buffer->base_ptr + pack_offset, 0, to_alloc - buffer->bytes_allocated); - - buffer->pack_ptr = ((char*) buffer->base_ptr) + pack_offset; - buffer->unpack_ptr = ((char*) buffer->base_ptr) + unpack_offset; - buffer->bytes_allocated = to_alloc; - - /* All done */ - - return buffer->pack_ptr; -} - -/* - * Internal function that checks to see if the specified number of bytes - * remain in the buffer for unpacking - */ -bool pmix_bfrop_too_small(pmix_buffer_t *buffer, size_t bytes_reqd) -{ - size_t bytes_remaining_packed; - - if (buffer->pack_ptr < buffer->unpack_ptr) { - return true; - } - - bytes_remaining_packed = buffer->pack_ptr - buffer->unpack_ptr; - - if (bytes_remaining_packed < bytes_reqd) { - /* don't error log this - it could be that someone is trying to - * simply read until the buffer is empty - */ - return true; - } - - return false; -} - -pmix_status_t pmix_bfrop_store_data_type(pmix_buffer_t *buffer, pmix_data_type_t type) -{ - /* Lookup the pack function for the actual pmix_data_type type and call it */ - return pmix_bfrop_pack_datatype(buffer, &type, 1, PMIX_DATA_TYPE); -} - -pmix_status_t pmix_bfrop_get_data_type(pmix_buffer_t *buffer, pmix_data_type_t *type) -{ - int32_t cnt = 1; - - return pmix_bfrop_unpack_datatype(buffer, type, &cnt, PMIX_DATA_TYPE); -} diff --git a/opal/mca/pmix/pmix2x/pmix/src/client/pmix_client.c b/opal/mca/pmix/pmix2x/pmix/src/client/pmix_client.c index 2e67e40819..c0e310bfe7 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/client/pmix_client.c +++ b/opal/mca/pmix/pmix2x/pmix/src/client/pmix_client.c @@ -966,13 +966,6 @@ static void _commitfn(int sd, short args, void *cbdata) if (pmix_globals.commits_pending) { /* fetch and pack the local values */ scope = PMIX_LOCAL; - PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver, - msgout, &scope, 1, PMIX_SCOPE); - if (PMIX_SUCCESS != rc) { - PMIX_ERROR_LOG(rc); - PMIX_RELEASE(msgout); - goto error; - } /* allow the GDS module to pass us this info * as a local connection as this data would * only go to another local client */ @@ -980,44 +973,40 @@ static void _commitfn(int sd, short args, void *cbdata) cb->scope = scope; cb->copy = false; PMIX_GDS_FETCH_KV(rc, pmix_globals.mypeer, cb); - if (PMIX_SUCCESS != rc) { - PMIX_ERROR_LOG(rc); - PMIX_RELEASE(msgout); - goto error; - } - - PMIX_CONSTRUCT(&bkt, pmix_buffer_t); - PMIX_LIST_FOREACH_SAFE(kv, kvn, &cb->kvs, pmix_kval_t) { + if (PMIX_SUCCESS == rc) { PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver, - &bkt, kv, 1, PMIX_KVAL); + msgout, &scope, 1, PMIX_SCOPE); + if (PMIX_SUCCESS != rc) { + PMIX_ERROR_LOG(rc); + PMIX_RELEASE(msgout); + goto error; + } + PMIX_CONSTRUCT(&bkt, pmix_buffer_t); + PMIX_LIST_FOREACH_SAFE(kv, kvn, &cb->kvs, pmix_kval_t) { + PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver, + &bkt, kv, 1, PMIX_KVAL); + if (PMIX_SUCCESS != rc) { + PMIX_ERROR_LOG(rc); + PMIX_DESTRUCT(&bkt); + PMIX_RELEASE(msgout); + goto error; + } + pmix_list_remove_item(&cb->kvs, &kv->super); + PMIX_RELEASE(kv); + } + /* now pack the result */ + PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver, + msgout, &bkt, 1, PMIX_BUFFER); + PMIX_DESTRUCT(&bkt); if (PMIX_SUCCESS != rc) { PMIX_ERROR_LOG(rc); - PMIX_DESTRUCT(&bkt); PMIX_RELEASE(msgout); goto error; } - pmix_list_remove_item(&cb->kvs, &kv->super); - PMIX_RELEASE(kv); - } - /* now pack the result */ - PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver, - msgout, &bkt, 1, PMIX_BUFFER); - PMIX_DESTRUCT(&bkt); - if (PMIX_SUCCESS != rc) { - PMIX_ERROR_LOG(rc); - PMIX_RELEASE(msgout); - goto error; } /* fetch and pack the remote values */ scope = PMIX_REMOTE; - PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver, - msgout, &scope, 1, PMIX_SCOPE); - if (PMIX_SUCCESS != rc) { - PMIX_ERROR_LOG(rc); - PMIX_RELEASE(msgout); - goto error; - } /* we need real copies here as this data will * go to remote procs - so a connection will * not suffice */ @@ -1025,33 +1014,36 @@ static void _commitfn(int sd, short args, void *cbdata) cb->scope = scope; cb->copy = true; PMIX_GDS_FETCH_KV(rc, pmix_globals.mypeer, cb); - if (PMIX_SUCCESS != rc) { - PMIX_ERROR_LOG(rc); - PMIX_RELEASE(msgout); - goto error; - } - - PMIX_CONSTRUCT(&bkt, pmix_buffer_t); - PMIX_LIST_FOREACH_SAFE(kv, kvn, &cb->kvs, pmix_kval_t) { + if (PMIX_SUCCESS == rc) { PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver, - &bkt, kv, 1, PMIX_KVAL); + msgout, &scope, 1, PMIX_SCOPE); + if (PMIX_SUCCESS != rc) { + PMIX_ERROR_LOG(rc); + PMIX_RELEASE(msgout); + goto error; + } + PMIX_CONSTRUCT(&bkt, pmix_buffer_t); + PMIX_LIST_FOREACH_SAFE(kv, kvn, &cb->kvs, pmix_kval_t) { + PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver, + &bkt, kv, 1, PMIX_KVAL); + if (PMIX_SUCCESS != rc) { + PMIX_ERROR_LOG(rc); + PMIX_DESTRUCT(&bkt); + PMIX_RELEASE(msgout); + goto error; + } + pmix_list_remove_item(&cb->kvs, &kv->super); + PMIX_RELEASE(kv); + } + /* now pack the result */ + PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver, + msgout, &bkt, 1, PMIX_BUFFER); + PMIX_DESTRUCT(&bkt); if (PMIX_SUCCESS != rc) { PMIX_ERROR_LOG(rc); - PMIX_DESTRUCT(&bkt); PMIX_RELEASE(msgout); goto error; } - pmix_list_remove_item(&cb->kvs, &kv->super); - PMIX_RELEASE(kv); - } - /* now pack the result */ - PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver, - msgout, &bkt, 1, PMIX_BUFFER); - PMIX_DESTRUCT(&bkt); - if (PMIX_SUCCESS != rc) { - PMIX_ERROR_LOG(rc); - PMIX_RELEASE(msgout); - goto error; } /* record that all committed data to-date has been sent */ diff --git a/opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_get.c b/opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_get.c index 4999405aa4..196bc14667 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_get.c +++ b/opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_get.c @@ -270,11 +270,8 @@ static void _getnb_cbfunc(struct pmix_peer_t *pr, pmix_status_t rc, ret; pmix_value_t *val = NULL; int32_t cnt; - pmix_proc_t proc, proct; - pmix_byte_object_t bo; - pmix_buffer_t pbkt; + pmix_proc_t proc; pmix_kval_t *kv; - pmix_peer_t *peer; pmix_output_verbose(2, pmix_globals.debug_output, "pmix: get_nb callback recvd"); @@ -302,82 +299,9 @@ static void _getnb_cbfunc(struct pmix_peer_t *pr, if (PMIX_SUCCESS != ret) { goto done; } - - /* the incoming payload is provided as a set of packed - * byte objects, one for each rank. A pmix_proc_t is the first - * entry in the byte object. If the rank=PMIX_RANK_WILDCARD, - * then that byte object contains job level info - * for the provided nspace. Otherwise, the byte - * object contains the pmix_kval_t's that were "put" by the - * referenced process */ - cnt = 1; - PMIX_BFROPS_UNPACK(rc, pmix_client_globals.myserver, - buf, &bo, &cnt, PMIX_BYTE_OBJECT); - while (PMIX_SUCCESS == rc) { - /* setup the byte object for unpacking */ - PMIX_CONSTRUCT(&pbkt, pmix_buffer_t); - PMIX_LOAD_BUFFER(pmix_client_globals.myserver, - &pbkt, bo.bytes, bo.size); - /* unpack the id of the providing process */ - cnt = 1; - PMIX_BFROPS_UNPACK(rc, pmix_client_globals.myserver, - &pbkt, &proct, &cnt, PMIX_PROC); - if (PMIX_SUCCESS != rc) { - PMIX_ERROR_LOG(rc); - goto done; - } - /* if the rank is WILDCARD, then the byte object contains - * job-level data. Note that we can get job-level data - * for a "get" request that referenced a specific non-wildcard - * rank - this happens in the case where the nspace is - * different than that of the requestor. We may also be - * in a situation where the data for -all- ranks on a - * remote node is being returned by a request for data - * from only one of them - this can occur as an optimization. - * So we have to check the rank here as it may not match the rank of - * the requestor */ - if (PMIX_RANK_WILDCARD == proct.rank) { - peer = pmix_client_globals.myserver; // job-level data is accessed via the server module - } else { - peer = pmix_globals.mypeer; // all other data is stored on my peer module - } - cnt = 1; - kv = PMIX_NEW(pmix_kval_t); - PMIX_BFROPS_UNPACK(rc, pmix_client_globals.myserver, - &pbkt, kv, &cnt, PMIX_KVAL); - while (PMIX_SUCCESS == rc) { - /* let the GDS component for this peer store it - if - * the kval contains shmem connection info, then the - * component will know what to do about it (or else - * we selected the wrong component for this peer!) */ - PMIX_GDS_STORE_KV(rc, peer, &proct, PMIX_INTERNAL, kv); - if (PMIX_SUCCESS != rc) { - PMIX_ERROR_LOG(rc); - PMIX_RELEASE(kv); - PMIX_DESTRUCT(&pbkt); - goto done; - } - PMIX_RELEASE(kv); // maintain accounting - /* get the next one */ - kv = PMIX_NEW(pmix_kval_t); - cnt = 1; - PMIX_BFROPS_UNPACK(rc, pmix_client_globals.myserver, - &pbkt, kv, &cnt, PMIX_KVAL); - } - PMIX_RELEASE(kv); // maintain accounting - if (PMIX_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) { - PMIX_ERROR_LOG(rc); - PMIX_DESTRUCT(&pbkt); - goto done; - } - PMIX_DESTRUCT(&pbkt); - /* get the next one */ - cnt = 1; - PMIX_BFROPS_UNPACK(rc, pmix_client_globals.myserver, - buf, &bo, &cnt, PMIX_BYTE_OBJECT); - } - if (PMIX_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) { - PMIX_ERROR_LOG(rc); + PMIX_GDS_ACCEPT_KVS_RESP(rc, pmix_client_globals.myserver, buf); + if (PMIX_SUCCESS != rc) { + goto done; } done: @@ -391,7 +315,7 @@ static void _getnb_cbfunc(struct pmix_peer_t *pr, /* we have the data for this proc - see if we can find the key */ cb->proc = &proc; cb->scope = PMIX_SCOPE_UNDEF; - /* fetch the data from my peer module - since we are passing + /* fetch the data from server peer module - since it is passing * it back to the user, we need a copy of it */ cb->copy = true; PMIX_GDS_FETCH_KV(rc, pmix_client_globals.myserver, cb); @@ -486,7 +410,6 @@ static void _getnbfn(int fd, short flags, void *cbdata) pmix_proc_t proc; bool optional = false; struct timeval tv; - bool my_nspace = false, my_rank = false; /* cb was passed to us from another thread - acquire it */ PMIX_ACQUIRE_OBJECT(cb); @@ -525,22 +448,13 @@ static void _getnbfn(int fd, short flags, void *cbdata) } } - my_nspace = (0 == strncmp(cb->pname.nspace, pmix_globals.myid.nspace, PMIX_MAX_NSLEN)); - my_rank = (pmix_globals.myid.rank == cb->pname.rank); - - /* if we are looking for data from ourselves, then - * check the internal storage first */ - if (my_rank) { - cb->proc = &proc; - cb->copy = true; - PMIX_GDS_FETCH_KV(rc, pmix_globals.mypeer, cb); - if (PMIX_SUCCESS == rc) { - rc = process_values(&val, cb); - goto respond; - } - if (my_nspace) { - goto respond; - } + /* check the internal storage first */ + cb->proc = &proc; + cb->copy = true; + PMIX_GDS_FETCH_KV(rc, pmix_globals.mypeer, cb); + if (PMIX_SUCCESS == rc) { + rc = process_values(&val, cb); + goto respond; } /* if the key is NULL or starts with "pmix", then they are looking @@ -552,7 +466,7 @@ static void _getnbfn(int fd, short flags, void *cbdata) cb->copy = true; PMIX_GDS_FETCH_KV(rc, pmix_client_globals.myserver, cb); if (PMIX_SUCCESS != rc) { - if (!my_nspace) { + if (0 != strncmp(cb->pname.nspace, pmix_globals.myid.nspace, PMIX_MAX_NSLEN)) { /* we are asking about the job-level info from another * namespace. It seems that we don't have it - go and * ask server diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/bfrops/base/base.h b/opal/mca/pmix/pmix2x/pmix/src/mca/bfrops/base/base.h index 66c206680f..76bab62c35 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/bfrops/base/base.h +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/bfrops/base/base.h @@ -46,14 +46,14 @@ /* * MCA Framework */ -extern pmix_mca_base_framework_t pmix_bfrops_base_framework; + PMIX_EXPORT extern pmix_mca_base_framework_t pmix_bfrops_base_framework; /** * BFROP select function * * Cycle across available components and construct the list * of active modules */ -pmix_status_t pmix_bfrop_base_select(void); + PMIX_EXPORT pmix_status_t pmix_bfrop_base_select(void); /** * Track an active component / module @@ -78,7 +78,7 @@ struct pmix_bfrops_globals_t { }; typedef struct pmix_bfrops_globals_t pmix_bfrops_globals_t; -extern pmix_bfrops_globals_t pmix_bfrops_globals; +PMIX_EXPORT extern pmix_bfrops_globals_t pmix_bfrops_globals; /* * The default starting chunk size @@ -195,431 +195,431 @@ PMIX_CLASS_DECLARATION(pmix_bfrop_type_info_t); } while (0) /* API Stub functions */ -char* pmix_bfrops_stub_get_available_modules(void); -pmix_status_t pmix_bfrops_stub_assign_module(struct pmix_peer_t *peer, +PMIX_EXPORT char* pmix_bfrops_stub_get_available_modules(void); +PMIX_EXPORT pmix_status_t pmix_bfrops_stub_assign_module(struct pmix_peer_t *peer, const char *version); -pmix_buffer_t* pmix_bfrops_stub_create_buffer(struct pmix_peer_t *pr); -void pmix_bfrops_construct_buffer(struct pmix_peer_t *pr, - pmix_buffer_t *buf); -pmix_status_t pmix_bfrops_stub_pack(struct pmix_peer_t *peer, - pmix_buffer_t *buffer, - const void *src, - int32_t num_values, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_stub_unpack(struct pmix_peer_t *peer, - pmix_buffer_t *buffer, void *dest, - int32_t *max_num_values, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_stub_copy(struct pmix_peer_t *peer, - void **dest, void *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_stub_print(struct pmix_peer_t *peer, - char **output, char *prefix, - void *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_stub_copy_payload(struct pmix_peer_t *peer, - pmix_buffer_t *dest, - pmix_buffer_t *src); -pmix_status_t pmix_bfrops_stub_value_xfer(struct pmix_peer_t *peer, - pmix_value_t *dest, - pmix_value_t *src); -void pmix_bfrops_stub_value_load(struct pmix_peer_t *peer, - pmix_value_t *v, void *data, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_stub_value_unload(struct pmix_peer_t *peer, - pmix_value_t *kv, - void **data, size_t *sz); -pmix_value_cmp_t pmix_bfrops_stub_value_cmp(struct pmix_peer_t *peer, - pmix_value_t *p1, pmix_value_t *p2); -pmix_status_t pmix_bfrops_stub_register_type(struct pmix_peer_t *peer, - const char *name, pmix_data_type_t type, - pmix_bfrop_pack_fn_t pack, - pmix_bfrop_unpack_fn_t unpack, - pmix_bfrop_copy_fn_t copy, - pmix_bfrop_print_fn_t print); +PMIX_EXPORT pmix_buffer_t* pmix_bfrops_stub_create_buffer(struct pmix_peer_t *pr); +PMIX_EXPORT void pmix_bfrops_construct_buffer(struct pmix_peer_t *pr, + pmix_buffer_t *buf); +PMIX_EXPORT pmix_status_t pmix_bfrops_stub_pack(struct pmix_peer_t *peer, + pmix_buffer_t *buffer, + const void *src, + int32_t num_values, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_stub_unpack(struct pmix_peer_t *peer, + pmix_buffer_t *buffer, void *dest, + int32_t *max_num_values, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_stub_copy(struct pmix_peer_t *peer, + void **dest, void *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_stub_print(struct pmix_peer_t *peer, + char **output, char *prefix, + void *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_stub_copy_payload(struct pmix_peer_t *peer, + pmix_buffer_t *dest, + pmix_buffer_t *src); +PMIX_EXPORT pmix_status_t pmix_bfrops_stub_value_xfer(struct pmix_peer_t *peer, + pmix_value_t *dest, + pmix_value_t *src); +PMIX_EXPORT void pmix_bfrops_stub_value_load(struct pmix_peer_t *peer, + pmix_value_t *v, void *data, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_stub_value_unload(struct pmix_peer_t *peer, + pmix_value_t *kv, + void **data, size_t *sz); +PMIX_EXPORT pmix_value_cmp_t pmix_bfrops_stub_value_cmp(struct pmix_peer_t *peer, + pmix_value_t *p1, pmix_value_t *p2); +PMIX_EXPORT pmix_status_t pmix_bfrops_stub_register_type(struct pmix_peer_t *peer, + const char *name, pmix_data_type_t type, + pmix_bfrop_pack_fn_t pack, + pmix_bfrop_unpack_fn_t unpack, + pmix_bfrop_copy_fn_t copy, + pmix_bfrop_print_fn_t print); /* data type string function */ -const char* pmix_bfrops_base_data_type_string(pmix_pointer_array_t *regtypes, - pmix_data_type_t type); +PMIX_EXPORT const char* pmix_bfrops_base_data_type_string(pmix_pointer_array_t *regtypes, + pmix_data_type_t type); /* * "Standard" pack functions */ -pmix_status_t pmix_bfrops_base_pack(pmix_pointer_array_t *regtypes, - pmix_buffer_t *buffer, - const void *src, int num_vals, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_buffer(pmix_pointer_array_t *regtypes, - pmix_buffer_t *buffer, - const void *src, int32_t num_vals, - pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack(pmix_pointer_array_t *regtypes, + pmix_buffer_t *buffer, + const void *src, int num_vals, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_buffer(pmix_pointer_array_t *regtypes, + pmix_buffer_t *buffer, + const void *src, int32_t num_vals, + pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_bool(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_int(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_sizet(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_byte(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_string(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_pid(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_bool(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_int(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_sizet(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_byte(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_string(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_pid(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_int16(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_int32(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_int64(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_string(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_float(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_double(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_timeval(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_time(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_status(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_buf(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_bo(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_proc(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_value(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_info(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_pdata(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_app(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_kval(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_array(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_modex(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_persist(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_datatype(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_ptr(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_scope(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_range(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_cmd(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_info_directives(pmix_buffer_t *buffer, const void *src, +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_int16(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_int32(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_int64(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_string(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_float(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_double(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_timeval(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_time(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_status(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_buf(pmix_buffer_t *buffer, const void *src, int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_pstate(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_pinfo(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_darray(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_rank(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_query(pmix_buffer_t *buffer, const void *src, - int32_t num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_pack_val(pmix_buffer_t *buffer, - pmix_value_t *p); -pmix_status_t pmix_bfrops_base_pack_alloc_directive(pmix_buffer_t *buffer, const void *src, +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_bo(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_proc(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_value(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_info(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_pdata(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_app(pmix_buffer_t *buffer, const void *src, int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_kval(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_array(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_modex(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_persist(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_datatype(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_ptr(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_scope(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_range(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_cmd(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_info_directives(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_pstate(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_pinfo(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_darray(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_rank(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_query(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_val(pmix_buffer_t *buffer, + pmix_value_t *p); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_pack_alloc_directive(pmix_buffer_t *buffer, const void *src, + int32_t num_vals, pmix_data_type_t type); /* * "Standard" unpack functions */ -pmix_status_t pmix_bfrops_base_unpack(pmix_pointer_array_t *regtypes, - pmix_buffer_t *buffer, - void *dst, int32_t *num_vals, - pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack(pmix_pointer_array_t *regtypes, + pmix_buffer_t *buffer, + void *dst, int32_t *num_vals, + pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_bool(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_byte(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_string(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_int(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_sizet(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_pid(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_int16(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_int32(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_datatype(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_int64(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); - -pmix_status_t pmix_bfrops_base_unpack_float(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_double(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_timeval(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_time(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_status(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); - -pmix_status_t pmix_bfrops_base_unpack_val(pmix_buffer_t *buffer, - pmix_value_t *val); -pmix_status_t pmix_bfrops_base_unpack_value(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_info(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_pdata(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_buf(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_proc(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_app(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_kval(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_modex(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_persist(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_bo(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_ptr(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_scope(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_range(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_cmd(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_info_directives(pmix_buffer_t *buffer, void *dest, +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_bool(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_byte(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_string(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_int(pmix_buffer_t *buffer, void *dest, int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_datatype(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_pstate(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_pinfo(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_darray(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_rank(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_query(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_unpack_alloc_directive(pmix_buffer_t *buffer, void *dest, +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_sizet(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_pid(pmix_buffer_t *buffer, void *dest, int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_int16(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_int32(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_datatype(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_int64(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); + +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_float(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_double(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_timeval(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_time(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_status(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); + +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_val(pmix_buffer_t *buffer, + pmix_value_t *val); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_value(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_info(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_pdata(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_buf(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_proc(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_app(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_kval(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_modex(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_persist(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_bo(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_ptr(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_scope(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_range(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_cmd(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_info_directives(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_datatype(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_pstate(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_pinfo(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_darray(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_rank(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_query(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_alloc_directive(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); /**** DEPRECATED ****/ -pmix_status_t pmix_bfrops_base_unpack_array(pmix_buffer_t *buffer, void *dest, - int32_t *num_vals, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_unpack_array(pmix_buffer_t *buffer, void *dest, + int32_t *num_vals, pmix_data_type_t type); /* * "Standard" copy functions */ -pmix_status_t pmix_bfrops_base_copy(pmix_pointer_array_t *regtypes, - void **dest, void *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_copy_payload(pmix_buffer_t *dest, - pmix_buffer_t *src); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_copy(pmix_pointer_array_t *regtypes, + void **dest, void *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_copy_payload(pmix_buffer_t *dest, + pmix_buffer_t *src); -pmix_status_t pmix_bfrops_base_std_copy(void **dest, void *src, - pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_std_copy(void **dest, void *src, + pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_copy_string(char **dest, char *src, - pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_copy_string(char **dest, char *src, + pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_copy_value(pmix_value_t **dest, - pmix_value_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_copy_array(pmix_info_array_t **dest, - pmix_info_array_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_copy_proc(pmix_proc_t **dest, - pmix_proc_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_copy_app(pmix_app_t **dest, - pmix_app_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_copy_info(pmix_info_t **dest, - pmix_info_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_copy_buf(pmix_buffer_t **dest, - pmix_buffer_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_copy_kval(pmix_kval_t **dest, - pmix_kval_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_copy_modex(pmix_modex_data_t **dest, - pmix_modex_data_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrop_base_copy_persist(pmix_persistence_t **dest, - pmix_persistence_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_copy_bo(pmix_byte_object_t **dest, - pmix_byte_object_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_copy_pdata(pmix_pdata_t **dest, - pmix_pdata_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_copy_pinfo(pmix_proc_info_t **dest, - pmix_proc_info_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_copy_darray(pmix_data_array_t **dest, - pmix_data_array_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_copy_query(pmix_query_t **dest, - pmix_query_t *src, - pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_copy_value(pmix_value_t **dest, + pmix_value_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_copy_array(pmix_info_array_t **dest, + pmix_info_array_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_copy_proc(pmix_proc_t **dest, + pmix_proc_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_copy_app(pmix_app_t **dest, + pmix_app_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_copy_info(pmix_info_t **dest, + pmix_info_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_copy_buf(pmix_buffer_t **dest, + pmix_buffer_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_copy_kval(pmix_kval_t **dest, + pmix_kval_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_copy_modex(pmix_modex_data_t **dest, + pmix_modex_data_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrop_base_copy_persist(pmix_persistence_t **dest, + pmix_persistence_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_copy_bo(pmix_byte_object_t **dest, + pmix_byte_object_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_copy_pdata(pmix_pdata_t **dest, + pmix_pdata_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_copy_pinfo(pmix_proc_info_t **dest, + pmix_proc_info_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_copy_darray(pmix_data_array_t **dest, + pmix_data_array_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_copy_query(pmix_query_t **dest, + pmix_query_t *src, + pmix_data_type_t type); /**** DEPRECATED ****/ -pmix_status_t pmix_bfrops_base_copy_array(pmix_info_array_t **dest, - pmix_info_array_t *src, - pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_copy_array(pmix_info_array_t **dest, + pmix_info_array_t *src, + pmix_data_type_t type); /* * "Standard" print functions */ -pmix_status_t pmix_bfrops_base_print(pmix_pointer_array_t *regtypes, - char **output, char *prefix, - void *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_bool(char **output, char *prefix, - bool *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_byte(char **output, char *prefix, - uint8_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_string(char **output, char *prefix, - char *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_size(char **output, char *prefix, - size_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_pid(char **output, char *prefix, - pid_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print(pmix_pointer_array_t *regtypes, + char **output, char *prefix, + void *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_bool(char **output, char *prefix, + bool *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_byte(char **output, char *prefix, + uint8_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_string(char **output, char *prefix, + char *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_size(char **output, char *prefix, + size_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_pid(char **output, char *prefix, + pid_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_int(char **output, char *prefix, - int *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_int8(char **output, char *prefix, - int8_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_int16(char **output, char *prefix, - int16_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_int32(char **output, char *prefix, - int32_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_int64(char **output, char *prefix, - int64_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_int(char **output, char *prefix, + int *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_int8(char **output, char *prefix, + int8_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_int16(char **output, char *prefix, + int16_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_int32(char **output, char *prefix, + int32_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_int64(char **output, char *prefix, + int64_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_uint(char **output, char *prefix, - uint *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_uint8(char **output, char *prefix, - uint8_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_uint16(char **output, char *prefix, - uint16_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_uint32(char **output, char *prefix, - uint32_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_uint64(char **output, char *prefix, - uint64_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_uint(char **output, char *prefix, + uint *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_uint8(char **output, char *prefix, + uint8_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_uint16(char **output, char *prefix, + uint16_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_uint32(char **output, char *prefix, + uint32_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_uint64(char **output, char *prefix, + uint64_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_float(char **output, char *prefix, - float *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_double(char **output, char *prefix, - double *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_float(char **output, char *prefix, + float *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_double(char **output, char *prefix, + double *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_timeval(char **output, char *prefix, - struct timeval *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_time(char **output, char *prefix, - time_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_status(char **output, char *prefix, - pmix_status_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_timeval(char **output, char *prefix, + struct timeval *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_time(char **output, char *prefix, + time_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_status(char **output, char *prefix, + pmix_status_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_value(char **output, char *prefix, - pmix_value_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_array(char **output, char *prefix, - pmix_info_array_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_proc(char **output, char *prefix, - pmix_proc_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_app(char **output, char *prefix, - pmix_app_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_info(char **output, char *prefix, - pmix_info_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_buf(char **output, char *prefix, - pmix_buffer_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_kval(char **output, char *prefix, - pmix_kval_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_modex(char **output, char *prefix, - pmix_modex_data_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_persist(char **output, char *prefix, - pmix_persistence_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_bo(char **output, char *prefix, - pmix_byte_object_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_pdata(char **output, char *prefix, - pmix_pdata_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_ptr(char **output, char *prefix, - void *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_scope(char **output, char *prefix, - pmix_scope_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_range(char **output, char *prefix, - pmix_data_range_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_cmd(char **output, char *prefix, - pmix_cmd_t *src, pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_info_directives(char **output, char *prefix, - pmix_info_directives_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_datatype(char **output, char *prefix, - pmix_data_type_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_pstate(char **output, char *prefix, - pmix_proc_state_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_pinfo(char **output, char *prefix, - pmix_proc_info_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_darray(char **output, char *prefix, - pmix_data_array_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_query(char **output, char *prefix, - pmix_query_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_rank(char **output, char *prefix, - pmix_rank_t *src, - pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_print_alloc_directive(char **output, char *prefix, - pmix_alloc_directive_t *src, - pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_value(char **output, char *prefix, + pmix_value_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_array(char **output, char *prefix, + pmix_info_array_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_proc(char **output, char *prefix, + pmix_proc_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_app(char **output, char *prefix, + pmix_app_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_info(char **output, char *prefix, + pmix_info_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_buf(char **output, char *prefix, + pmix_buffer_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_kval(char **output, char *prefix, + pmix_kval_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_modex(char **output, char *prefix, + pmix_modex_data_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_persist(char **output, char *prefix, + pmix_persistence_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_bo(char **output, char *prefix, + pmix_byte_object_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_pdata(char **output, char *prefix, + pmix_pdata_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_ptr(char **output, char *prefix, + void *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_scope(char **output, char *prefix, + pmix_scope_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_range(char **output, char *prefix, + pmix_data_range_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_cmd(char **output, char *prefix, + pmix_cmd_t *src, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_info_directives(char **output, char *prefix, + pmix_info_directives_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_datatype(char **output, char *prefix, + pmix_data_type_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_pstate(char **output, char *prefix, + pmix_proc_state_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_pinfo(char **output, char *prefix, + pmix_proc_info_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_darray(char **output, char *prefix, + pmix_data_array_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_query(char **output, char *prefix, + pmix_query_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_rank(char **output, char *prefix, + pmix_rank_t *src, + pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_print_alloc_directive(char **output, char *prefix, + pmix_alloc_directive_t *src, + pmix_data_type_t type); /* * Common helper functions */ -char* pmix_bfrop_buffer_extend(pmix_buffer_t *bptr, size_t bytes_to_add); +PMIX_EXPORT char* pmix_bfrop_buffer_extend(pmix_buffer_t *bptr, size_t bytes_to_add); -bool pmix_bfrop_too_small(pmix_buffer_t *buffer, size_t bytes_reqd); +PMIX_EXPORT bool pmix_bfrop_too_small(pmix_buffer_t *buffer, size_t bytes_reqd); -pmix_bfrop_type_info_t* pmix_bfrop_find_type(pmix_data_type_t type); +PMIX_EXPORT pmix_bfrop_type_info_t* pmix_bfrop_find_type(pmix_data_type_t type); -pmix_status_t pmix_bfrop_store_data_type(pmix_buffer_t *buffer, pmix_data_type_t type); +PMIX_EXPORT pmix_status_t pmix_bfrop_store_data_type(pmix_buffer_t *buffer, pmix_data_type_t type); -pmix_status_t pmix_bfrop_get_data_type(pmix_buffer_t *buffer, pmix_data_type_t *type); +PMIX_EXPORT pmix_status_t pmix_bfrop_get_data_type(pmix_buffer_t *buffer, pmix_data_type_t *type); -pmix_status_t pmix_bfrops_base_copy_payload(pmix_buffer_t *dest, - pmix_buffer_t *src); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_copy_payload(pmix_buffer_t *dest, + pmix_buffer_t *src); -void pmix_bfrops_base_value_load(pmix_value_t *v, const void *data, - pmix_data_type_t type); +PMIX_EXPORT void pmix_bfrops_base_value_load(pmix_value_t *v, const void *data, + pmix_data_type_t type); -pmix_status_t pmix_bfrops_base_value_unload(pmix_value_t *kv, - void **data, - size_t *sz); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_value_unload(pmix_value_t *kv, + void **data, + size_t *sz); -pmix_status_t pmix_bfrops_base_value_xfer(pmix_value_t *p, - pmix_value_t *src); +PMIX_EXPORT pmix_status_t pmix_bfrops_base_value_xfer(pmix_value_t *p, + pmix_value_t *src); -pmix_value_cmp_t pmix_bfrops_base_value_cmp(pmix_value_t *p, - pmix_value_t *p1); +PMIX_EXPORT pmix_value_cmp_t pmix_bfrops_base_value_cmp(pmix_value_t *p, + pmix_value_t *p1); END_C_DECLS diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/bfrops/base/bfrop_base_frame.c b/opal/mca/pmix/pmix2x/pmix/src/mca/bfrops/base/bfrop_base_frame.c index 02498a77ca..bf2f0eb5f8 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/bfrops/base/bfrop_base_frame.c +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/bfrops/base/bfrop_base_frame.c @@ -182,33 +182,3 @@ static void kvdes(pmix_kval_t *k) PMIX_CLASS_INSTANCE(pmix_kval_t, pmix_list_item_t, kvcon, kvdes); - -static void rcon(pmix_regex_range_t *p) -{ - p->start = 0; - p->cnt = 0; -} -PMIX_CLASS_INSTANCE(pmix_regex_range_t, - pmix_list_item_t, - rcon, NULL); - -static void rvcon(pmix_regex_value_t *p) -{ - p->prefix = NULL; - p->suffix = NULL; - p->num_digits = 0; - PMIX_CONSTRUCT(&p->ranges, pmix_list_t); -} -static void rvdes(pmix_regex_value_t *p) -{ - if (NULL != p->prefix) { - free(p->prefix); - } - if (NULL != p->suffix) { - free(p->suffix); - } - PMIX_LIST_DESTRUCT(&p->ranges); -} -PMIX_CLASS_INSTANCE(pmix_regex_value_t, - pmix_list_item_t, - rvcon, rvdes); diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/bfrops/bfrops_types.h b/opal/mca/pmix/pmix2x/pmix/src/mca/bfrops/bfrops_types.h index 856480c375..6609bd9377 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/bfrops/bfrops_types.h +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/bfrops/bfrops_types.h @@ -91,26 +91,6 @@ typedef struct { } pmix_buffer_t; PMIX_CLASS_DECLARATION(pmix_buffer_t); -/* these classes are required by the regex code shared - * between the client and server implementations - it - * is put here so that both can access these objects */ -typedef struct { - pmix_list_item_t super; - int start; - int cnt; -} pmix_regex_range_t; -PMIX_CLASS_DECLARATION(pmix_regex_range_t); - -typedef struct { - /* list object */ - pmix_list_item_t super; - char *prefix; - char *suffix; - int num_digits; - pmix_list_t ranges; -} pmix_regex_value_t; -PMIX_CLASS_DECLARATION(pmix_regex_value_t); - /* Convenience macro for loading a data blob into a pmix_buffer_t * * p - the pmix_peer_t of the process that provided the blob. This diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/gds/ds12/.pmix_ignore b/opal/mca/pmix/pmix2x/pmix/src/mca/gds/ds12/.pmix_ignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/gds/ds12/gds_dstore.c b/opal/mca/pmix/pmix2x/pmix/src/mca/gds/ds12/gds_dstore.c index c33536286d..927372bfd2 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/gds/ds12/gds_dstore.c +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/gds/ds12/gds_dstore.c @@ -2483,9 +2483,8 @@ inline pmix_status_t _dstore_fetch(const char *nspace, pmix_rank_t rank, const c PMIX_ERROR_LOG(rc); goto done; } - strncpy(info[kval_cnt - 1].key, ESH_KNAME_PTR(addr), ESH_KNAME_LEN((char *)addr)); - PMIX_BFROPS_VALUE_LOAD(pmix_globals.mypeer, &(info[kval_cnt - 1].value), &val.data, val.type); + pmix_value_xfer(&info[kval_cnt - 1].value, &val); PMIX_VALUE_DESTRUCT(&val); buffer.base_ptr = NULL; buffer.bytes_used = 0; @@ -2545,9 +2544,6 @@ done: if( rc != PMIX_SUCCESS ){ if( NULL == key ) { - if( NULL != kval ) { - PMIX_VALUE_RELEASE(kval); - } if( NULL != info ) { PMIX_INFO_FREE(info, ninfo); } @@ -2808,16 +2804,6 @@ static pmix_status_t dstore_assign_module(pmix_info_t *info, size_t ninfo, } } -<<<<<<< c632784ca34c467055eadcb4efe84a25e5a3911b:opal/mca/pmix/pmix2x/pmix/src/dstore/pmix_esh.c - rank_meta_info *rinfo = NULL; - size_t num_elems, free_offset, new_free_offset; - int data_exist; - int32_t cnt; -||||||| merged common ancestors - rank_meta_info *rinfo = NULL; - size_t num_elems, free_offset, new_free_offset; - int data_exist; -======= #if 0 if PMIX_GDS_MODULE != "ds12" *proirity = 0; @@ -2826,7 +2812,6 @@ static pmix_status_t dstore_assign_module(pmix_info_t *info, size_t ninfo, #endif return PMIX_SUCCESS; } ->>>>>>> Update PMIx and continue work on RML/OFI component:opal/mca/pmix/pmix2x/pmix/src/mca/gds/ds12/gds_dstore.c static inline int _my_client(const char *nspace, pmix_rank_t rank) { @@ -2910,36 +2895,9 @@ static pmix_status_t dstore_store_modex(struct pmix_nspace_t *nspace, if (_my_client(proc.nspace, proc.rank)) { break; } -<<<<<<< c632784ca34c467055eadcb4efe84a25e5a3911b:opal/mca/pmix/pmix2x/pmix/src/dstore/pmix_esh.c - } - /* incoming buffer may contain several inner buffers for different scopes, - * so unpack these buffers, and then unpack kvals from each modex buffer, - * storing them in the shared memory dstore. - */ - free_offset = get_free_offset(datadesc); - kp = PMIX_NEW(pmix_kval_t); - cnt = 1; - while (PMIX_SUCCESS == (rc = pmix_bfrop.unpack(buf, kp, &cnt, PMIX_KVAL))) { - pmix_output_verbose(2, pmix_globals.debug_output, - "pmix: unpacked key %s", kp->key); - if (PMIX_SUCCESS != (rc = pmix_sm_store(ns_info, rank, kp, &rinfo, data_exist))) { -||||||| merged common ancestors - } - /* incoming buffer may contain several inner buffers for different scopes, - * so unpack these buffers, and then unpack kvals from each modex buffer, - * storing them in the shared memory dstore. - */ - free_offset = get_free_offset(datadesc); - kp = PMIX_NEW(pmix_kval_t); - while (PMIX_SUCCESS == (rc = pmix_bfrop.unpack(buf, kp, &(int){1}, PMIX_KVAL))) { - pmix_output_verbose(2, pmix_globals.debug_output, - "pmix: unpacked key %s", kp->key); - if (PMIX_SUCCESS != (rc = pmix_sm_store(ns_info, rank, kp, &rinfo, data_exist))) { -======= /* store this in the hash table */ PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer, &proc, PMIX_REMOTE, kv); if (PMIX_SUCCESS != rc) { ->>>>>>> Update PMIx and continue work on RML/OFI component:opal/mca/pmix/pmix2x/pmix/src/mca/gds/ds12/gds_dstore.c PMIX_ERROR_LOG(rc); bo->bytes = pbkt.base_ptr; bo->size = pbkt.bytes_used; // restore the incoming data @@ -2947,14 +2905,6 @@ static pmix_status_t dstore_store_modex(struct pmix_nspace_t *nspace, PMIX_DESTRUCT(&pbkt); return rc; } -<<<<<<< c632784ca34c467055eadcb4efe84a25e5a3911b:opal/mca/pmix/pmix2x/pmix/src/dstore/pmix_esh.c - PMIX_RELEASE(kp); // maintain acctg - hash_store does a retain - kp = PMIX_NEW(pmix_kval_t); - cnt = 1; -||||||| merged common ancestors - PMIX_RELEASE(kp); // maintain acctg - hash_store does a retain - kp = PMIX_NEW(pmix_kval_t); -======= if (PMIX_SUCCESS != (rc = dstore_store(&proc, PMIX_REMOTE, kv))) { PMIX_ERROR_LOG(rc); } @@ -2963,7 +2913,6 @@ static pmix_status_t dstore_store_modex(struct pmix_nspace_t *nspace, kv = PMIX_NEW(pmix_kval_t); cnt = 1; PMIX_BFROPS_UNPACK(rc, peer, &pbkt, kv, &cnt, PMIX_KVAL); ->>>>>>> Update PMIx and continue work on RML/OFI component:opal/mca/pmix/pmix2x/pmix/src/mca/gds/ds12/gds_dstore.c } PMIX_RELEASE(kv); // maintain accounting if (PMIX_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) { diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/gds/gds.h b/opal/mca/pmix/pmix2x/pmix/src/mca/gds/gds.h index 8133bf69c6..8d884c1515 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/gds/gds.h +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/gds/gds.h @@ -71,6 +71,37 @@ typedef pmix_status_t (*pmix_gds_base_assign_module_fn_t)(pmix_info_t *info, size_t ninfo, int *priority); +/* SERVER FN: assemble the keys buffer for server answer */ +typedef pmix_status_t (*pmix_gds_base_module_assemb_kvs_req_fn_t)(const pmix_proc_t *proc, + pmix_list_t *kvs, + pmix_buffer_t *buf, + void *cbdata); + +/* define a macro for server keys answer based on peer */ +#define PMIX_GDS_ASSEMB_KVS_REQ(s, p, r, k, b, c) \ + do { \ + pmix_gds_base_module_t *_g = (p)->nptr->compat.gds; \ + (s) = PMIX_SUCCESS; \ + if (NULL != _g->assemb_kvs_req) { \ + (s) = _g->assemb_kvs_req(r, k, b, (void*)c); \ + } \ + } while(0) + + +/* CLIENT FN: unpack buffer and key processing */ +typedef pmix_status_t (*pmix_gds_base_module_accept_kvs_resp_fn_t)(pmix_buffer_t *buf); + +/* define a macro for client key processing from a server response based on peer */ +#define PMIX_GDS_ACCEPT_KVS_RESP(s, p, b) \ + do { \ + pmix_gds_base_module_t *_g = (p)->nptr->compat.gds; \ + (s) = PMIX_SUCCESS; \ + if (NULL != _g->accept_kvs_resp) { \ + (s) = _g->accept_kvs_resp(b); \ + } \ + } while (0) + + /* SERVER FN: cache job-level info in the server's GDS until client * procs connect and we discover which GDS module to use for them. * Note that this is essentially the same function as store_job_info, @@ -350,6 +381,8 @@ typedef struct { pmix_gds_base_module_setup_fork_fn_t setup_fork; pmix_gds_base_module_add_nspace_fn_t add_nspace; pmix_gds_base_module_del_nspace_fn_t del_nspace; + pmix_gds_base_module_assemb_kvs_req_fn_t assemb_kvs_req; + pmix_gds_base_module_accept_kvs_resp_fn_t accept_kvs_resp; } pmix_gds_base_module_t; diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/gds/hash/gds_hash.c b/opal/mca/pmix/pmix2x/pmix/src/mca/gds/hash/gds_hash.c index fd24647622..f52c3b0ef4 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/gds/hash/gds_hash.c +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/gds/hash/gds_hash.c @@ -80,6 +80,13 @@ static pmix_status_t nspace_add(const char *nspace, static pmix_status_t nspace_del(const char *nspace); +static pmix_status_t assemb_kvs_req(const pmix_proc_t *proc, + pmix_list_t *kvs, + pmix_buffer_t *bo, + void *cbdata); + +static pmix_status_t accept_kvs_resp(pmix_buffer_t *buf); + pmix_gds_base_module_t pmix_hash_module = { .name = "hash", .init = hash_init, @@ -93,7 +100,9 @@ pmix_gds_base_module_t pmix_hash_module = { .fetch = hash_fetch, .setup_fork = setup_fork, .add_nspace = nspace_add, - .del_nspace = nspace_del + .del_nspace = nspace_del, + .assemb_kvs_req = assemb_kvs_req, + .accept_kvs_resp = accept_kvs_resp }; typedef struct { @@ -1585,3 +1594,100 @@ static pmix_status_t nspace_del(const char *nspace) /* we don't need to do anything here */ return PMIX_SUCCESS; } + +static pmix_status_t assemb_kvs_req(const pmix_proc_t *proc, + pmix_list_t *kvs, + pmix_buffer_t *buf, + void *cbdata) +{ + pmix_status_t rc = PMIX_SUCCESS; + pmix_server_caddy_t *cd = (pmix_server_caddy_t*)cbdata; + pmix_kval_t *kv; + + PMIX_BFROPS_PACK(rc, cd->peer, buf, proc, 1, PMIX_PROC); + if (PMIX_SUCCESS != rc) { + return rc; + } + PMIX_LIST_FOREACH(kv, kvs, pmix_kval_t) { + PMIX_BFROPS_PACK(rc, cd->peer, buf, kv, 1, PMIX_KVAL); + if (PMIX_SUCCESS != rc) { + return rc; + } + } + return rc; +} + +static pmix_status_t accept_kvs_resp(pmix_buffer_t *buf) +{ + pmix_status_t rc = PMIX_SUCCESS; + int32_t cnt; + pmix_byte_object_t bo; + pmix_buffer_t pbkt; + pmix_kval_t *kv; + pmix_proc_t proct; + + /* the incoming payload is provided as a set of packed + * byte objects, one for each rank. A pmix_proc_t is the first + * entry in the byte object. If the rank=PMIX_RANK_WILDCARD, + * then that byte object contains job level info + * for the provided nspace. Otherwise, the byte + * object contains the pmix_kval_t's that were "put" by the + * referenced process */ + cnt = 1; + PMIX_BFROPS_UNPACK(rc, pmix_client_globals.myserver, + buf, &bo, &cnt, PMIX_BYTE_OBJECT); + while (PMIX_SUCCESS == rc) { + /* setup the byte object for unpacking */ + PMIX_CONSTRUCT(&pbkt, pmix_buffer_t); + PMIX_LOAD_BUFFER(pmix_client_globals.myserver, + &pbkt, bo.bytes, bo.size); + /* unpack the id of the providing process */ + cnt = 1; + PMIX_BFROPS_UNPACK(rc, pmix_client_globals.myserver, + &pbkt, &proct, &cnt, PMIX_PROC); + if (PMIX_SUCCESS != rc) { + PMIX_ERROR_LOG(rc); + return rc; + } + cnt = 1; + kv = PMIX_NEW(pmix_kval_t); + PMIX_BFROPS_UNPACK(rc, pmix_client_globals.myserver, + &pbkt, kv, &cnt, PMIX_KVAL); + while (PMIX_SUCCESS == rc) { + /* let the GDS component for this peer store it - if + * the kval contains shmem connection info, then the + * component will know what to do about it (or else + * we selected the wrong component for this peer!) */ + + PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer, &proct, PMIX_INTERNAL, kv); + if (PMIX_SUCCESS != rc) { + PMIX_ERROR_LOG(rc); + PMIX_RELEASE(kv); + PMIX_DESTRUCT(&pbkt); + return rc; + } + PMIX_RELEASE(kv); // maintain accounting + /* get the next one */ + kv = PMIX_NEW(pmix_kval_t); + cnt = 1; + PMIX_BFROPS_UNPACK(rc, pmix_client_globals.myserver, + &pbkt, kv, &cnt, PMIX_KVAL); + } + PMIX_RELEASE(kv); // maintain accounting + if (PMIX_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) { + PMIX_ERROR_LOG(rc); + PMIX_DESTRUCT(&pbkt); + return rc; + } + PMIX_DESTRUCT(&pbkt); + /* get the next one */ + cnt = 1; + PMIX_BFROPS_UNPACK(rc, pmix_client_globals.myserver, + buf, &bo, &cnt, PMIX_BYTE_OBJECT); + } + if (PMIX_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) { + PMIX_ERROR_LOG(rc); + return rc; + } + return rc; +} diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/pnet/base/base.h b/opal/mca/pmix/pmix2x/pmix/src/mca/pnet/base/base.h index 7ed16e4787..aa64c7f0c2 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/pnet/base/base.h +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/pnet/base/base.h @@ -11,7 +11,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. - * Copyright (c) 2014-2016 Intel, Inc. All rights reserved. + * Copyright (c) 2014-2017 Intel, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ @@ -47,14 +47,14 @@ BEGIN_C_DECLS /* * MCA Framework */ -extern pmix_mca_base_framework_t pmix_pnet_base_framework; +PMIX_EXPORT extern pmix_mca_base_framework_t pmix_pnet_base_framework; /** * PNET select function * * Cycle across available components and construct the list * of active modules */ -pmix_status_t pmix_pnet_base_select(void); +PMIX_EXPORT pmix_status_t pmix_pnet_base_select(void); /** * Track an active component / module @@ -78,13 +78,13 @@ typedef struct pmix_pnet_globals_t pmix_pnet_globals_t; extern pmix_pnet_globals_t pmix_pnet_globals; -pmix_status_t pmix_pnet_base_setup_app(char *nspace, pmix_list_t *ilist); -pmix_status_t pmix_pnet_base_setup_local_network(char *nspace, - pmix_info_t info[], - size_t ninfo); -pmix_status_t pmix_pnet_base_setup_fork(const pmix_proc_t *peer, char ***env); -void pmix_pnet_base_child_finalized(pmix_peer_t *peer); -void pmix_pnet_base_local_app_finalized(char *nspace); +PMIX_EXPORT pmix_status_t pmix_pnet_base_setup_app(char *nspace, pmix_list_t *ilist); +PMIX_EXPORT pmix_status_t pmix_pnet_base_setup_local_network(char *nspace, + pmix_info_t info[], + size_t ninfo); +PMIX_EXPORT pmix_status_t pmix_pnet_base_setup_fork(const pmix_proc_t *peer, char ***env); +PMIX_EXPORT void pmix_pnet_base_child_finalized(pmix_peer_t *peer); +PMIX_EXPORT void pmix_pnet_base_local_app_finalized(char *nspace); END_C_DECLS diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/preg/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/mca/preg/Makefile.am index 0e7c80de5a..401066445e 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/preg/Makefile.am +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/preg/Makefile.am @@ -27,7 +27,7 @@ noinst_LTLIBRARIES = libmca_preg.la libmca_preg_la_SOURCES = # local files -headers = preg.h +headers = preg.h preg_types.h sources = # Conditionally install the header files diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/preg/base/base.h b/opal/mca/pmix/pmix2x/pmix/src/mca/preg/base/base.h index 67cd37db0d..1ed424b4bd 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/preg/base/base.h +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/preg/base/base.h @@ -46,14 +46,14 @@ BEGIN_C_DECLS /* * MCA Framework */ -extern pmix_mca_base_framework_t pmix_preg_base_framework; +PMIX_EXPORT extern pmix_mca_base_framework_t pmix_preg_base_framework; /** * PREG select function * * Cycle across available components and construct the list * of active modules */ -pmix_status_t pmix_preg_base_select(void); +PMIX_EXPORT pmix_status_t pmix_preg_base_select(void); /** * Track an active component / module @@ -75,7 +75,7 @@ struct pmix_preg_globals_t { }; typedef struct pmix_preg_globals_t pmix_preg_globals_t; -extern pmix_preg_globals_t pmix_preg_globals; +PMIX_EXPORT extern pmix_preg_globals_t pmix_preg_globals; PMIX_EXPORT pmix_status_t pmix_preg_base_generate_node_regex(const char *input, char **regex); diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/preg/base/preg_base_frame.c b/opal/mca/pmix/pmix2x/pmix/src/mca/preg/base/preg_base_frame.c index b58a7be955..dbf551ea64 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/preg/base/preg_base_frame.c +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/preg/base/preg_base_frame.c @@ -83,3 +83,33 @@ PMIX_MCA_BASE_FRAMEWORK_DECLARE(pmix, preg, "PMIx Regex Operations", PMIX_CLASS_INSTANCE(pmix_preg_base_active_module_t, pmix_list_item_t, NULL, NULL); + +static void rcon(pmix_regex_range_t *p) +{ + p->start = 0; + p->cnt = 0; +} +PMIX_CLASS_INSTANCE(pmix_regex_range_t, + pmix_list_item_t, + rcon, NULL); + +static void rvcon(pmix_regex_value_t *p) +{ + p->prefix = NULL; + p->suffix = NULL; + p->num_digits = 0; + PMIX_CONSTRUCT(&p->ranges, pmix_list_t); +} +static void rvdes(pmix_regex_value_t *p) +{ + if (NULL != p->prefix) { + free(p->prefix); + } + if (NULL != p->suffix) { + free(p->suffix); + } + PMIX_LIST_DESTRUCT(&p->ranges); +} +PMIX_CLASS_INSTANCE(pmix_regex_value_t, + pmix_list_item_t, + rvcon, rvdes); diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/preg/native/preg_native.c b/opal/mca/pmix/pmix2x/pmix/src/mca/preg/native/preg_native.c index f7c843ecea..12187b03c2 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/preg/native/preg_native.c +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/preg/native/preg_native.c @@ -238,7 +238,7 @@ static pmix_status_t generate_node_regex(const char *input, /* if no ranges, then just add the name */ if (0 == pmix_list_get_size(&vreg->ranges)) { if (NULL != vreg->prefix) { - pmix_argv_append_nosize(®exargs, tmp); + pmix_argv_append_nosize(®exargs, vreg->prefix); } PMIX_RELEASE(vreg); continue; diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/preg/preg.h b/opal/mca/pmix/pmix2x/pmix/src/mca/preg/preg.h index 2ed52895a1..e02b512260 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/preg/preg.h +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/preg/preg.h @@ -29,6 +29,8 @@ #include "src/mca/base/pmix_mca_base_var.h" #include "src/mca/base/pmix_mca_base_framework.h" +#include "src/mca/preg/preg_types.h" + BEGIN_C_DECLS /****** MODULE DEFINITION ******/ diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/preg/preg_types.h b/opal/mca/pmix/pmix2x/pmix/src/mca/preg/preg_types.h new file mode 100644 index 0000000000..95f0c5a2f2 --- /dev/null +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/preg/preg_types.h @@ -0,0 +1,59 @@ +/* -*- C -*- + * + * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2006 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2007-2011 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2014-2017 Intel, Inc. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ +/** + * @file + * + * Buffer management types. + */ + +#ifndef PMIX_MCA_PREG_TYPES_H_ +#define PMIX_MCA_PREG_TYPES_H_ + +#include + + +#include "src/class/pmix_object.h" +#include "src/class/pmix_list.h" + +BEGIN_C_DECLS + +/* these classes are required by the regex code */ +typedef struct { + pmix_list_item_t super; + int start; + int cnt; +} pmix_regex_range_t; +PMIX_CLASS_DECLARATION(pmix_regex_range_t); + +typedef struct { + /* list object */ + pmix_list_item_t super; + char *prefix; + char *suffix; + int num_digits; + pmix_list_t ranges; +} pmix_regex_value_t; +PMIX_CLASS_DECLARATION(pmix_regex_value_t); + +END_C_DECLS + +#endif /* PMIX_PREG_TYPES_H */ diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/psec/base/base.h b/opal/mca/pmix/pmix2x/pmix/src/mca/psec/base/base.h index d0fd29e325..28873caf4a 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/psec/base/base.h +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/psec/base/base.h @@ -46,14 +46,14 @@ BEGIN_C_DECLS /* * MCA Framework */ -extern pmix_mca_base_framework_t pmix_psec_base_framework; +PMIX_EXPORT extern pmix_mca_base_framework_t pmix_psec_base_framework; /** * PSEC select function * * Cycle across available components and construct the list * of active modules */ -pmix_status_t pmix_psec_base_select(void); +PMIX_EXPORT pmix_status_t pmix_psec_base_select(void); /** * Track an active component / module diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/pshmem/base/base.h b/opal/mca/pmix/pmix2x/pmix/src/mca/pshmem/base/base.h index 16030f488b..a1c12421ef 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/pshmem/base/base.h +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/pshmem/base/base.h @@ -46,14 +46,14 @@ BEGIN_C_DECLS /* * MCA Framework */ -extern pmix_mca_base_framework_t pmix_pshmem_base_framework; +PMIX_EXPORT extern pmix_mca_base_framework_t pmix_pshmem_base_framework; /** * PSHMEM select function * * Cycle across available components and construct the list * of active modules */ -pmix_status_t pmix_pshmem_base_select(void); +PMIX_EXPORT pmix_status_t pmix_pshmem_base_select(void); END_C_DECLS diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/ptl/base/base.h b/opal/mca/pmix/pmix2x/pmix/src/mca/ptl/base/base.h index ac543743a5..7063370904 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/ptl/base/base.h +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/ptl/base/base.h @@ -53,7 +53,7 @@ PMIX_EXPORT extern pmix_mca_base_framework_t pmix_ptl_base_framework; * Cycle across available components and construct the list * of active modules */ -pmix_status_t pmix_ptl_base_select(void); +PMIX_EXPORT pmix_status_t pmix_ptl_base_select(void); /** * Track an active component diff --git a/opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_get.c b/opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_get.c index 186d17c81e..6086f814cd 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_get.c +++ b/opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_get.c @@ -122,10 +122,9 @@ pmix_status_t pmix_server_get(pmix_buffer_t *buf, pmix_dmdx_local_t *lcd; bool local; bool localonly = false; - pmix_buffer_t pbkt; + pmix_buffer_t pbkt, pkt; pmix_byte_object_t bo; pmix_cb_t cb; - pmix_kval_t *kv; pmix_proc_t proc; char *data; size_t sz, n; @@ -277,7 +276,7 @@ pmix_status_t pmix_server_get(pmix_buffer_t *buf, * can retrieve the info from that GDS. Otherwise, * we need to retrieve it from our own */ PMIX_CONSTRUCT(&cb, pmix_cb_t); - peer = pmix_globals.mypeer; + peer = pmix_globals.mypeer; /* this data is for a local client, so give the gds the * option of returning a complete copy of the data, * or returning a pointer to local storage */ @@ -289,29 +288,17 @@ pmix_status_t pmix_server_get(pmix_buffer_t *buf, PMIX_DESTRUCT(&cb); return rc; } - /* we do have it, so let's pack it for return */ - PMIX_CONSTRUCT(&pbkt, pmix_buffer_t); - /* start with the proc name */ - PMIX_BFROPS_PACK(rc, cd->peer, &pbkt, &proc, 1, PMIX_PROC); + PMIX_CONSTRUCT(&pkt, pmix_buffer_t); + /* assemble the provided data into a byte object */ + PMIX_GDS_ASSEMB_KVS_REQ(rc, peer, &proc, &cb.kvs, &pkt, cd); if (PMIX_SUCCESS != rc) { PMIX_ERROR_LOG(rc); PMIX_DESTRUCT(&pbkt); PMIX_DESTRUCT(&cb); return rc; } - PMIX_LIST_FOREACH(kv, &cb.kvs, pmix_kval_t) { - PMIX_BFROPS_PACK(rc, cd->peer, &pbkt, kv, 1, PMIX_KVAL); - if (PMIX_SUCCESS != rc) { - PMIX_ERROR_LOG(rc); - PMIX_DESTRUCT(&pbkt); - PMIX_DESTRUCT(&cb); - return rc; - } - } - PMIX_DESTRUCT(&cb); - /* extract the byte object */ - PMIX_UNLOAD_BUFFER(&pbkt, bo.bytes, bo.size); - PMIX_DESTRUCT(&pbkt); + PMIX_UNLOAD_BUFFER(&pkt, bo.bytes, bo.size); + PMIX_DESTRUCT(&pkt); /* pack it into the payload */ PMIX_CONSTRUCT(&pbkt, pmix_buffer_t); PMIX_BFROPS_PACK(rc, cd->peer, &pbkt, &bo, 1, PMIX_BYTE_OBJECT); @@ -513,7 +500,6 @@ static pmix_status_t _satisfy_request(pmix_nspace_t *nptr, pmix_rank_t rank, pmix_rank_info_t *iptr; pmix_proc_t proc; pmix_cb_t cb; - pmix_kval_t *kv; pmix_peer_t *peer; pmix_byte_object_t bo; char *data = NULL; @@ -596,22 +582,15 @@ static pmix_status_t _satisfy_request(pmix_nspace_t *nptr, pmix_rank_t rank, peer = pmix_globals.mypeer; PMIX_GDS_FETCH_KV(rc, peer, &cb); if (PMIX_SUCCESS == rc) { - /* assemble the provided data into a byte object */ PMIX_CONSTRUCT(&pkt, pmix_buffer_t); - PMIX_BFROPS_PACK(rc, cd->peer, &pkt, &proc, 1, PMIX_PROC); - if (PMIX_SUCCESS != rc) { + /* assemble the provided data into a byte object */ + PMIX_GDS_ASSEMB_KVS_REQ(rc, peer, &proc, &cb.kvs, &pkt, cd); + if (rc != PMIX_SUCCESS) { + PMIX_DESTRUCT(&pkt); PMIX_DESTRUCT(&pbkt); PMIX_DESTRUCT(&cb); return rc; } - PMIX_LIST_FOREACH(kv, &cb.kvs, pmix_kval_t) { - PMIX_BFROPS_PACK(rc, cd->peer, &pkt, kv, 1, PMIX_KVAL); - if (PMIX_SUCCESS != rc) { - PMIX_DESTRUCT(&pkt); - PMIX_DESTRUCT(&cb); - return rc; - } - } PMIX_UNLOAD_BUFFER(&pkt, bo.bytes, bo.size); PMIX_DESTRUCT(&pkt); /* pack it for transmission */ @@ -638,25 +617,18 @@ static pmix_status_t _satisfy_request(pmix_nspace_t *nptr, pmix_rank_t rank, cb.proc = &proc; cb.scope = scope; cb.copy = false; - PMIX_GDS_FETCH_KV(rc, pmix_globals.mypeer, &cb); + PMIX_GDS_FETCH_KV(rc, peer, &cb); if (PMIX_SUCCESS == rc) { found = true; - /* assemble the provided data into a byte object */ PMIX_CONSTRUCT(&pkt, pmix_buffer_t); - PMIX_BFROPS_PACK(rc, cd->peer, &pkt, &proc, 1, PMIX_PROC); - if (PMIX_SUCCESS != rc) { + /* assemble the provided data into a byte object */ + PMIX_GDS_ASSEMB_KVS_REQ(rc, peer, &proc, &cb.kvs, &pkt, cd); + if (rc != PMIX_SUCCESS) { + PMIX_DESTRUCT(&pkt); PMIX_DESTRUCT(&pbkt); PMIX_DESTRUCT(&cb); return rc; } - PMIX_LIST_FOREACH(kv, &cb.kvs, pmix_kval_t) { - PMIX_BFROPS_PACK(rc, cd->peer, &pkt, kv, 1, PMIX_KVAL); - if (PMIX_SUCCESS != rc) { - PMIX_DESTRUCT(&pkt); - PMIX_DESTRUCT(&cb); - return rc; - } - } PMIX_UNLOAD_BUFFER(&pkt, bo.bytes, bo.size); PMIX_DESTRUCT(&pkt); /* pack it for transmission */ @@ -678,6 +650,12 @@ static pmix_status_t _satisfy_request(pmix_nspace_t *nptr, pmix_rank_t rank, return rc; } + if ((PMIX_LOCAL == scope) && !found) { + /* pass PMIX_ERR_NOT_FOUND for local request if it's not found*/ + cbfunc(PMIX_ERR_NOT_FOUND, NULL, 0, cbdata, NULL, NULL); + return PMIX_SUCCESS; + } + return PMIX_ERR_NOT_FOUND; } diff --git a/opal/mca/pmix/pmix2x/pmix/src/threads/wait_sync.h b/opal/mca/pmix/pmix2x/pmix/src/threads/wait_sync.h index 88fc745109..d20704da62 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/threads/wait_sync.h +++ b/opal/mca/pmix/pmix2x/pmix/src/threads/wait_sync.h @@ -9,7 +9,6 @@ * Copyright (c) 2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2017 Intel, Inc. All rights reserved. - * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow