From 10cb9f6f9ea4c32f0efcda1b96606b965f8f9da0 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Thu, 31 Jan 2019 15:18:05 +0900 Subject: [PATCH] oshmem: remove unnecessary dependencies to ORTE either use OPAL or OMPI layers, since ORTE layer is not present when PMIx RTE is used Signed-off-by: Gilles Gouaillardet --- oshmem/include/oshmem/constants.h | 93 ++++++++++--------- oshmem/info/info.c | 16 ++-- oshmem/mca/memheap/base/memheap_base_mkey.c | 20 ++-- oshmem/mca/memheap/base/memheap_base_select.c | 5 +- oshmem/mca/memheap/buddy/memheap_buddy.c | 4 +- .../mca/memheap/ptmalloc/memheap_ptmalloc.c | 4 +- oshmem/mca/scoll/basic/scoll_basic_barrier.c | 4 +- .../mca/scoll/basic/scoll_basic_broadcast.c | 4 +- oshmem/mca/scoll/basic/scoll_basic_collect.c | 4 +- oshmem/mca/scoll/mpi/scoll_mpi.h | 18 ++-- oshmem/mca/spml/base/spml_base.c | 4 +- oshmem/mca/spml/base/spml_base_select.c | 10 +- oshmem/mca/spml/ikrit/spml_ikrit.c | 12 +-- oshmem/mca/spml/ikrit/spml_ikrit.h | 5 +- oshmem/mca/spml/ikrit/spml_ikrit_component.c | 20 ++-- oshmem/mca/spml/ucx/spml_ucx.c | 7 +- oshmem/mca/spml/ucx/spml_ucx.h | 5 +- oshmem/mca/spml/ucx/spml_ucx_component.c | 4 +- oshmem/mca/sshmem/base/base.h | 6 +- oshmem/mca/sshmem/base/sshmem_base_wrappers.c | 4 +- oshmem/mca/sshmem/mmap/sshmem_mmap_module.c | 5 +- oshmem/mca/sshmem/sysv/sshmem_sysv_module.c | 9 +- oshmem/mca/sshmem/ucx/sshmem_ucx_module.c | 3 +- oshmem/op/op.c | 9 +- oshmem/op/op.h | 4 +- oshmem/proc/proc.c | 17 +--- oshmem/proc/proc.h | 21 ++--- oshmem/runtime/oshmem_shmem_abort.c | 32 +++---- oshmem/runtime/oshmem_shmem_finalize.c | 10 +- oshmem/runtime/oshmem_shmem_init.c | 16 +--- oshmem/runtime/runtime.h | 9 +- oshmem/shmem/c/shmem_alltoall.c | 4 +- oshmem/shmem/c/shmem_broadcast.c | 4 +- oshmem/shmem/c/shmem_clear_lock.c | 4 +- oshmem/shmem/c/shmem_collect.c | 4 +- oshmem/shmem/c/shmem_context.c | 4 +- oshmem/shmem/c/shmem_global_exit.c | 6 +- oshmem/shmem/c/shmem_init.c | 6 +- oshmem/shmem/c/shmem_pe_accessible.c | 4 +- oshmem/shmem/c/shmem_ptr.c | 4 +- oshmem/shmem/c/shmem_set_lock.c | 4 +- oshmem/shmem/c/shmem_test_lock.c | 4 +- 42 files changed, 201 insertions(+), 231 deletions(-) diff --git a/oshmem/include/oshmem/constants.h b/oshmem/include/oshmem/constants.h index be8d4b2032..a77849a6b5 100644 --- a/oshmem/include/oshmem/constants.h +++ b/oshmem/include/oshmem/constants.h @@ -1,6 +1,8 @@ /* * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -11,60 +13,61 @@ #ifndef OSHMEM_CONSTANTS_H #define OSHMEM_CONSTANTS_H -#include "orte/constants.h" +#include "opal/constants.h" + #include "oshmem/include/shmem.h" -#define OSHMEM_ERR_BASE ORTE_ERR_MAX +#define OSHMEM_ERR_BASE OPAL_ERR_MAX /* error codes */ enum { - /* Error codes inherited from ORTE/OPAL. Still enum values so + /* Error codes inherited from OPAL. Still enum values so that we might get nice debugger help */ - OSHMEM_SUCCESS = ORTE_SUCCESS, + OSHMEM_SUCCESS = OPAL_SUCCESS, - OSHMEM_ERROR = ORTE_ERROR, - OSHMEM_ERR_OUT_OF_RESOURCE = ORTE_ERR_OUT_OF_RESOURCE, - OSHMEM_ERR_TEMP_OUT_OF_RESOURCE = ORTE_ERR_TEMP_OUT_OF_RESOURCE, - OSHMEM_ERR_RESOURCE_BUSY = ORTE_ERR_RESOURCE_BUSY, - OSHMEM_ERR_BAD_PARAM = ORTE_ERR_BAD_PARAM, - OSHMEM_ERR_FATAL = ORTE_ERR_FATAL, - OSHMEM_ERR_NOT_IMPLEMENTED = ORTE_ERR_NOT_IMPLEMENTED, - OSHMEM_ERR_NOT_SUPPORTED = ORTE_ERR_NOT_SUPPORTED, - OSHMEM_ERR_INTERUPTED = ORTE_ERR_INTERUPTED, - OSHMEM_ERR_WOULD_BLOCK = ORTE_ERR_WOULD_BLOCK, - OSHMEM_ERR_IN_ERRNO = ORTE_ERR_IN_ERRNO, - OSHMEM_ERR_UNREACH = ORTE_ERR_UNREACH, - OSHMEM_ERR_NOT_FOUND = ORTE_ERR_NOT_FOUND, - OSHMEM_EXISTS = ORTE_EXISTS, /* indicates that the specified object already exists */ - OSHMEM_ERR_TIMEOUT = ORTE_ERR_TIMEOUT, - OSHMEM_ERR_NOT_AVAILABLE = ORTE_ERR_NOT_AVAILABLE, - OSHMEM_ERR_PERM = ORTE_ERR_PERM, - OSHMEM_ERR_VALUE_OUT_OF_BOUNDS = ORTE_ERR_VALUE_OUT_OF_BOUNDS, - OSHMEM_ERR_FILE_READ_FAILURE = ORTE_ERR_FILE_READ_FAILURE, - OSHMEM_ERR_FILE_WRITE_FAILURE = ORTE_ERR_FILE_WRITE_FAILURE, - OSHMEM_ERR_FILE_OPEN_FAILURE = ORTE_ERR_FILE_OPEN_FAILURE, + OSHMEM_ERROR = OPAL_ERROR, + OSHMEM_ERR_OUT_OF_RESOURCE = OPAL_ERR_OUT_OF_RESOURCE, + OSHMEM_ERR_TEMP_OUT_OF_RESOURCE = OPAL_ERR_TEMP_OUT_OF_RESOURCE, + OSHMEM_ERR_RESOURCE_BUSY = OPAL_ERR_RESOURCE_BUSY, + OSHMEM_ERR_BAD_PARAM = OPAL_ERR_BAD_PARAM, + OSHMEM_ERR_FATAL = OPAL_ERR_FATAL, + OSHMEM_ERR_NOT_IMPLEMENTED = OPAL_ERR_NOT_IMPLEMENTED, + OSHMEM_ERR_NOT_SUPPORTED = OPAL_ERR_NOT_SUPPORTED, + OSHMEM_ERR_INTERUPTED = OPAL_ERR_INTERRUPTED, + OSHMEM_ERR_WOULD_BLOCK = OPAL_ERR_WOULD_BLOCK, + OSHMEM_ERR_IN_ERRNO = OPAL_ERR_IN_ERRNO, + OSHMEM_ERR_UNREACH = OPAL_ERR_UNREACH, + OSHMEM_ERR_NOT_FOUND = OPAL_ERR_NOT_FOUND, + OSHMEM_EXISTS = OPAL_EXISTS, /* indicates that the specified object already exists */ + OSHMEM_ERR_TIMEOUT = OPAL_ERR_TIMEOUT, + OSHMEM_ERR_NOT_AVAILABLE = OPAL_ERR_NOT_AVAILABLE, + OSHMEM_ERR_PERM = OPAL_ERR_PERM, + OSHMEM_ERR_VALUE_OUT_OF_BOUNDS = OPAL_ERR_VALUE_OUT_OF_BOUNDS, + OSHMEM_ERR_FILE_READ_FAILURE = OPAL_ERR_FILE_READ_FAILURE, + OSHMEM_ERR_FILE_WRITE_FAILURE = OPAL_ERR_FILE_WRITE_FAILURE, + OSHMEM_ERR_FILE_OPEN_FAILURE = OPAL_ERR_FILE_OPEN_FAILURE, - OSHMEM_ERR_RECV_LESS_THAN_POSTED = ORTE_ERR_RECV_LESS_THAN_POSTED, - OSHMEM_ERR_RECV_MORE_THAN_POSTED = ORTE_ERR_RECV_MORE_THAN_POSTED, - OSHMEM_ERR_NO_MATCH_YET = ORTE_ERR_NO_MATCH_YET, - OSHMEM_ERR_BUFFER = ORTE_ERR_BUFFER, - OSHMEM_ERR_REQUEST = ORTE_ERR_REQUEST, - OSHMEM_ERR_NO_CONNECTION_ALLOWED = ORTE_ERR_NO_CONNECTION_ALLOWED, - OSHMEM_ERR_CONNECTION_REFUSED = ORTE_ERR_CONNECTION_REFUSED , - OSHMEM_ERR_CONNECTION_FAILED = ORTE_ERR_CONNECTION_FAILED, - OSHMEM_PACK_MISMATCH = ORTE_ERR_PACK_MISMATCH, - OSHMEM_ERR_PACK_FAILURE = ORTE_ERR_PACK_FAILURE, - OSHMEM_ERR_UNPACK_FAILURE = ORTE_ERR_UNPACK_FAILURE, - OSHMEM_ERR_COMM_FAILURE = ORTE_ERR_COMM_FAILURE, - OSHMEM_UNPACK_INADEQUATE_SPACE = ORTE_ERR_UNPACK_INADEQUATE_SPACE, - OSHMEM_UNPACK_READ_PAST_END_OF_BUFFER = ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER, - OSHMEM_ERR_TYPE_MISMATCH = ORTE_ERR_TYPE_MISMATCH, - OSHMEM_ERR_COMPARE_FAILURE = ORTE_ERR_COMPARE_FAILURE, - OSHMEM_ERR_COPY_FAILURE = ORTE_ERR_COPY_FAILURE, - OSHMEM_ERR_UNKNOWN_DATA_TYPE = ORTE_ERR_UNKNOWN_DATA_TYPE, - OSHMEM_ERR_DATA_TYPE_REDEF = ORTE_ERR_DATA_TYPE_REDEF, - OSHMEM_ERR_DATA_OVERWRITE_ATTEMPT = ORTE_ERR_DATA_OVERWRITE_ATTEMPT + OSHMEM_ERR_RECV_LESS_THAN_POSTED = (OSHMEM_ERR_BASE - 1), + OSHMEM_ERR_RECV_MORE_THAN_POSTED = (OSHMEM_ERR_BASE - 2), + OSHMEM_ERR_NO_MATCH_YET = (OSHMEM_ERR_BASE - 3), + OSHMEM_ERR_BUFFER = OPAL_ERR_BUFFER, + OSHMEM_ERR_REQUEST = (OSHMEM_ERR_BASE - 4), + OSHMEM_ERR_NO_CONNECTION_ALLOWED = (OSHMEM_ERR_BASE - 5), + OSHMEM_ERR_CONNECTION_REFUSED = (OSHMEM_ERR_BASE - 6), + OSHMEM_ERR_CONNECTION_FAILED = OPAL_ERR_CONNECTION_FAILED, + OSHMEM_PACK_MISMATCH = OPAL_ERR_PACK_MISMATCH, + OSHMEM_ERR_PACK_FAILURE = OPAL_ERR_PACK_FAILURE, + OSHMEM_ERR_UNPACK_FAILURE = OPAL_ERR_UNPACK_FAILURE, + OSHMEM_ERR_COMM_FAILURE = OPAL_ERR_COMM_FAILURE, + OSHMEM_UNPACK_INADEQUATE_SPACE = OPAL_ERR_UNPACK_INADEQUATE_SPACE, + OSHMEM_UNPACK_READ_PAST_END_OF_BUFFER = OPAL_ERR_UNPACK_READ_PAST_END_OF_BUFFER, + OSHMEM_ERR_TYPE_MISMATCH = OPAL_ERR_TYPE_MISMATCH, + OSHMEM_ERR_COMPARE_FAILURE = (OSHMEM_ERR_BASE - 9), + OSHMEM_ERR_COPY_FAILURE = (OSHMEM_ERR_BASE - 10), + OSHMEM_ERR_UNKNOWN_DATA_TYPE = OPAL_ERR_UNKNOWN_DATA_TYPE, + OSHMEM_ERR_DATA_TYPE_REDEF = OPAL_ERR_DATA_TYPE_REDEF, + OSHMEM_ERR_DATA_OVERWRITE_ATTEMPT = OPAL_ERR_DATA_OVERWRITE_ATTEMPT }; diff --git a/oshmem/info/info.c b/oshmem/info/info.c index 909db31f93..d023da49bd 100644 --- a/oshmem/info/info.c +++ b/oshmem/info/info.c @@ -2,6 +2,8 @@ * Copyright (c) 2015 Mellanox Technologies, Inc. * All rights reserved. * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -15,13 +17,13 @@ #include #include -#include "orte/runtime/orte_globals.h" -#include "orte/util/show_help.h" - #include "opal/util/opal_environ.h" +#include "opal/util/show_help.h" #include "opal/util/output.h" #include "opal/util/printf.h" +#include "ompi/mca/rte/rte.h" + #include "oshmem/version.h" #include "oshmem/constants.h" #include "oshmem/info/info.h" @@ -65,7 +67,7 @@ int oshmem_info_init(void) goto out; } } - if (oshmem_shmem_info_env.print_version && 0 == ORTE_PROC_MY_NAME->vpid) { + if (oshmem_shmem_info_env.print_version && 0 == OMPI_PROC_MY_NAME->vpid) { char version[OSHMEM_MAX_LIBRARY_VERSION_STRING]; int len; @@ -73,7 +75,7 @@ int oshmem_info_init(void) if (OSHMEM_SUCCESS != ret || 0 == len) { goto out; } - orte_show_help("help-shmem-runtime.txt", + opal_show_help("help-shmem-runtime.txt", "oshmem_init:print-version", true, version); @@ -85,8 +87,8 @@ int oshmem_info_init(void) goto out; } } - if (oshmem_shmem_info_env.print_info && 0 == ORTE_PROC_MY_NAME->vpid) { - orte_show_help("help-shmem-runtime.txt", + if (oshmem_shmem_info_env.print_info && 0 == OMPI_PROC_MY_NAME->vpid) { + opal_show_help("help-shmem-runtime.txt", "oshmem_init:print-info", true, OSHMEM_ENV_VERSION, diff --git a/oshmem/mca/memheap/base/memheap_base_mkey.c b/oshmem/mca/memheap/base/memheap_base_mkey.c index a2e21f1a5b..8d92293210 100644 --- a/oshmem/mca/memheap/base/memheap_base_mkey.c +++ b/oshmem/mca/memheap/base/memheap_base_mkey.c @@ -2,8 +2,8 @@ /* * Copyright (c) 2013-2015 Mellanox Technologies, Inc. * All rights reserved. - * Copyright (c) 2015-2016 Research Organization for Information Science - * and Technology (RIST). All rights reserved. + * Copyright (c) 2015-2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Intel, Inc. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. @@ -202,7 +202,7 @@ static void do_recv(int source_pe, opal_buffer_t* buffer) MEMHEAP_VERBOSE(5, "unpacking %d of %d", cnt, OPAL_UINT8); rc = opal_dss.unpack(buffer, &msg_type, &cnt, OPAL_UINT8); if (OPAL_SUCCESS != rc) { - ORTE_ERROR_LOG(rc); + OMPI_ERROR_LOG(rc); goto send_fail; } @@ -219,7 +219,7 @@ static void do_recv(int source_pe, opal_buffer_t* buffer) msg = OBJ_NEW(opal_buffer_t); if (!msg) { MEMHEAP_ERROR("failed to get msg buffer"); - ORTE_ERROR_LOG(rc); + OMPI_ERROR_LOG(rc); return; } @@ -234,7 +234,7 @@ static void do_recv(int source_pe, opal_buffer_t* buffer) rc = send_buffer(source_pe, msg); if (MPI_SUCCESS != rc) { MEMHEAP_ERROR("FAILED to send rml message %d", rc); - ORTE_ERROR_LOG(rc); + OMPI_ERROR_LOG(rc); goto send_fail; } break; @@ -264,7 +264,7 @@ static void do_recv(int source_pe, opal_buffer_t* buffer) send_fail: msg = OBJ_NEW(opal_buffer_t); if (!msg) { MEMHEAP_ERROR("failed to get msg buffer"); - ORTE_ERROR_LOG(rc); + OMPI_ERROR_LOG(rc); return; } msg_type = MEMHEAP_RKEY_RESP_FAIL; @@ -273,7 +273,7 @@ static void do_recv(int source_pe, opal_buffer_t* buffer) rc = send_buffer(source_pe, msg); if (MPI_SUCCESS != rc) { MEMHEAP_ERROR("FAILED to send rml message %d", rc); - ORTE_ERROR_LOG(rc); + OMPI_ERROR_LOG(rc); } } @@ -340,14 +340,14 @@ static int oshmem_mkey_recv_cb(void) tmp_buf = malloc(size); if (NULL == tmp_buf) { MEMHEAP_ERROR("not enough memory"); - ORTE_ERROR_LOG(0); + OMPI_ERROR_LOG(0); return n; } else { memcpy(tmp_buf, (void*)&r->buf, size); msg = OBJ_NEW(opal_buffer_t); if (NULL == msg) { MEMHEAP_ERROR("not enough memory"); - ORTE_ERROR_LOG(0); + OMPI_ERROR_LOG(0); free(tmp_buf); return n; } @@ -366,7 +366,7 @@ static int oshmem_mkey_recv_cb(void) rc = PMPI_Start(&r->recv_req); if (MPI_SUCCESS != rc) { MEMHEAP_ERROR("Failed to post recv request %d", rc); - ORTE_ERROR_LOG(rc); + OMPI_ERROR_LOG(rc); return n; } opal_list_append(&memheap_oob.req_list, &r->super); diff --git a/oshmem/mca/memheap/base/memheap_base_select.c b/oshmem/mca/memheap/base/memheap_base_select.c index 54676a7e32..e0c1c3a638 100644 --- a/oshmem/mca/memheap/base/memheap_base_select.c +++ b/oshmem/mca/memheap/base/memheap_base_select.c @@ -1,8 +1,8 @@ /* * Copyright (c) 2013-2015 Mellanox Technologies, Inc. * All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science - * and Technology (RIST). All rights reserved. + * Copyright (c) 2015-2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -21,7 +21,6 @@ #include "oshmem/util/oshmem_util.h" #include "oshmem/mca/memheap/memheap.h" #include "oshmem/mca/memheap/base/base.h" -#include "orte/mca/errmgr/errmgr.h" mca_memheap_base_module_t mca_memheap = {0}; diff --git a/oshmem/mca/memheap/buddy/memheap_buddy.c b/oshmem/mca/memheap/buddy/memheap_buddy.c index c6f0fdc564..51be29ff59 100644 --- a/oshmem/mca/memheap/buddy/memheap_buddy.c +++ b/oshmem/mca/memheap/buddy/memheap_buddy.c @@ -1,5 +1,7 @@ /* Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -14,10 +16,8 @@ #include "oshmem/mca/memheap/buddy/memheap_buddy.h" #include "oshmem/mca/memheap/buddy/memheap_buddy_component.h" #include "oshmem/mca/memheap/base/base.h" -#include "orte/mca/grpcomm/grpcomm.h" #include "opal/class/opal_hash_table.h" #include "opal/class/opal_object.h" -#include "orte/util/name_fns.h" static int buddy_init(mca_memheap_buddy_module_t* buddy); diff --git a/oshmem/mca/memheap/ptmalloc/memheap_ptmalloc.c b/oshmem/mca/memheap/ptmalloc/memheap_ptmalloc.c index f6f5b48bb7..7df38936f4 100644 --- a/oshmem/mca/memheap/ptmalloc/memheap_ptmalloc.c +++ b/oshmem/mca/memheap/ptmalloc/memheap_ptmalloc.c @@ -1,5 +1,7 @@ /* Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -14,10 +16,8 @@ #include "oshmem/mca/memheap/ptmalloc/memheap_ptmalloc.h" #include "oshmem/mca/memheap/ptmalloc/memheap_ptmalloc_component.h" #include "oshmem/mca/memheap/base/base.h" -#include "orte/mca/grpcomm/grpcomm.h" #include "opal/class/opal_hash_table.h" #include "opal/class/opal_object.h" -#include "orte/util/name_fns.h" mca_memheap_ptmalloc_module_t memheap_ptmalloc = { { diff --git a/oshmem/mca/scoll/basic/scoll_basic_barrier.c b/oshmem/mca/scoll/basic/scoll_basic_barrier.c index 05b976ad41..e4d0ee23d3 100644 --- a/oshmem/mca/scoll/basic/scoll_basic_barrier.c +++ b/oshmem/mca/scoll/basic/scoll_basic_barrier.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2013-2015 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -12,8 +14,6 @@ #include #include -#include "orte/mca/grpcomm/grpcomm.h" - #include "oshmem/constants.h" #include "oshmem/mca/spml/spml.h" #include "oshmem/mca/scoll/scoll.h" diff --git a/oshmem/mca/scoll/basic/scoll_basic_broadcast.c b/oshmem/mca/scoll/basic/scoll_basic_broadcast.c index 44c8436a0e..5ba4686eac 100644 --- a/oshmem/mca/scoll/basic/scoll_basic_broadcast.c +++ b/oshmem/mca/scoll/basic/scoll_basic_broadcast.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -12,8 +14,6 @@ #include #include -#include "orte/mca/grpcomm/grpcomm.h" - #include "opal/util/bit_ops.h" #include "oshmem/constants.h" diff --git a/oshmem/mca/scoll/basic/scoll_basic_collect.c b/oshmem/mca/scoll/basic/scoll_basic_collect.c index e5fb03f535..5689780d7f 100644 --- a/oshmem/mca/scoll/basic/scoll_basic_collect.c +++ b/oshmem/mca/scoll/basic/scoll_basic_collect.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2013-2015 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -12,8 +14,6 @@ #include #include -#include "orte/mca/grpcomm/grpcomm.h" - #include "oshmem/constants.h" #include "oshmem/mca/spml/spml.h" #include "oshmem/mca/scoll/scoll.h" diff --git a/oshmem/mca/scoll/mpi/scoll_mpi.h b/oshmem/mca/scoll/mpi/scoll_mpi.h index 40d163e74c..4938cb1d6d 100644 --- a/oshmem/mca/scoll/mpi/scoll_mpi.h +++ b/oshmem/mca/scoll/mpi/scoll_mpi.h @@ -1,10 +1,12 @@ -/** - Copyright (c) 2011 Mellanox Technologies. All rights reserved. - $COPYRIGHT$ - - Additional copyrights may follow - - $HEADER$ +/* + * Copyright (c) 2011 Mellanox Technologies. All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ */ #ifndef MCA_SCOLL_MPI_H @@ -20,8 +22,6 @@ #include "oshmem/proc/proc.h" #include "ompi/communicator/communicator.h" -#include "orte/runtime/orte_globals.h" - #include "scoll_mpi_debug.h" BEGIN_C_DECLS diff --git a/oshmem/mca/spml/base/spml_base.c b/oshmem/mca/spml/base/spml_base.c index 86d544e88e..4e3331ae8c 100644 --- a/oshmem/mca/spml/base/spml_base.c +++ b/oshmem/mca/spml/base/spml_base.c @@ -2,6 +2,8 @@ * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. * Copyright (c) 2017 ARM, Inc. All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -12,8 +14,6 @@ #include "oshmem_config.h" #include "ompi/mca/bml/base/base.h" #include "opal/datatype/opal_convertor.h" -#include "orte/include/orte/types.h" -#include "orte/runtime/orte_globals.h" #include "oshmem/proc/proc.h" #include "oshmem/mca/spml/base/base.h" #include "opal/mca/btl/btl.h" diff --git a/oshmem/mca/spml/base/spml_base_select.c b/oshmem/mca/spml/base/spml_base_select.c index fd46f796aa..22b68ee742 100644 --- a/oshmem/mca/spml/base/spml_base_select.c +++ b/oshmem/mca/spml/base/spml_base_select.c @@ -1,8 +1,8 @@ /* * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. - * Copyright (c) 2014 Research Organization for Information Science - * and Technology (RIST). All rights reserved. + * Copyright (c) 2014-2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -18,8 +18,6 @@ #include "opal/mca/base/base.h" #include "opal/runtime/opal.h" -#include "orte/mca/errmgr/errmgr.h" - #include "oshmem/util/oshmem_util.h" #include "oshmem/constants.h" #include "oshmem/mca/spml/spml.h" @@ -147,10 +145,10 @@ int mca_spml_base_select(bool enable_progress_threads, bool enable_mpi_threads) if (NULL == tmp_val) { continue; } - orte_errmgr.abort(1, "SPML %s cannot be selected", tmp_val); + ompi_rte_abort(1, "SPML %s cannot be selected", tmp_val); } if (0 == i) { - orte_errmgr.abort(2, + ompi_rte_abort(2, "No spml component available. This shouldn't happen."); } } diff --git a/oshmem/mca/spml/ikrit/spml_ikrit.c b/oshmem/mca/spml/ikrit/spml_ikrit.c index 523baf7763..37b1cb41a9 100644 --- a/oshmem/mca/spml/ikrit/spml_ikrit.c +++ b/oshmem/mca/spml/ikrit/spml_ikrit.c @@ -2,8 +2,8 @@ /* * Copyright (c) 2013-2015 Mellanox Technologies, Inc. * All rights reserved. - * Copyright (c) 2014-2016 Research Organization for Information Science - * and Technology (RIST). All rights reserved. + * Copyright (c) 2014-2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ @@ -23,8 +23,7 @@ #include "oshmem_config.h" #include "opal/datatype/opal_convertor.h" #include "opal/mca/memchecker/base/base.h" -#include "orte/include/orte/types.h" -#include "orte/runtime/orte_globals.h" +#include "opal/util/show_help.h" #include "oshmem/mca/spml/ikrit/spml_ikrit.h" #include "oshmem/include/shmem.h" #include "oshmem/mca/memheap/memheap.h" @@ -33,7 +32,6 @@ #include "oshmem/mca/spml/base/base.h" #include "oshmem/mca/spml/base/spml_base_putreq.h" #include "oshmem/runtime/runtime.h" -#include "orte/util/show_help.h" #include "oshmem/mca/sshmem/sshmem.h" #include "oshmem/mca/spml/ikrit/spml_ikrit_component.h" @@ -351,7 +349,7 @@ int mca_spml_ikrit_add_procs(ompi_proc_t** procs, size_t nprocs) if (mca_spml_ikrit.hw_rdma_channel) { err = mxm_ep_get_address(mca_spml_ikrit.mxm_hw_rdma_ep, &my_ep_info.addr.ep_addr, &mxm_addr_len); if (MXM_OK != err) { - orte_show_help("help-oshmem-spml-ikrit.txt", "unable to get endpoint address", true, + opal_show_help("help-oshmem-spml-ikrit.txt", "unable to get endpoint address", true, mxm_error_string(err)); rc = OSHMEM_ERROR; goto bail; @@ -361,7 +359,7 @@ int mca_spml_ikrit_add_procs(ompi_proc_t** procs, size_t nprocs) } err = mxm_ep_get_address(mca_spml_ikrit.mxm_ep, &my_ep_info.addr.ep_addr, &mxm_addr_len); if (MXM_OK != err) { - orte_show_help("help-oshmem-spml-ikrit.txt", "unable to get endpoint address", true, + opal_show_help("help-oshmem-spml-ikrit.txt", "unable to get endpoint address", true, mxm_error_string(err)); rc = OSHMEM_ERROR; goto bail; diff --git a/oshmem/mca/spml/ikrit/spml_ikrit.h b/oshmem/mca/spml/ikrit/spml_ikrit.h index e275c3bf59..543d9a3070 100644 --- a/oshmem/mca/spml/ikrit/spml_ikrit.h +++ b/oshmem/mca/spml/ikrit/spml_ikrit.h @@ -4,8 +4,8 @@ * All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. - * Copyright (c) 2016 Research Organization for Information Science - * and Technology (RIST). All rights reserved. + * Copyright (c) 2016-2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -32,7 +32,6 @@ #include "opal/class/opal_free_list.h" #include "opal/class/opal_list.h" -#include "orte/runtime/orte_globals.h" #include "oshmem/mca/memheap/base/base.h" #include diff --git a/oshmem/mca/spml/ikrit/spml_ikrit_component.c b/oshmem/mca/spml/ikrit/spml_ikrit_component.c index 527fb71854..272a5d261d 100644 --- a/oshmem/mca/spml/ikrit/spml_ikrit_component.c +++ b/oshmem/mca/spml/ikrit/spml_ikrit_component.c @@ -5,6 +5,8 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -18,8 +20,8 @@ #include #include "opal/util/printf.h" +#include "opal/util/show_help.h" #include "oshmem_config.h" -#include "orte/util/show_help.h" #include "shmem.h" #include "oshmem/runtime/params.h" #include "oshmem/mca/spml/spml.h" @@ -27,8 +29,6 @@ #include "spml_ikrit_component.h" #include "oshmem/mca/spml/ikrit/spml_ikrit.h" -#include "orte/util/show_help.h" - static int mca_spml_ikrit_component_register(void); static int mca_spml_ikrit_component_open(void); static int mca_spml_ikrit_component_close(void); @@ -76,7 +76,7 @@ static inline int check_mxm_tls(char *var) "%s=%s", var, getenv(var) )) { - orte_show_help("help-oshmem-spml-ikrit.txt", "mxm shm tls", true, + opal_show_help("help-oshmem-spml-ikrit.txt", "mxm shm tls", true, str); free(str); } @@ -133,7 +133,7 @@ static inline int check_mxm_hw_tls(char *v, char *tls) } } - orte_show_help("help-oshmem-spml-ikrit.txt", "mxm tls", true, + opal_show_help("help-oshmem-spml-ikrit.txt", "mxm tls", true, v, tls); return OSHMEM_ERROR; } @@ -260,7 +260,7 @@ int spml_ikrit_progress(void) err = mxm_progress(mca_spml_ikrit.mxm_context); if ((MXM_OK != err) && (MXM_ERR_NO_PROGRESS != err)) { - orte_show_help("help-oshmem-spml-ikrit.txt", + opal_show_help("help-oshmem-spml-ikrit.txt", "errors during mxm_progress", true, mxm_error_string(err)); @@ -317,7 +317,7 @@ static int mca_spml_ikrit_component_open(void) SPML_VERBOSE(1, "No supported device found, disqualifying spml/ikrit"); } else { - orte_show_help("help-oshmem-spml-ikrit.txt", + opal_show_help("help-oshmem-spml-ikrit.txt", "mxm init", true, mxm_error_string(err)); @@ -329,7 +329,7 @@ static int mca_spml_ikrit_component_open(void) MXM_SHMEM_MQ_ID, &mca_spml_ikrit.mxm_mq); if (MXM_OK != err) { - orte_show_help("help-oshmem-spml-ikrit.txt", + opal_show_help("help-oshmem-spml-ikrit.txt", "mxm mq create", true, mxm_error_string(err)); @@ -365,7 +365,7 @@ static int spml_ikrit_mxm_init(void) mca_spml_ikrit.mxm_ep_opts, &mca_spml_ikrit.mxm_ep); if (MXM_OK != err) { - orte_show_help("help-oshmem-spml-ikrit.txt", + opal_show_help("help-oshmem-spml-ikrit.txt", "unable to create endpoint", true, mxm_error_string(err)); @@ -376,7 +376,7 @@ static int spml_ikrit_mxm_init(void) mca_spml_ikrit.mxm_ep_hw_rdma_opts, &mca_spml_ikrit.mxm_hw_rdma_ep); if (MXM_OK != err) { - orte_show_help("help-oshmem-spml-ikrit.txt", + opal_show_help("help-oshmem-spml-ikrit.txt", "unable to create endpoint", true, mxm_error_string(err)); diff --git a/oshmem/mca/spml/ucx/spml_ucx.c b/oshmem/mca/spml/ucx/spml_ucx.c index 67bfc7ceab..99c9bcfe3c 100644 --- a/oshmem/mca/spml/ucx/spml_ucx.c +++ b/oshmem/mca/spml/ucx/spml_ucx.c @@ -1,8 +1,8 @@ /* * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. - * Copyright (c) 2014-2018 Research Organization for Information Science - * and Technology (RIST). All rights reserved. + * Copyright (c) 2014-2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * Copyright (c) 2016 ARM, Inc. All rights reserved. * $COPYRIGHT$ * @@ -21,8 +21,6 @@ #include "oshmem_config.h" #include "opal/datatype/opal_convertor.h" #include "opal/mca/common/ucx/common_ucx.h" -#include "orte/include/orte/types.h" -#include "orte/runtime/orte_globals.h" #include "ompi/datatype/ompi_datatype.h" #include "ompi/mca/pml/pml.h" @@ -35,7 +33,6 @@ #include "oshmem/mca/spml/base/base.h" #include "oshmem/mca/spml/base/spml_base_putreq.h" #include "oshmem/runtime/runtime.h" -#include "orte/util/show_help.h" #include "oshmem/mca/spml/ucx/spml_ucx_component.h" diff --git a/oshmem/mca/spml/ucx/spml_ucx.h b/oshmem/mca/spml/ucx/spml_ucx.h index 1b2f0b58d8..48fe66e1d0 100644 --- a/oshmem/mca/spml/ucx/spml_ucx.h +++ b/oshmem/mca/spml/ucx/spml_ucx.h @@ -1,8 +1,8 @@ /* * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. - * Copyright (c) 2016 Research Organization for Information Science - * and Technology (RIST). All rights reserved. + * Copyright (c) 2016-2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * Copyright (c) 2016 ARM, Inc. All rights reserved. * $COPYRIGHT$ * @@ -34,7 +34,6 @@ #include "opal/class/opal_free_list.h" #include "opal/class/opal_list.h" -#include "orte/runtime/orte_globals.h" #include "opal/mca/common/ucx/common_ucx.h" #include diff --git a/oshmem/mca/spml/ucx/spml_ucx_component.c b/oshmem/mca/spml/ucx/spml_ucx_component.c index 9f4d28b5d4..c91edbfc12 100644 --- a/oshmem/mca/spml/ucx/spml_ucx_component.c +++ b/oshmem/mca/spml/ucx/spml_ucx_component.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2015 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -14,7 +16,6 @@ #include #include "oshmem_config.h" -#include "orte/util/show_help.h" #include "shmem.h" #include "oshmem/runtime/params.h" #include "oshmem/mca/spml/spml.h" @@ -22,7 +23,6 @@ #include "spml_ucx_component.h" #include "oshmem/mca/spml/ucx/spml_ucx.h" -#include "orte/util/show_help.h" #include "opal/util/opal_environ.h" static int mca_spml_ucx_component_register(void); diff --git a/oshmem/mca/sshmem/base/base.h b/oshmem/mca/sshmem/base/base.h index ea44ff5096..94c5e28e5e 100644 --- a/oshmem/mca/sshmem/base/base.h +++ b/oshmem/mca/sshmem/base/base.h @@ -1,7 +1,9 @@ /* * Copyright (c) 2014 Mellanox Technologies, Inc. * All rights reserved. - * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -18,8 +20,6 @@ #include "opal/mca/base/mca_base_framework.h" -#include "orte/runtime/orte_globals.h" - BEGIN_C_DECLS extern void* mca_sshmem_base_start_address; diff --git a/oshmem/mca/sshmem/base/sshmem_base_wrappers.c b/oshmem/mca/sshmem/base/sshmem_base_wrappers.c index d70490cb4e..d8bc64fe25 100644 --- a/oshmem/mca/sshmem/base/sshmem_base_wrappers.c +++ b/oshmem/mca/sshmem/base/sshmem_base_wrappers.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2014 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -68,7 +70,7 @@ char * oshmem_get_unique_file_name(uint64_t pe) return NULL; } - snprintf(file_name, OPAL_PATH_MAX, "%s/shmem_job_%u_pe_%llu", mca_sshmem_base_backing_file_dir, ORTE_PROC_MY_NAME->jobid, (unsigned long long)pe); + snprintf(file_name, OPAL_PATH_MAX, "%s/shmem_job_%u_pe_%llu", mca_sshmem_base_backing_file_dir, OMPI_PROC_MY_NAME->jobid, (unsigned long long)pe); return file_name; } diff --git a/oshmem/mca/sshmem/mmap/sshmem_mmap_module.c b/oshmem/mca/sshmem/mmap/sshmem_mmap_module.c index 9a30322107..1afaaf400b 100644 --- a/oshmem/mca/sshmem/mmap/sshmem_mmap_module.c +++ b/oshmem/mca/sshmem/mmap/sshmem_mmap_module.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2014 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -36,7 +38,6 @@ #include "opal/util/output.h" #include "opal/util/path.h" #include "opal/util/show_help.h" -#include "orte/util/show_help.h" #include "oshmem/proc/proc.h" #include "oshmem/mca/sshmem/sshmem.h" @@ -137,7 +138,7 @@ segment_create(map_segment_t *ds_buf, "create segment failure", true, "mmap", - orte_process_info.nodename, (unsigned long long) size, + ompi_process_info.nodename, (unsigned long long) size, strerror(errno), errno); opal_show_help("help-oshmem-sshmem-mmap.txt", "mmap:create segment failure", diff --git a/oshmem/mca/sshmem/sysv/sshmem_sysv_module.c b/oshmem/mca/sshmem/sysv/sshmem_sysv_module.c index a1d112da7d..56fd4df00d 100644 --- a/oshmem/mca/sshmem/sysv/sshmem_sysv_module.c +++ b/oshmem/mca/sshmem/sysv/sshmem_sysv_module.c @@ -1,7 +1,9 @@ /* * Copyright (c) 2014 Mellanox Technologies, Inc. * All rights reserved. - * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -43,7 +45,6 @@ #include "opal/util/output.h" #include "opal/util/path.h" #include "opal/util/show_help.h" -#include "orte/util/show_help.h" #include "oshmem/proc/proc.h" #include "oshmem/mca/sshmem/sshmem.h" @@ -156,7 +157,7 @@ retry_alloc: "create segment failure", true, "sysv", - orte_process_info.nodename, (unsigned long long) size, + ompi_process_info.nodename, (unsigned long long) size, strerror(errno), errno); opal_show_help("help-oshmem-sshmem-sysv.txt", "sysv:create segment failure", @@ -171,7 +172,7 @@ retry_alloc: "create segment failure", true, "sysv", - orte_process_info.nodename, (unsigned long long) size, + ompi_process_info.nodename, (unsigned long long) size, strerror(errno), errno); opal_show_help("help-oshmem-sshmem-sysv.txt", "sysv:create segment failure", diff --git a/oshmem/mca/sshmem/ucx/sshmem_ucx_module.c b/oshmem/mca/sshmem/ucx/sshmem_ucx_module.c index 44f7374331..90ee1704dc 100644 --- a/oshmem/mca/sshmem/ucx/sshmem_ucx_module.c +++ b/oshmem/mca/sshmem/ucx/sshmem_ucx_module.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2017 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -14,7 +16,6 @@ #include "opal/util/output.h" #include "opal/util/path.h" #include "opal/util/show_help.h" -#include "orte/util/show_help.h" #include "oshmem/proc/proc.h" #include "oshmem/mca/sshmem/sshmem.h" diff --git a/oshmem/op/op.c b/oshmem/op/op.c index 60ff924623..577a1e3f6e 100644 --- a/oshmem/op/op.c +++ b/oshmem/op/op.c @@ -2,8 +2,8 @@ * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science - * and Technology (RIST). All rights reserved. + * Copyright (c) 2015-2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -14,8 +14,7 @@ #include "oshmem_config.h" #include -#include "orte/runtime/orte_globals.h" - +#include "opal/datatype/opal_datatype.h" #include "opal/datatype/opal_datatype_internal.h" #include "opal/class/opal_pointer_array.h" @@ -330,7 +329,7 @@ int oshmem_op_init(void) if (OPAL_SUCCESS != opal_pointer_array_init(&oshmem_op_array, 0, - ORTE_GLOBAL_ARRAY_MAX_SIZE, + INT_MAX, 1)) { return OSHMEM_ERROR; } diff --git a/oshmem/op/op.h b/oshmem/op/op.h index 9128d31121..690f0f4054 100644 --- a/oshmem/op/op.h +++ b/oshmem/op/op.h @@ -1,6 +1,8 @@ /* * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -19,8 +21,6 @@ #include "opal/class/opal_list.h" #include "opal/dss/dss_types.h" -#include "orte/types.h" - BEGIN_C_DECLS /* ******************************************************************** */ diff --git a/oshmem/proc/proc.c b/oshmem/proc/proc.c index 8aa67726f9..23cbbc685c 100644 --- a/oshmem/proc/proc.c +++ b/oshmem/proc/proc.c @@ -1,8 +1,8 @@ /* * Copyright (c) 2013-2018 Mellanox Technologies, Inc. * All rights reserved. - * Copyright (c) 2014-2016 Research Organization for Information Science - * and Technology (RIST). All rights reserved. + * Copyright (c) 2014-2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2016 ARM, Inc. All rights reserved. * $COPYRIGHT$ @@ -23,13 +23,6 @@ #include #endif -#include "orte/mca/errmgr/errmgr.h" -#include "orte/mca/ess/ess.h" -#include "orte/util/proc_info.h" -#include "orte/util/name_fns.h" -#include "orte/util/show_help.h" -#include "orte/runtime/orte_globals.h" - #include "opal/datatype/opal_convertor.h" #include "opal/threads/mutex.h" #include "opal/dss/dss.h" @@ -82,7 +75,7 @@ int oshmem_proc_group_init(void) OBJ_CONSTRUCT(&oshmem_group_array, opal_pointer_array_t); rc = opal_pointer_array_init(&oshmem_group_array, 0, - ORTE_GLOBAL_ARRAY_MAX_SIZE, 1); + INT_MAX, 1); if (OPAL_SUCCESS != rc) { goto err1; } @@ -215,10 +208,10 @@ oshmem_group_t* oshmem_proc_group_create(int pe_start, int pe_stride, int pe_siz /* Prepare peers list */ OBJ_CONSTRUCT(&(group->peer_list), opal_list_t); { - orte_namelist_t *peer = NULL; + ompi_namelist_t *peer = NULL; for (i = 0; i < group->proc_count; i++) { - peer = OBJ_NEW(orte_namelist_t); + peer = OBJ_NEW(ompi_namelist_t); peer->name.jobid = OSHMEM_PROC_JOBID(group->proc_array[i]); peer->name.vpid = OSHMEM_PROC_VPID(group->proc_array[i]); opal_list_append(&(group->peer_list), &peer->super); diff --git a/oshmem/proc/proc.h b/oshmem/proc/proc.h index 4d4f9b005f..ce13771739 100644 --- a/oshmem/proc/proc.h +++ b/oshmem/proc/proc.h @@ -1,7 +1,7 @@ /* * Copyright (c) 2013-2018 Mellanox Technologies, Inc. * All rights reserved. - * Copyright (c) 2016 Research Organization for Information Science + * Copyright (c) 2016-2019 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2017 Cisco Systems, Inc. All rights reserved * $COPYRIGHT$ @@ -22,9 +22,6 @@ #include "opal/dss/dss_types.h" #include "opal/mca/hwloc/hwloc-internal.h" -#include "orte/types.h" -#include "orte/runtime/orte_globals.h" - #include "ompi/proc/proc.h" #include "ompi/communicator/communicator.h" @@ -138,27 +135,27 @@ static inline ompi_proc_t *oshmem_proc_local(void) * * @return Pointer to the process instance for \c name */ -static inline ompi_proc_t *oshmem_proc_for_find(const orte_process_name_t name) +static inline ompi_proc_t *oshmem_proc_for_find(const ompi_process_name_t name) { return (ompi_proc_t *)ompi_proc_for_name(name); } static inline ompi_proc_t *oshmem_proc_find(int pe) { - orte_process_name_t name; + ompi_process_name_t name; - name.jobid = ORTE_PROC_MY_NAME->jobid; + name.jobid = OMPI_PROC_MY_NAME->jobid; name.vpid = pe; return oshmem_proc_for_find(name); } static inline int oshmem_proc_pe(ompi_proc_t *proc) { - return (proc ? (int) ((orte_process_name_t*)&proc->super.proc_name)->vpid : -1); + return (proc ? (int) ((ompi_process_name_t*)&proc->super.proc_name)->vpid : -1); } -#define OSHMEM_PROC_JOBID(PROC) (((orte_process_name_t*)&((PROC)->super.proc_name))->jobid) -#define OSHMEM_PROC_VPID(PROC) (((orte_process_name_t*)&((PROC)->super.proc_name))->vpid) +#define OSHMEM_PROC_JOBID(PROC) (((ompi_process_name_t*)&((PROC)->super.proc_name))->jobid) +#define OSHMEM_PROC_VPID(PROC) (((ompi_process_name_t*)&((PROC)->super.proc_name))->vpid) /** * Initialize the OSHMEM process predefined groups @@ -259,9 +256,9 @@ static inline ompi_proc_t *oshmem_proc_group_find(oshmem_group_t* group, } } } else { - orte_process_name_t name; + ompi_process_name_t name; - name.jobid = ORTE_PROC_MY_NAME->jobid; + name.jobid = OMPI_PROC_MY_NAME->jobid; name.vpid = pe; proc = oshmem_proc_for_find(name); } diff --git a/oshmem/runtime/oshmem_shmem_abort.c b/oshmem/runtime/oshmem_shmem_abort.c index a299330b0a..2358881ebd 100644 --- a/oshmem/runtime/oshmem_shmem_abort.c +++ b/oshmem/runtime/oshmem_shmem_abort.c @@ -1,7 +1,9 @@ /* - * Copyright (c) 2013 Mellanox Technologies, Inc. - * All rights reserved. + * Copyright (c) 2013 Mellanox Technologies, Inc. + * All rights reserved. * Copyright (c) 2017 FUJITSU LIMITED. All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -27,13 +29,7 @@ #include "opal/mca/backtrace/backtrace.h" #include "opal/util/error.h" #include "opal/runtime/opal_params.h" - -#include "orte/util/proc_info.h" -#include "orte/runtime/runtime.h" -#include "orte/runtime/orte_globals.h" -#include "orte/util/name_fns.h" -#include "orte/util/show_help.h" -#include "orte/mca/errmgr/errmgr.h" +#include "opal/util/show_help.h" #include "oshmem/runtime/params.h" #include "oshmem/runtime/runtime.h" @@ -56,18 +52,20 @@ int oshmem_shmem_abort(int errcode) /* If ORTE is initialized, use its nodename. Otherwise, call gethostname. */ - if (orte_initialized) { - host = orte_process_info.nodename; + /* If MPI is initialized, we know we have a runtime nodename, so + use that. Otherwise, call gethostname. */ + if (ompi_rte_initialized) { + host = ompi_process_info.nodename; } else { gethostname(hostname, sizeof(hostname)); host = hostname; } pid = getpid(); - orte_show_help("help-shmem-api.txt", + opal_show_help("help-shmem-api.txt", "shmem-abort", true, - ORTE_PROC_MY_NAME->vpid, + OMPI_PROC_MY_NAME->vpid, pid, host, errcode); @@ -100,10 +98,10 @@ int oshmem_shmem_abort(int errcode) /* Wait for a while before aborting */ opal_delay_abort(); - if (!orte_initialized || !oshmem_shmem_initialized) { - if (orte_show_help_is_available()) { + if (!oshmem_shmem_initialized) { + if (!opal_initialized) { /* TODO help message from SHMEM not from MPI is needed*/ - orte_show_help("help-shmem-runtime.txt", + opal_show_help("help-shmem-runtime.txt", "oshmem shmem abort:cannot guarantee all killed", true, host, @@ -125,7 +123,7 @@ int oshmem_shmem_abort(int errcode) oshmem_shmem_aborted = true; /* now that we've aborted everyone else, gracefully die. */ - orte_errmgr.abort(errcode, NULL ); + ompi_rte_abort(errcode, NULL ); return OSHMEM_SUCCESS; } diff --git a/oshmem/runtime/oshmem_shmem_finalize.c b/oshmem/runtime/oshmem_shmem_finalize.c index d97842e4a9..7e979b8a62 100644 --- a/oshmem/runtime/oshmem_shmem_finalize.c +++ b/oshmem/runtime/oshmem_shmem_finalize.c @@ -1,8 +1,8 @@ /* * Copyright (c) 2013-2018 Mellanox Technologies, Inc. * All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science - * and Technology (RIST). All rights reserved. + * Copyright (c) 2015-2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * Copyright (c) 2018 Cisco Systems, Inc. All rights reserved * $COPYRIGHT$ * @@ -32,12 +32,6 @@ #include "opal/sys/atomic.h" #include "opal/runtime/opal.h" -#include "orte/util/show_help.h" -#include "orte/mca/errmgr/errmgr.h" -#include "orte/mca/grpcomm/grpcomm.h" -#include "orte/runtime/runtime.h" -#include "orte/runtime/orte_globals.h" - #include "opal/mca/rcache/base/base.h" #include "opal/mca/mpool/base/base.h" #include "opal/mca/allocator/base/base.h" diff --git a/oshmem/runtime/oshmem_shmem_init.c b/oshmem/runtime/oshmem_shmem_init.c index f111581004..696c7518b5 100644 --- a/oshmem/runtime/oshmem_shmem_init.c +++ b/oshmem/runtime/oshmem_shmem_init.c @@ -1,8 +1,8 @@ /* * Copyright (c) 2013-2018 Mellanox Technologies, Inc. * All rights reserved. - * Copyright (c) 2015-2016 Research Organization for Information Science - * and Technology (RIST). All rights reserved. + * Copyright (c) 2015-2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * Copyright (c) 2015-2018 Cisco Systems, Inc. All rights reserved * $COPYRIGHT$ * @@ -35,16 +35,6 @@ #include "opal/util/show_help.h" #include "opal/runtime/opal.h" -#include "orte/util/proc_info.h" -#include "orte/runtime/runtime.h" -#include "orte/mca/grpcomm/grpcomm.h" -#include "orte/runtime/orte_globals.h" -#include "orte/util/show_help.h" -#include "orte/mca/ess/ess.h" -#include "orte/runtime/orte_globals.h" -#include "orte/mca/errmgr/errmgr.h" -#include "orte/util/name_fns.h" - #include "ompi/datatype/ompi_datatype.h" #include "opal/mca/rcache/base/base.h" #include "opal/mca/mpool/base/base.h" @@ -376,7 +366,7 @@ static int _shmem_init(int argc, char **argv, int requested, int *provided) error: if (ret != OSHMEM_SUCCESS) { const char *err_msg = opal_strerror(ret); - orte_show_help("help-shmem-runtime.txt", + opal_show_help("help-shmem-runtime.txt", "shmem_init:startup:internal-failure", true, "SHMEM_INIT", diff --git a/oshmem/runtime/runtime.h b/oshmem/runtime/runtime.h index 28f22f3eab..7f83fdc3e0 100644 --- a/oshmem/runtime/runtime.h +++ b/oshmem/runtime/runtime.h @@ -1,6 +1,8 @@ /* * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -23,7 +25,6 @@ #include "opal/class/opal_list.h" #include "opal/class/opal_hash_table.h" -#include "orte/runtime/orte_globals.h" #include "ompi/include/mpi.h" #include @@ -153,8 +154,8 @@ OSHMEM_DECLSPEC int oshmem_shmem_register_params(void); #define RUNTIME_CHECK_ERROR(...) \ do { \ fprintf(stderr, "[%s]%s[%s:%d:%s] ", \ - orte_process_info.nodename, \ - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), \ + ompi_process_info.nodename, \ + OMPI_NAME_PRINT(OMPI_PROC_MY_NAME), \ __FILE__, __LINE__, __func__); \ fprintf(stderr, __VA_ARGS__); \ } while(0); @@ -184,7 +185,7 @@ OSHMEM_DECLSPEC int oshmem_shmem_register_params(void); */ #define RUNTIME_CHECK_PE(x) \ if (OPAL_UNLIKELY(((x) < 0) || \ - ((int)(x) > (int)(orte_process_info.num_procs - 1)))) \ + ((int)(x) > (int)(ompi_process_info.num_procs - 1)))) \ { \ RUNTIME_CHECK_ERROR("Target PE #%d is not in valid range\n", (x)); \ oshmem_shmem_abort(-1); \ diff --git a/oshmem/shmem/c/shmem_alltoall.c b/oshmem/shmem/c/shmem_alltoall.c index 0bc115f713..8dc8b01312 100644 --- a/oshmem/shmem/c/shmem_alltoall.c +++ b/oshmem/shmem/c/shmem_alltoall.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2016-2018 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -12,8 +14,6 @@ #include "oshmem/constants.h" #include "oshmem/include/shmem.h" -#include "orte/mca/grpcomm/grpcomm.h" - #include "oshmem/runtime/runtime.h" #include "oshmem/mca/scoll/scoll.h" diff --git a/oshmem/shmem/c/shmem_broadcast.c b/oshmem/shmem/c/shmem_broadcast.c index ec11f50d58..fea737825d 100644 --- a/oshmem/shmem/c/shmem_broadcast.c +++ b/oshmem/shmem/c/shmem_broadcast.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2013-2018 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -12,8 +14,6 @@ #include "oshmem/constants.h" #include "oshmem/include/shmem.h" -#include "orte/mca/grpcomm/grpcomm.h" - #include "oshmem/runtime/runtime.h" #include "oshmem/mca/scoll/scoll.h" diff --git a/oshmem/shmem/c/shmem_clear_lock.c b/oshmem/shmem/c/shmem_clear_lock.c index 328b4c7a61..2b731d7347 100644 --- a/oshmem/shmem/c/shmem_clear_lock.c +++ b/oshmem/shmem/c/shmem_clear_lock.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2013-2016 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -13,8 +15,6 @@ #include "oshmem/constants.h" #include "oshmem/include/shmem.h" -#include "orte/util/show_help.h" - #include "oshmem/shmem/shmem_api_logger.h" #include "oshmem/runtime/runtime.h" #include "oshmem/shmem/shmem_lock.h" diff --git a/oshmem/shmem/c/shmem_collect.c b/oshmem/shmem/c/shmem_collect.c index 423093d6c1..8d14a80ffa 100644 --- a/oshmem/shmem/c/shmem_collect.c +++ b/oshmem/shmem/c/shmem_collect.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2013-2018 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -12,8 +14,6 @@ #include "oshmem/constants.h" #include "oshmem/include/shmem.h" -#include "orte/mca/grpcomm/grpcomm.h" - #include "oshmem/runtime/runtime.h" #include "oshmem/mca/scoll/scoll.h" diff --git a/oshmem/shmem/c/shmem_context.c b/oshmem/shmem/c/shmem_context.c index 44367bb6b0..9e036d0b24 100644 --- a/oshmem/shmem/c/shmem_context.c +++ b/oshmem/shmem/c/shmem_context.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2013-2018 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -12,8 +14,6 @@ #include -#include "orte/util/show_help.h" - #include "opal/runtime/opal_cr.h" #include "opal/util/output.h" diff --git a/oshmem/shmem/c/shmem_global_exit.c b/oshmem/shmem/c/shmem_global_exit.c index aa43d0f9d8..c71ee62b63 100644 --- a/oshmem/shmem/c/shmem_global_exit.c +++ b/oshmem/shmem/c/shmem_global_exit.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2012-2015 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -12,8 +14,6 @@ #include "oshmem/include/shmem.h" #include "oshmem/runtime/runtime.h" -#include "orte/mca/errmgr/errmgr.h" - #if OSHMEM_PROFILING #include "oshmem/include/pshmem.h" #pragma weak shmem_global_exit = pshmem_global_exit @@ -38,7 +38,7 @@ static inline void _globalexit(int status) { oshmem_shmem_inglobalexit++; - orte_errmgr.abort(status, NULL); + ompi_rte_abort(status, NULL); oshmem_shmem_aborted = true; exit(status); diff --git a/oshmem/shmem/c/shmem_init.c b/oshmem/shmem/c/shmem_init.c index 934d2b6023..74a89fae0c 100644 --- a/oshmem/shmem/c/shmem_init.c +++ b/oshmem/shmem/c/shmem_init.c @@ -1,8 +1,8 @@ /* * Copyright (c) 2013-2015 Mellanox Technologies, Inc. * All rights reserved. - * Copyright (c) 2016 Research Organization for Information Science - * and Technology (RIST). All rights reserved. + * Copyright (c) 2016-2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -14,8 +14,6 @@ #include -#include "orte/util/show_help.h" - #include "opal/runtime/opal_cr.h" #include "opal/util/output.h" diff --git a/oshmem/shmem/c/shmem_pe_accessible.c b/oshmem/shmem/c/shmem_pe_accessible.c index cf06f6d63a..3e6923a0bc 100644 --- a/oshmem/shmem/c/shmem_pe_accessible.c +++ b/oshmem/shmem/c/shmem_pe_accessible.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -12,8 +14,6 @@ #include -#include "orte/util/show_help.h" - #include "oshmem/constants.h" #include "oshmem/include/shmem.h" diff --git a/oshmem/shmem/c/shmem_ptr.c b/oshmem/shmem/c/shmem_ptr.c index 35a324c221..c7c4d49507 100644 --- a/oshmem/shmem/c/shmem_ptr.c +++ b/oshmem/shmem/c/shmem_ptr.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -12,8 +14,6 @@ #include -#include "orte/util/show_help.h" - #include "oshmem/constants.h" #include "oshmem/include/shmem.h" #include "oshmem/shmem/shmem_api_logger.h" diff --git a/oshmem/shmem/c/shmem_set_lock.c b/oshmem/shmem/c/shmem_set_lock.c index 3d259a92ee..a4864ffe44 100644 --- a/oshmem/shmem/c/shmem_set_lock.c +++ b/oshmem/shmem/c/shmem_set_lock.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2013-2016 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -13,8 +15,6 @@ #include "oshmem/constants.h" #include "oshmem/include/shmem.h" -#include "orte/util/show_help.h" - #include "oshmem/shmem/shmem_api_logger.h" #include "oshmem/runtime/runtime.h" #include "oshmem/shmem/shmem_lock.h" diff --git a/oshmem/shmem/c/shmem_test_lock.c b/oshmem/shmem/c/shmem_test_lock.c index 6c48dd0ab2..0d587da396 100644 --- a/oshmem/shmem/c/shmem_test_lock.c +++ b/oshmem/shmem/c/shmem_test_lock.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2013-2016 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -12,8 +14,6 @@ #include -#include "orte/util/show_help.h" - #include "oshmem/constants.h" #include "oshmem/include/shmem.h" #include "oshmem/shmem/shmem_api_logger.h"