Per the PR and discussion on today's telecon, extend the process name definition as a two-field struct of uint32_t's down to the OPAL layer. This resolves issues created by prior commits that impacted both heterogeneous and SPARC support. This also simplifies the OMPI code base by removing the need for frequent memcpy's when transitioning between the OMPI/ORTE layers and OPAL.
We recognize that this means other users of OPAL will need to "wrap" the opal_process_name_t if they desire to abstract it in some fashion. This is regrettable, and we are looking at possible alternatives that might mitigate that requirement. Meantime, however, we have to put the needs of the OMPI community first, and are taking this step to restore hetero and SPARC support.
Этот коммит содержится в:
родитель
40942c62ce
Коммит
780c93ee57
@ -78,8 +78,8 @@ void mca_btl_tcp2_proc_destruct(mca_btl_tcp2_proc_t* tcp_proc)
|
||||
{
|
||||
/* remove from list of all proc instances */
|
||||
OPAL_THREAD_LOCK(&mca_btl_tcp2_component.tcp_lock);
|
||||
opal_hash_table_remove_value_uint64(&mca_btl_tcp2_component.tcp_procs,
|
||||
orte_util_hash_name(&tcp_proc->proc_ompi->proc_name));
|
||||
opal_proc_table_remove_value(&mca_btl_tcp2_component.tcp_procs,
|
||||
tcp_proc->proc_ompi->proc_name);
|
||||
OPAL_THREAD_UNLOCK(&mca_btl_tcp2_component.tcp_lock);
|
||||
|
||||
/* release resources */
|
||||
@ -102,11 +102,10 @@ mca_btl_tcp2_proc_t* mca_btl_tcp2_proc_create(ompi_proc_t* ompi_proc)
|
||||
int rc;
|
||||
size_t size;
|
||||
mca_btl_tcp2_proc_t* btl_proc;
|
||||
uint64_t hash = orte_util_hash_name(&ompi_proc->proc_name);
|
||||
|
||||
OPAL_THREAD_LOCK(&mca_btl_tcp2_component.tcp_lock);
|
||||
rc = opal_hash_table_get_value_uint64(&mca_btl_tcp2_component.tcp_procs,
|
||||
hash, (void**)&btl_proc);
|
||||
rc = opal_proc_table_get_value(&mca_btl_tcp2_component.tcp_procs,
|
||||
ompi_proc->proc_name, (void**)&btl_proc);
|
||||
if(OMPI_SUCCESS == rc) {
|
||||
OPAL_THREAD_UNLOCK(&mca_btl_tcp2_component.tcp_lock);
|
||||
return btl_proc;
|
||||
@ -118,8 +117,8 @@ mca_btl_tcp2_proc_t* mca_btl_tcp2_proc_create(ompi_proc_t* ompi_proc)
|
||||
btl_proc->proc_ompi = ompi_proc;
|
||||
|
||||
/* add to hash table of all proc instance */
|
||||
opal_hash_table_set_value_uint64(&mca_btl_tcp2_component.tcp_procs,
|
||||
hash, btl_proc);
|
||||
opal_proc_table_set_value(&mca_btl_tcp2_component.tcp_procs,
|
||||
ompi_proc->proc_name, btl_proc);
|
||||
OPAL_THREAD_UNLOCK(&mca_btl_tcp2_component.tcp_lock);
|
||||
|
||||
/* lookup tcp parameters exported by this proc */
|
||||
@ -713,8 +712,8 @@ mca_btl_tcp2_proc_t* mca_btl_tcp2_proc_lookup(const orte_process_name_t *name)
|
||||
{
|
||||
mca_btl_tcp2_proc_t* proc = NULL;
|
||||
OPAL_THREAD_LOCK(&mca_btl_tcp2_component.tcp_lock);
|
||||
opal_hash_table_get_value_uint64(&mca_btl_tcp2_component.tcp_procs,
|
||||
orte_util_hash_name(name), (void**)&proc);
|
||||
opal_proc_table_get_value(&mca_btl_tcp2_component.tcp_procs,
|
||||
name->proc_name, (void**)&proc);
|
||||
OPAL_THREAD_UNLOCK(&mca_btl_tcp2_component.tcp_lock);
|
||||
return proc;
|
||||
}
|
||||
|
@ -1645,7 +1645,7 @@ ompi_proc_t **ompi_comm_get_rprocs ( ompi_communicator_t *local_comm,
|
||||
*/
|
||||
OBJ_CONSTRUCT(&myvals, opal_list_t);
|
||||
if (OMPI_SUCCESS != opal_dstore.fetch(opal_dstore_internal,
|
||||
(opal_identifier_t*)&rprocs[i]->super.proc_name,
|
||||
&rprocs[i]->super.proc_name,
|
||||
OPAL_DSTORE_LOCALITY, &myvals)) {
|
||||
rprocs[i]->super.proc_flags = OPAL_PROC_NON_LOCAL;
|
||||
} else {
|
||||
|
@ -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) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
@ -1158,7 +1160,7 @@ int mca_coll_fca_get_fca_lib(struct ompi_communicator_t *comm)
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
|
||||
spec->job_id = opal_process_name_jobid(opal_proc_local_get()->proc_name);
|
||||
spec->job_id = opal_proc_local_get()->proc_name.jobid;
|
||||
spec->rank_id = ompi_comm_rank(MPI_COMM_WORLD);
|
||||
spec->progress.func = mca_coll_fca_progress_cb;
|
||||
spec->progress.arg = NULL;
|
||||
|
@ -16,6 +16,8 @@
|
||||
* Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -389,7 +391,7 @@ static int connect_accept(ompi_communicator_t *comm, int root,
|
||||
if (new_proc_len > 0) {
|
||||
opal_list_t all_procs;
|
||||
orte_namelist_t *name;
|
||||
opal_identifier_t *ids;
|
||||
opal_process_name_t *ids;
|
||||
opal_list_t myvals;
|
||||
opal_value_t *kv;
|
||||
|
||||
@ -451,11 +453,11 @@ static int connect_accept(ompi_communicator_t *comm, int root,
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
|
||||
|
||||
/* setup the modex */
|
||||
ids = (opal_identifier_t*)malloc(opal_list_get_size(&all_procs) * sizeof(opal_identifier_t));
|
||||
ids = (opal_process_name_t*)malloc(opal_list_get_size(&all_procs) * sizeof(opal_process_name_t));
|
||||
/* copy across the list of participants */
|
||||
i=0;
|
||||
OPAL_LIST_FOREACH(nm, &all_procs, orte_namelist_t) {
|
||||
memcpy(&ids[i++], &nm->name, sizeof(opal_identifier_t));
|
||||
ids[i++] = nm->name;
|
||||
}
|
||||
OPAL_LIST_DESTRUCT(&all_procs);
|
||||
/* perform it */
|
||||
@ -471,7 +473,7 @@ static int connect_accept(ompi_communicator_t *comm, int root,
|
||||
for (j=0; j < new_proc_len; j++) {
|
||||
OBJ_CONSTRUCT(&myvals, opal_list_t);
|
||||
if (OMPI_SUCCESS != (rc = opal_dstore.fetch(opal_dstore_internal,
|
||||
(opal_identifier_t*)&new_proc_list[j]->super.proc_name,
|
||||
&new_proc_list[j]->super.proc_name,
|
||||
OPAL_DSTORE_LOCALITY, &myvals))) {
|
||||
new_proc_list[j]->super.proc_flags = OPAL_PROC_NON_LOCAL;
|
||||
} else {
|
||||
@ -622,7 +624,7 @@ static int construct_peers(ompi_group_t *group, opal_list_t *peers)
|
||||
/* need to maintain an ordered list to ensure the tracker signatures
|
||||
* match across all procs */
|
||||
OPAL_LIST_FOREACH(n2, peers, orte_namelist_t) {
|
||||
if (*(opal_identifier_t*)&nm->name < *(opal_identifier_t*)&n2->name) {
|
||||
if (opal_compare_proc(nm->name, n2->name) < 0) {
|
||||
opal_list_insert_pos(peers, &n2->super, &nm->super);
|
||||
nm = NULL;
|
||||
break;
|
||||
@ -650,7 +652,7 @@ static int construct_peers(ompi_group_t *group, opal_list_t *peers)
|
||||
/* need to maintain an ordered list to ensure the tracker signatures
|
||||
* match across all procs */
|
||||
OPAL_LIST_FOREACH(n2, peers, orte_namelist_t) {
|
||||
if (*(opal_identifier_t*)&nm->name < *(opal_identifier_t*)&n2->name) {
|
||||
if (opal_compare_proc(nm->name, n2->name) < 0) {
|
||||
opal_list_insert_pos(peers, &n2->super, &nm->super);
|
||||
nm = NULL;
|
||||
break;
|
||||
@ -671,7 +673,7 @@ static int disconnect(ompi_communicator_t *comm)
|
||||
ompi_group_t *group;
|
||||
opal_list_t coll;
|
||||
orte_namelist_t *nm;
|
||||
opal_identifier_t *ids;
|
||||
opal_process_name_t *ids;
|
||||
|
||||
/* Note that we explicitly use an RTE-based barrier (vs. an MPI
|
||||
barrier). See a lengthy comment in
|
||||
@ -701,10 +703,10 @@ static int disconnect(ompi_communicator_t *comm)
|
||||
}
|
||||
|
||||
/* setup the ids */
|
||||
ids = (opal_identifier_t*)malloc(opal_list_get_size(&coll) * sizeof(opal_identifier_t));
|
||||
ids = (opal_process_name_t*)malloc(opal_list_get_size(&coll) * sizeof(opal_process_name_t));
|
||||
i=0;
|
||||
OPAL_LIST_FOREACH(nm, &coll, orte_namelist_t) {
|
||||
memcpy(&ids[i++], &nm->name, sizeof(opal_identifier_t));
|
||||
ids[i++] = nm->name;
|
||||
}
|
||||
OPAL_LIST_DESTRUCT(&coll);
|
||||
|
||||
@ -1667,7 +1669,7 @@ static int dpm_pconnect(char *port,
|
||||
}
|
||||
|
||||
static void paccept_recv(int status,
|
||||
struct orte_process_name_t* peer,
|
||||
orte_process_name_t* peer,
|
||||
struct opal_buffer_t* buffer,
|
||||
orte_rml_tag_t tag,
|
||||
void* cbdata)
|
||||
|
@ -1,6 +1,8 @@
|
||||
/*
|
||||
* Copyright (C) 2001-2011 Mellanox Technologies Ltd. ALL RIGHTS RESERVED.
|
||||
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -317,7 +319,7 @@ int ompi_mtl_mxm_module_init(void)
|
||||
|
||||
for (proc = 0; proc < totps; proc++) {
|
||||
if (OPAL_PROC_ON_LOCAL_NODE(procs[proc]->super.proc_flags)) {
|
||||
mxlr = max(mxlr, opal_process_name_vpid(procs[proc]->super.proc_name));
|
||||
mxlr = max(mxlr, procs[proc]->super.proc_name.vpid);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,6 @@ typedef orte_ns_cmp_bitmask_t ompi_rte_cmp_bitmask_t;
|
||||
#define OMPI_RTE_CMP_JOBID ORTE_NS_CMP_JOBID
|
||||
#define OMPI_RTE_CMP_VPID ORTE_NS_CMP_VPID
|
||||
#define OMPI_RTE_CMP_ALL ORTE_NS_CMP_ALL
|
||||
#define ompi_rte_hash_name(a) orte_util_hash_name(a)
|
||||
/* This is the DSS tag to serialize a proc name */
|
||||
#define OMPI_NAME ORTE_NAME
|
||||
#define OMPI_PROCESS_NAME_HTON ORTE_PROCESS_NAME_HTON
|
||||
|
@ -115,8 +115,8 @@ int ompi_proc_init(void)
|
||||
opal_proc_local_set(&proc->super);
|
||||
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
||||
/* add our arch to the modex */
|
||||
OPAL_MODEX_SEND_STRING(ret, PMIX_SYNC_REQD, PMIX_REMOTE, OPAL_DSTORE_ARCH,
|
||||
&proc->super.proc_arch, OPAL_UINT32);
|
||||
OPAL_MODEX_SEND_VALUE(ret, PMIX_SYNC_REQD, PMIX_GLOBAL,
|
||||
OPAL_DSTORE_ARCH, &opal_local_arch, OPAL_UINT32);
|
||||
if (OPAL_SUCCESS != ret) {
|
||||
return ret;
|
||||
}
|
||||
@ -156,7 +156,7 @@ int ompi_proc_complete_init(void)
|
||||
*/
|
||||
OBJ_CONSTRUCT(&myvals, opal_list_t);
|
||||
if (OMPI_SUCCESS != (ret = opal_dstore.fetch(opal_dstore_internal,
|
||||
(opal_identifier_t*)&proc->super.proc_name,
|
||||
&proc->super.proc_name,
|
||||
OPAL_DSTORE_LOCALITY, &myvals))) {
|
||||
proc->super.proc_flags = OPAL_PROC_NON_LOCAL;
|
||||
} else {
|
||||
@ -424,7 +424,7 @@ int ompi_proc_refresh(void)
|
||||
*/
|
||||
OBJ_CONSTRUCT(&myvals, opal_list_t);
|
||||
if (OMPI_SUCCESS != (ret = opal_dstore.fetch(opal_dstore_internal,
|
||||
(opal_identifier_t*)&proc->super.proc_name,
|
||||
&proc->super.proc_name,
|
||||
OPAL_DSTORE_LOCALITY, &myvals))) {
|
||||
proc->super.proc_flags = OPAL_PROC_NON_LOCAL;
|
||||
} else {
|
||||
@ -522,7 +522,7 @@ ompi_proc_pack(ompi_proc_t **proclist, int proclistsize,
|
||||
*/
|
||||
OBJ_CONSTRUCT(&data, opal_list_t);
|
||||
rc = opal_dstore.fetch(opal_dstore_internal,
|
||||
(opal_identifier_t*)&proclist[i]->super.proc_name,
|
||||
&proclist[i]->super.proc_name,
|
||||
NULL, &data);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OMPI_ERROR_LOG(rc);
|
||||
@ -701,7 +701,7 @@ ompi_proc_unpack(opal_buffer_t* buf,
|
||||
OMPI_PROC_MY_NAME, &new_name)) {
|
||||
/* store it in the database */
|
||||
if (OPAL_SUCCESS != (rc = opal_dstore.store(opal_dstore_internal,
|
||||
(opal_identifier_t*)&new_name, kv))) {
|
||||
&new_name, kv))) {
|
||||
OMPI_ERROR_LOG(rc);
|
||||
}
|
||||
}
|
||||
@ -711,7 +711,7 @@ ompi_proc_unpack(opal_buffer_t* buf,
|
||||
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
||||
OBJ_CONSTRUCT(&myvals, opal_list_t);
|
||||
rc = opal_dstore.fetch(opal_dstore_internal,
|
||||
(opal_identifier_t*)&new_name,
|
||||
&new_name,
|
||||
OPAL_DSTORE_ARCH, &myvals);
|
||||
if( OPAL_SUCCESS == rc ) {
|
||||
kv = (opal_value_t*)opal_list_get_first(&myvals);
|
||||
@ -727,7 +727,7 @@ ompi_proc_unpack(opal_buffer_t* buf,
|
||||
/* retrieve the hostname */
|
||||
OBJ_CONSTRUCT(&myvals, opal_list_t);
|
||||
rc = opal_dstore.fetch(opal_dstore_internal,
|
||||
(opal_identifier_t*)&new_name,
|
||||
&new_name,
|
||||
OPAL_DSTORE_HOSTNAME, &myvals);
|
||||
if( OPAL_SUCCESS == rc ) {
|
||||
kv = (opal_value_t*)opal_list_get_first(&myvals);
|
||||
|
@ -17,6 +17,8 @@
|
||||
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
|
||||
* Copyright (c) 2012-2013 Inria. All rights reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
*
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -310,20 +312,6 @@ _process_name_print_for_opal(const opal_process_name_t procname)
|
||||
return OMPI_NAME_PRINT(rte_name);
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
_process_name_jobid_for_opal(const opal_process_name_t procname)
|
||||
{
|
||||
ompi_process_name_t* rte_name = (ompi_process_name_t*)&procname;
|
||||
return rte_name->jobid;
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
_process_name_vpid_for_opal(const opal_process_name_t procname)
|
||||
{
|
||||
ompi_process_name_t* rte_name = (ompi_process_name_t*)&procname;
|
||||
return rte_name->vpid;
|
||||
}
|
||||
|
||||
static int
|
||||
_process_name_compare(const opal_process_name_t p1, const opal_process_name_t p2)
|
||||
{
|
||||
@ -409,8 +397,6 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
||||
|
||||
/* Convince OPAL to use our naming scheme */
|
||||
opal_process_name_print = _process_name_print_for_opal;
|
||||
opal_process_name_vpid = _process_name_vpid_for_opal;
|
||||
opal_process_name_jobid = _process_name_jobid_for_opal;
|
||||
opal_compare_proc = _process_name_compare;
|
||||
|
||||
/* Register MCA variables */
|
||||
|
@ -13,6 +13,8 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014-2015 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -817,3 +819,145 @@ opal_hash_table_get_next_key_uint64(opal_hash_table_t * ht,
|
||||
}
|
||||
|
||||
/* there was/is no traversal for the ptr case; it would go here */
|
||||
/* interact with the class-like mechanism */
|
||||
|
||||
static void opal_proc_table_construct(opal_proc_table_t* pt);
|
||||
static void opal_proc_table_destruct(opal_proc_table_t* pt);
|
||||
|
||||
OBJ_CLASS_INSTANCE(
|
||||
opal_proc_table_t,
|
||||
opal_hash_table_t,
|
||||
opal_proc_table_construct,
|
||||
opal_proc_table_destruct
|
||||
);
|
||||
|
||||
static void
|
||||
opal_proc_table_construct(opal_proc_table_t* pt)
|
||||
{
|
||||
pt->pt_size = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
opal_proc_table_destruct(opal_proc_table_t* pt)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* Init, etc
|
||||
*/
|
||||
|
||||
int opal_proc_table_init(opal_proc_table_t* pt, size_t jobids, size_t vpids) {
|
||||
int rc;
|
||||
if (OPAL_SUCCESS != (rc=opal_hash_table_init(&pt->super, jobids))) {
|
||||
return rc;
|
||||
}
|
||||
pt->vpids_size = vpids;
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
int opal_proc_table_remove_all(opal_proc_table_t *pt) {
|
||||
int rc;
|
||||
opal_hash_table_t * vpids;
|
||||
uint32_t jobid;
|
||||
void * node;
|
||||
|
||||
rc = opal_hash_table_get_first_key_uint32(&pt->super, &jobid, (void **)&vpids, &node);
|
||||
|
||||
if (OPAL_SUCCESS == rc) {
|
||||
do {
|
||||
if (NULL != vpids) {
|
||||
opal_hash_table_remove_all(vpids);
|
||||
}
|
||||
rc = opal_hash_table_get_next_key_uint32 (&pt->super, &jobid,
|
||||
(void **) &vpids, node, &node);
|
||||
} while (OPAL_SUCCESS == rc);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
int opal_proc_table_get_value(opal_proc_table_t* pt, opal_process_name_t key,
|
||||
void** ptr) {
|
||||
int rc;
|
||||
opal_hash_table_t * vpids;
|
||||
rc = opal_hash_table_get_value_uint32(&pt->super, key.jobid, (void **)&vpids);
|
||||
if (rc != OPAL_SUCCESS) {
|
||||
return rc;
|
||||
}
|
||||
rc = opal_hash_table_get_value_uint32(vpids, key.vpid, ptr);
|
||||
return rc;
|
||||
}
|
||||
|
||||
int opal_proc_table_set_value(opal_proc_table_t* pt, opal_process_name_t key, void* value) {
|
||||
int rc;
|
||||
opal_hash_table_t * vpids;
|
||||
rc = opal_hash_table_get_value_uint32(&pt->super, key.jobid, (void **)&vpids);
|
||||
if (rc != OPAL_SUCCESS) {
|
||||
vpids = OBJ_NEW(opal_hash_table_t);
|
||||
if (NULL == vpids) {
|
||||
return OPAL_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
if (OPAL_SUCCESS != (rc=opal_hash_table_init(vpids, pt->vpids_size))) {
|
||||
OBJ_RELEASE(vpids);
|
||||
return rc;
|
||||
}
|
||||
if (OPAL_SUCCESS != (rc=opal_hash_table_set_value_uint32(&pt->super, key.jobid, vpids))) {
|
||||
OBJ_RELEASE(vpids);
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
rc = opal_hash_table_set_value_uint32(vpids, key.vpid, value);
|
||||
return rc;
|
||||
}
|
||||
|
||||
int opal_proc_table_remove_value(opal_proc_table_t* pt, opal_process_name_t key) {
|
||||
int rc;
|
||||
opal_hash_table_t * vpids;
|
||||
if (OPAL_SUCCESS != (rc=opal_hash_table_get_value_uint32(&pt->super, key.jobid, (void **)&vpids))) {
|
||||
return rc;
|
||||
}
|
||||
rc = opal_hash_table_remove_value_uint32(vpids, key.vpid);
|
||||
return rc;
|
||||
}
|
||||
|
||||
int opal_proc_table_get_first_key(opal_proc_table_t *pt, opal_process_name_t *key,
|
||||
void **value, void **node1, void **node2) {
|
||||
int rc;
|
||||
uint32_t jobid, vpid;
|
||||
opal_hash_table_t * vpids;
|
||||
if (OPAL_SUCCESS != (rc=opal_hash_table_get_first_key_uint32(&pt->super, &jobid, (void **)&vpids, node1))) {
|
||||
return rc;
|
||||
}
|
||||
rc = opal_hash_table_get_first_key_uint32(vpids, &vpid, value, node2);
|
||||
if (OPAL_SUCCESS == rc) {
|
||||
key->jobid = jobid;
|
||||
key->vpid = vpid;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
int opal_proc_table_get_next_key(opal_proc_table_t *pt, opal_process_name_t *key,
|
||||
void **value, void *in_node1, void **out_node1,
|
||||
void *in_node2, void **out_node2) {
|
||||
int rc;
|
||||
uint32_t jobid = ((opal_hash_element_t *)in_node1)->key.u32;
|
||||
uint32_t vpid;
|
||||
opal_hash_table_t * vpids = ((opal_hash_element_t *)in_node1)->value;
|
||||
|
||||
rc = opal_hash_table_get_next_key_uint32(vpids, &vpid, value, in_node2, out_node2);
|
||||
if (OPAL_SUCCESS == rc) {
|
||||
key->jobid = jobid;
|
||||
key->vpid = vpid;
|
||||
*out_node1 = in_node1;
|
||||
return rc;
|
||||
}
|
||||
if (OPAL_SUCCESS != (rc=opal_hash_table_get_next_key_uint32(&pt->super, &jobid, (void **)&vpids, in_node1, out_node1))) {
|
||||
return rc;
|
||||
}
|
||||
rc = opal_hash_table_get_first_key_uint32(vpids, &vpid, value, out_node2);
|
||||
if (OPAL_SUCCESS == rc) {
|
||||
key->jobid = jobid;
|
||||
key->vpid = vpid;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
@ -14,6 +14,8 @@
|
||||
* Copyright (c) 2014-2015 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -39,6 +41,7 @@
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "opal/util/proc.h"
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
@ -298,6 +301,133 @@ OPAL_DECLSPEC int opal_hash_table_get_next_key_uint64(opal_hash_table_t *table,
|
||||
void **value, void *in_node,
|
||||
void **out_node);
|
||||
|
||||
|
||||
|
||||
OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_proc_table_t);
|
||||
|
||||
struct opal_proc_table_t
|
||||
{
|
||||
opal_hash_table_t super; /**< subclass of opal_object_t */
|
||||
size_t pt_size; /**< number of extant entries */
|
||||
size_t vpids_size;
|
||||
// FIXME
|
||||
// Begin KLUDGE!! So ompi/debuggers/ompi_common_dll.c doesn't complain
|
||||
size_t pt_table_size; /**< size of table */
|
||||
// End KLUDGE
|
||||
};
|
||||
typedef struct opal_proc_table_t opal_proc_table_t;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Initializes the table size, must be called before using
|
||||
* the table.
|
||||
*
|
||||
* @param pt The input hash table (IN).
|
||||
* @param jobids The size of the jobids table, which will be rounded up
|
||||
* (if required) to the next highest power of two (IN).
|
||||
* @param vpids The size of the vpids table, which will be rounded up
|
||||
* (if required) to the next highest power of two (IN).
|
||||
* @return OPAL error code.
|
||||
*
|
||||
*/
|
||||
|
||||
OPAL_DECLSPEC int opal_proc_table_init(opal_proc_table_t* pt, size_t jobids, size_t vpids);
|
||||
|
||||
/**
|
||||
* Remove all elements from the table.
|
||||
*
|
||||
* @param pt The input hash table (IN).
|
||||
* @return OPAL return code.
|
||||
*
|
||||
*/
|
||||
|
||||
OPAL_DECLSPEC int opal_proc_table_remove_all(opal_proc_table_t *pt);
|
||||
|
||||
/**
|
||||
* Retrieve value via opal_process_name_t key.
|
||||
*
|
||||
* @param pt The input hash table (IN).
|
||||
* @param key The input key (IN).
|
||||
* @param ptr The value associated with the key
|
||||
* @return integer return code:
|
||||
* - OPAL_SUCCESS if key was found
|
||||
* - OPAL_ERR_NOT_FOUND if key was not found
|
||||
* - OPAL_ERROR other error
|
||||
*
|
||||
*/
|
||||
|
||||
OPAL_DECLSPEC int opal_proc_table_get_value(opal_proc_table_t* pt, opal_process_name_t key,
|
||||
void** ptr);
|
||||
|
||||
/**
|
||||
* Set value based on opal_process_name_t key.
|
||||
*
|
||||
* @param pt The input hash table (IN).
|
||||
* @param key The input key (IN).
|
||||
* @param value The value to be associated with the key (IN).
|
||||
* @return OPAL return code.
|
||||
*
|
||||
*/
|
||||
|
||||
OPAL_DECLSPEC int opal_proc_table_set_value(opal_proc_table_t* pt, opal_process_name_t key, void* value);
|
||||
|
||||
/**
|
||||
* Remove value based on opal_process_name_t key.
|
||||
*
|
||||
* @param pt The input hash table (IN).
|
||||
* @param key The input key (IN).
|
||||
* @return OPAL return code.
|
||||
*
|
||||
*/
|
||||
|
||||
OPAL_DECLSPEC int opal_proc_table_remove_value(opal_proc_table_t* pt, opal_process_name_t key);
|
||||
|
||||
|
||||
/**
|
||||
* Get the first opal_process_name_t key from the hash table, which can be used later to
|
||||
* get the next key
|
||||
* @param pt The hash table pointer (IN)
|
||||
* @param key The first key (OUT)
|
||||
* @param value The value corresponding to this key (OUT)
|
||||
* @param node1 The pointer to the first internal node which stores
|
||||
* the key-value pair (this is required for subsequent calls
|
||||
* to get_next_key) (OUT)
|
||||
* @param node2 The pointer to the second internal node which stores
|
||||
* the key-value pair (this is required for subsequent calls
|
||||
* to get_next_key) (OUT)
|
||||
* @return OPAL error code
|
||||
*
|
||||
*/
|
||||
|
||||
OPAL_DECLSPEC int opal_proc_table_get_first_key(opal_proc_table_t *pt, opal_process_name_t *key,
|
||||
void **value, void **node1, void **node2);
|
||||
|
||||
|
||||
/**
|
||||
* Get the next opal_process_name_t key from the hash table, knowing the current key
|
||||
* @param pt The hash table pointer (IN)
|
||||
* @param key The key (OUT)
|
||||
* @param value The value corresponding to this key (OUT)
|
||||
* @param in_node1 The first node pointer from previous call to either get_first
|
||||
or get_next (IN)
|
||||
* @param out_node1 The first pointer to the hash table internal node which stores
|
||||
* the key-value pair (this is required for subsequent calls
|
||||
* to get_next_key) (OUT)
|
||||
* @param in_node2 The second node pointer from previous call to either get_first
|
||||
or get_next (IN)
|
||||
* @param out_node2 The second pointer to the hash table internal node which stores
|
||||
* the key-value pair (this is required for subsequent calls
|
||||
* to get_next_key) (OUT)
|
||||
* @return OPAL error code
|
||||
*
|
||||
*/
|
||||
|
||||
OPAL_DECLSPEC int opal_proc_table_get_next_key(opal_proc_table_t *pt, opal_process_name_t *key,
|
||||
void **value, void *in_node1, void **out_node1,
|
||||
void *in_node2, void **out_node2);
|
||||
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif /* OPAL_HASH_TABLE_H */
|
||||
|
@ -11,6 +11,8 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -311,3 +313,82 @@ int opal_dss_compare_buffer_contents(opal_buffer_t *value1, opal_buffer_t *value
|
||||
{
|
||||
return OPAL_EQUAL; /* eventually compare bytes in buffers */
|
||||
}
|
||||
|
||||
/* OPAL_NAME */
|
||||
int opal_dss_compare_name(opal_process_name_t *value1,
|
||||
opal_process_name_t *value2,
|
||||
opal_data_type_t type)
|
||||
{
|
||||
if (NULL == value1 && NULL == value2) {
|
||||
return OPAL_EQUAL;
|
||||
} else if (NULL == value1) {
|
||||
return OPAL_VALUE2_GREATER;
|
||||
} else if (NULL == value2) {
|
||||
return OPAL_VALUE1_GREATER;
|
||||
}
|
||||
|
||||
/* If any of the fields are wildcard,
|
||||
* then we want to just ignore that one field. In the case
|
||||
* of OPAL_NAME_WILDCARD (where ALL of the fields are wildcard), this
|
||||
* will automatically result in OPAL_EQUAL for any name in the other
|
||||
* value - a totally useless result, but consistent in behavior.
|
||||
*/
|
||||
|
||||
/** check the jobids - if one of them is WILDCARD, then ignore
|
||||
* this field since anything is okay
|
||||
*/
|
||||
if (value1->jobid != OPAL_JOBID_WILDCARD &&
|
||||
value2->jobid != OPAL_JOBID_WILDCARD) {
|
||||
if (value1->jobid < value2->jobid) {
|
||||
return OPAL_VALUE2_GREATER;
|
||||
} else if (value1->jobid > value2->jobid) {
|
||||
return OPAL_VALUE1_GREATER;
|
||||
}
|
||||
}
|
||||
|
||||
/** check the vpids - if one of them is WILDCARD, then ignore
|
||||
* this field since anything is okay
|
||||
*/
|
||||
if (value1->vpid != OPAL_VPID_WILDCARD &&
|
||||
value2->vpid != OPAL_VPID_WILDCARD) {
|
||||
if (value1->vpid < value2->vpid) {
|
||||
return OPAL_VALUE2_GREATER;
|
||||
} else if (value1->vpid > value2->vpid) {
|
||||
return OPAL_VALUE1_GREATER;
|
||||
}
|
||||
}
|
||||
|
||||
/** only way to get here is if all fields are equal or WILDCARD */
|
||||
return OPAL_EQUAL;
|
||||
}
|
||||
|
||||
int opal_dss_compare_vpid(opal_vpid_t *value1,
|
||||
opal_vpid_t *value2,
|
||||
opal_data_type_t type)
|
||||
{
|
||||
/** if either value is WILDCARD, then return equal */
|
||||
if (*value1 == OPAL_VPID_WILDCARD ||
|
||||
*value2 == OPAL_VPID_WILDCARD) return OPAL_EQUAL;
|
||||
|
||||
if (*value1 > *value2) return OPAL_VALUE1_GREATER;
|
||||
|
||||
if (*value2 > *value1) return OPAL_VALUE2_GREATER;
|
||||
|
||||
return OPAL_EQUAL;
|
||||
}
|
||||
|
||||
int opal_dss_compare_jobid(opal_jobid_t *value1,
|
||||
opal_jobid_t *value2,
|
||||
opal_data_type_t type)
|
||||
{
|
||||
/** if either value is WILDCARD, then return equal */
|
||||
if (*value1 == OPAL_JOBID_WILDCARD ||
|
||||
*value2 == OPAL_JOBID_WILDCARD) return OPAL_EQUAL;
|
||||
|
||||
if (*value1 > *value2) return OPAL_VALUE1_GREATER;
|
||||
|
||||
if (*value2 > *value1) return OPAL_VALUE2_GREATER;
|
||||
|
||||
return OPAL_EQUAL;
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,8 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -21,6 +23,7 @@
|
||||
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/dss/dss_internal.h"
|
||||
#include "opal/util/error.h"
|
||||
|
||||
int opal_dss_copy(void **dest, void *src, opal_data_type_t type)
|
||||
{
|
||||
@ -106,6 +109,10 @@ int opal_dss_std_copy(void **dest, void *src, opal_data_type_t type)
|
||||
datasize = sizeof(time_t);
|
||||
break;
|
||||
|
||||
case OPAL_NAME:
|
||||
datasize = sizeof(opal_process_name_t);
|
||||
break;
|
||||
|
||||
default:
|
||||
return OPAL_ERR_UNKNOWN_DATA_TYPE;
|
||||
}
|
||||
@ -326,6 +333,9 @@ int opal_dss_copy_value(opal_value_t **dest, opal_value_t *src,
|
||||
p->data.bo.size = 0;
|
||||
}
|
||||
break;
|
||||
case OPAL_NAME:
|
||||
memcpy(&p->data.name, &src->data.name, sizeof(opal_process_name_t));
|
||||
break;
|
||||
default:
|
||||
opal_output(0, "COPY-OPAL-VALUE: UNSUPPORTED TYPE %d", (int)src->type);
|
||||
return OPAL_ERROR;
|
||||
@ -340,3 +350,58 @@ int opal_dss_copy_buffer_contents(opal_buffer_t **dest, opal_buffer_t *src,
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
/* PROCESS NAME */
|
||||
int opal_dss_copy_name(opal_process_name_t **dest, opal_process_name_t *src, opal_data_type_t type)
|
||||
{
|
||||
opal_process_name_t *val;
|
||||
|
||||
val = (opal_process_name_t*)malloc(sizeof(opal_process_name_t));
|
||||
if (NULL == val) {
|
||||
OPAL_ERROR_LOG(OPAL_ERR_OUT_OF_RESOURCE);
|
||||
return OPAL_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
val->jobid = src->jobid;
|
||||
val->vpid = src->vpid;
|
||||
|
||||
*dest = val;
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* JOBID
|
||||
*/
|
||||
int opal_dss_copy_jobid(opal_jobid_t **dest, opal_jobid_t *src, opal_data_type_t type)
|
||||
{
|
||||
opal_jobid_t *val;
|
||||
|
||||
val = (opal_jobid_t*)malloc(sizeof(opal_jobid_t));
|
||||
if (NULL == val) {
|
||||
OPAL_ERROR_LOG(OPAL_ERR_OUT_OF_RESOURCE);
|
||||
return OPAL_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
*val = *src;
|
||||
*dest = val;
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* VPID
|
||||
*/
|
||||
int opal_dss_copy_vpid(opal_vpid_t **dest, opal_vpid_t *src, opal_data_type_t type)
|
||||
{
|
||||
opal_vpid_t *val;
|
||||
|
||||
val = (opal_vpid_t*)malloc(sizeof(opal_vpid_t));
|
||||
if (NULL == val) {
|
||||
OPAL_ERROR_LOG(OPAL_ERR_OUT_OF_RESOURCE);
|
||||
return OPAL_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
*val = *src;
|
||||
*dest = val;
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
@ -12,6 +12,8 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -32,6 +34,7 @@
|
||||
#include "opal/class/opal_pointer_array.h"
|
||||
|
||||
#include "opal/dss/dss.h"
|
||||
#include "opal/util/proc.h"
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
# if !defined(STDC_HEADERS) && HAVE_MEMORY_H
|
||||
@ -321,6 +324,15 @@ int opal_dss_pack_timeval(opal_buffer_t *buffer, const void *src,
|
||||
int opal_dss_pack_time(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_pack_name(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_pack_jobid(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_pack_vpid(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
|
||||
/*
|
||||
* Internal unpack functions
|
||||
*/
|
||||
@ -381,6 +393,16 @@ int opal_dss_unpack_timeval(opal_buffer_t *buffer, void *dest,
|
||||
int opal_dss_unpack_time(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_unpack_name(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_unpack_jobid(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_unpack_vpid(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
|
||||
|
||||
/*
|
||||
* Internal copy functions
|
||||
*/
|
||||
@ -406,6 +428,13 @@ int opal_dss_copy_value(opal_value_t **dest, opal_value_t *src,
|
||||
int opal_dss_copy_buffer_contents(opal_buffer_t **dest, opal_buffer_t *src,
|
||||
opal_data_type_t type);
|
||||
|
||||
int opal_dss_copy_name(opal_process_name_t **dest, opal_process_name_t *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_copy_jobid(opal_jobid_t **dest, opal_jobid_t *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_copy_vpid(opal_vpid_t **dest, opal_vpid_t *src, opal_data_type_t type);
|
||||
|
||||
|
||||
/*
|
||||
* Internal compare functions
|
||||
*/
|
||||
@ -457,6 +486,18 @@ int opal_dss_compare_timeval(struct timeval *value1, struct timeval *value2, opa
|
||||
|
||||
int opal_dss_compare_time(time_t *value1, time_t *value2, opal_data_type_t type);
|
||||
|
||||
int opal_dss_compare_name(opal_process_name_t *value1,
|
||||
opal_process_name_t *value2,
|
||||
opal_data_type_t type);
|
||||
|
||||
int opal_dss_compare_vpid(opal_vpid_t *value1,
|
||||
opal_vpid_t *value2,
|
||||
opal_data_type_t type);
|
||||
|
||||
int opal_dss_compare_jobid(opal_jobid_t *value1,
|
||||
opal_jobid_t *value2,
|
||||
opal_data_type_t type);
|
||||
|
||||
/*
|
||||
* Internal print functions
|
||||
*/
|
||||
@ -493,6 +534,9 @@ int opal_dss_print_float(char **output, char *prefix, float *src, opal_data_type
|
||||
int opal_dss_print_double(char **output, char *prefix, double *src, opal_data_type_t type);
|
||||
int opal_dss_print_timeval(char **output, char *prefix, struct timeval *src, opal_data_type_t type);
|
||||
int opal_dss_print_time(char **output, char *prefix, time_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_name(char **output, char *prefix, opal_process_name_t *name, opal_data_type_t type);
|
||||
int opal_dss_print_jobid(char **output, char *prefix, opal_process_name_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_vpid(char **output, char *prefix, opal_process_name_t *src, opal_data_type_t type);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -575,6 +575,40 @@ int opal_dss_open(void)
|
||||
"OPAL_TIME", &tmp))) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
tmp = OPAL_NAME;
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.register_type(opal_dss_pack_name,
|
||||
opal_dss_unpack_name,
|
||||
(opal_dss_copy_fn_t)opal_dss_copy_name,
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_name,
|
||||
(opal_dss_print_fn_t)opal_dss_print_name,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"OPAL_NAME", &tmp))) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
tmp = OPAL_JOBID;
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.register_type(opal_dss_pack_jobid,
|
||||
opal_dss_unpack_jobid,
|
||||
(opal_dss_copy_fn_t)opal_dss_copy_jobid,
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_jobid,
|
||||
(opal_dss_print_fn_t)opal_dss_print_jobid,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"OPAL_JOBID", &tmp))) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
tmp = OPAL_VPID;
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.register_type(opal_dss_pack_vpid,
|
||||
opal_dss_unpack_vpid,
|
||||
(opal_dss_copy_fn_t)opal_dss_copy_vpid,
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_vpid,
|
||||
(opal_dss_print_fn_t)opal_dss_print_vpid,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"OPAL_VPID", &tmp))) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* All done */
|
||||
|
||||
opal_dss_initialized = true;
|
||||
|
@ -11,6 +11,8 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2013 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -816,6 +818,11 @@ int opal_dss_pack_value(opal_buffer_t *buffer, const void *src,
|
||||
case OPAL_PTR:
|
||||
/* just ignore these values */
|
||||
break;
|
||||
case OPAL_NAME:
|
||||
if (OPAL_SUCCESS != (ret = opal_dss_pack_buffer(buffer, &ptr[i]->data.name, 1, OPAL_NAME))) {
|
||||
return ret;
|
||||
}
|
||||
break;
|
||||
case OPAL_FLOAT_ARRAY:
|
||||
if (OPAL_SUCCESS !=
|
||||
(ret = opal_dss_pack_buffer(buffer,
|
||||
@ -1144,4 +1151,92 @@ int opal_dss_pack_buffer_contents(opal_buffer_t *buffer, const void *src,
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* NAME
|
||||
*/
|
||||
int opal_dss_pack_name(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type)
|
||||
{
|
||||
int rc;
|
||||
int32_t i;
|
||||
opal_process_name_t* proc;
|
||||
opal_jobid_t *jobid;
|
||||
opal_vpid_t *vpid;
|
||||
|
||||
/* collect all the jobids in a contiguous array */
|
||||
jobid = (opal_jobid_t*)malloc(num_vals * sizeof(opal_jobid_t));
|
||||
if (NULL == jobid) {
|
||||
OPAL_ERROR_LOG(OPAL_ERR_OUT_OF_RESOURCE);
|
||||
return OPAL_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
proc = (opal_process_name_t*)src;
|
||||
for (i=0; i < num_vals; i++) {
|
||||
jobid[i] = proc->jobid;
|
||||
proc++;
|
||||
}
|
||||
/* now pack them in one shot */
|
||||
if (OPAL_SUCCESS != (rc =
|
||||
opal_dss_pack_jobid(buffer, jobid, num_vals, OPAL_JOBID))) {
|
||||
OPAL_ERROR_LOG(rc);
|
||||
free(jobid);
|
||||
return rc;
|
||||
}
|
||||
free(jobid);
|
||||
|
||||
/* collect all the vpids in a contiguous array */
|
||||
vpid = (opal_vpid_t*)malloc(num_vals * sizeof(opal_vpid_t));
|
||||
if (NULL == vpid) {
|
||||
OPAL_ERROR_LOG(OPAL_ERR_OUT_OF_RESOURCE);
|
||||
return OPAL_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
proc = (opal_process_name_t*)src;
|
||||
for (i=0; i < num_vals; i++) {
|
||||
vpid[i] = proc->vpid;
|
||||
proc++;
|
||||
}
|
||||
/* now pack them in one shot */
|
||||
if (OPAL_SUCCESS != (rc =
|
||||
opal_dss_pack_vpid(buffer, vpid, num_vals, OPAL_VPID))) {
|
||||
OPAL_ERROR_LOG(rc);
|
||||
free(vpid);
|
||||
return rc;
|
||||
}
|
||||
free(vpid);
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* JOBID
|
||||
*/
|
||||
int opal_dss_pack_jobid(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Turn around and pack the real type */
|
||||
if (OPAL_SUCCESS != (
|
||||
ret = opal_dss_pack_buffer(buffer, src, num_vals, OPAL_JOBID_T))) {
|
||||
OPAL_ERROR_LOG(ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* VPID
|
||||
*/
|
||||
int opal_dss_pack_vpid(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Turn around and pack the real type */
|
||||
if (OPAL_SUCCESS != (
|
||||
ret = opal_dss_pack_buffer(buffer, src, num_vals, OPAL_VPID_T))) {
|
||||
OPAL_ERROR_LOG(ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,8 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -988,3 +990,73 @@ int opal_dss_print_buffer_contents(char **output, char *prefix,
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* NAME
|
||||
*/
|
||||
int opal_dss_print_name(char **output, char *prefix, opal_process_name_t *name, opal_data_type_t type)
|
||||
{
|
||||
/* set default result */
|
||||
*output = NULL;
|
||||
|
||||
if (NULL == name) {
|
||||
asprintf(output, "%sData type: ORTE_PROCESS_NAME\tData Value: NULL",
|
||||
(NULL == prefix ? " " : prefix));
|
||||
} else {
|
||||
asprintf(output, "%sData type: ORTE_PROCESS_NAME\tData Value: [%d,%d]",
|
||||
(NULL == prefix ? " " : prefix), name->jobid, name->vpid);
|
||||
}
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
int opal_dss_print_jobid(char **output, char *prefix,
|
||||
opal_process_name_t *src, opal_data_type_t type)
|
||||
{
|
||||
char *prefx;
|
||||
|
||||
/* deal with NULL prefix */
|
||||
if (NULL == prefix) asprintf(&prefx, " ");
|
||||
else prefx = prefix;
|
||||
|
||||
/* if src is NULL, just print data type and return */
|
||||
if (NULL == src) {
|
||||
asprintf(output, "%sData type: OPAL_JOBID\tValue: NULL pointer", prefx);
|
||||
if (prefx != prefix) {
|
||||
free(prefx);
|
||||
}
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
asprintf(output, "%sData type: OPAL_JOBID\tValue: %s", prefx, opal_jobid_print(src->jobid));
|
||||
if (prefx != prefix) {
|
||||
free(prefx);
|
||||
}
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
int opal_dss_print_vpid(char **output, char *prefix,
|
||||
opal_process_name_t *src, opal_data_type_t type)
|
||||
{
|
||||
char *prefx;
|
||||
|
||||
/* deal with NULL prefix */
|
||||
if (NULL == prefix) asprintf(&prefx, " ");
|
||||
else prefx = prefix;
|
||||
|
||||
/* if src is NULL, just print data type and return */
|
||||
if (NULL == src) {
|
||||
asprintf(output, "%sData type: OPAL_VPID\tValue: NULL pointer", prefx);
|
||||
if (prefx != prefix) {
|
||||
free(prefx);
|
||||
}
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
asprintf(output, "%sData type: OPAL_VPID\tValue: %s", prefx, opal_vpid_print(src->vpid));
|
||||
if (prefx != prefix) {
|
||||
free(prefx);
|
||||
}
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
@ -11,8 +11,11 @@
|
||||
* 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) 2012-2013 Los Alamos National Security, Inc. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -38,6 +41,13 @@
|
||||
#include "opal/class/opal_pointer_array.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
|
||||
typedef uint32_t opal_jobid_t;
|
||||
typedef uint32_t opal_vpid_t;
|
||||
typedef struct {
|
||||
opal_jobid_t jobid;
|
||||
opal_vpid_t vpid;
|
||||
} opal_process_name_t;
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
typedef uint8_t opal_data_type_t; /** data type indicators */
|
||||
@ -86,8 +96,6 @@ typedef struct {
|
||||
#define OPAL_VALUE (opal_data_type_t) 26 /**< opal value structure */
|
||||
#define OPAL_BUFFER (opal_data_type_t) 27 /**< pack the remaining contents of a buffer as an object */
|
||||
#define OPAL_PTR (opal_data_type_t) 28 /**< pointer to void* */
|
||||
/* OPAL Dynamic */
|
||||
#define OPAL_DSS_ID_DYNAMIC (opal_data_type_t) 30
|
||||
/* OPAL Array types */
|
||||
#define OPAL_FLOAT_ARRAY (opal_data_type_t) 31
|
||||
#define OPAL_DOUBLE_ARRAY (opal_data_type_t) 32
|
||||
@ -108,7 +116,11 @@ typedef struct {
|
||||
#define OPAL_BYTE_OBJECT_ARRAY (opal_data_type_t) 47
|
||||
#define OPAL_PID_ARRAY (opal_data_type_t) 48
|
||||
#define OPAL_TIMEVAL_ARRAY (opal_data_type_t) 49
|
||||
|
||||
#define OPAL_NAME (opal_data_type_t) 50
|
||||
#define OPAL_JOBID (opal_data_type_t) 51
|
||||
#define OPAL_VPID (opal_data_type_t) 52
|
||||
/* OPAL Dynamic */
|
||||
#define OPAL_DSS_ID_DYNAMIC (opal_data_type_t) 100
|
||||
|
||||
/* define the results values for comparisons so we can change them in only one place */
|
||||
#define OPAL_VALUE1_GREATER +1
|
||||
@ -232,6 +244,7 @@ typedef struct {
|
||||
float fval;
|
||||
double dval;
|
||||
struct timeval tv;
|
||||
opal_process_name_t name;
|
||||
opal_bool_array_t flag_array;
|
||||
opal_uint8_array_t byte_array;
|
||||
opal_string_array_t string_array;
|
||||
|
@ -11,6 +11,8 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -1069,6 +1071,11 @@ int opal_dss_unpack_value(opal_buffer_t *buffer, void *dest,
|
||||
return ret;
|
||||
}
|
||||
break;
|
||||
case OPAL_NAME:
|
||||
if (OPAL_SUCCESS != (ret = opal_dss_unpack_buffer(buffer, &ptr[i]->data.name, &m, OPAL_NAME))) {
|
||||
return ret;
|
||||
}
|
||||
break;
|
||||
case OPAL_FLOAT_ARRAY:
|
||||
if (OPAL_SUCCESS !=
|
||||
(ret = opal_dss_unpack_buffer(buffer,
|
||||
@ -1407,3 +1414,98 @@ int opal_dss_unpack_buffer_contents(opal_buffer_t *buffer, void *dest,
|
||||
}
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* NAME
|
||||
*/
|
||||
int opal_dss_unpack_name(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type)
|
||||
{
|
||||
int rc;
|
||||
int32_t i, num;
|
||||
opal_process_name_t* proc;
|
||||
opal_jobid_t *jobid;
|
||||
opal_vpid_t *vpid;
|
||||
|
||||
num = *num_vals;
|
||||
|
||||
/* allocate space for all the jobids in a contiguous array */
|
||||
jobid = (opal_jobid_t*)malloc(num * sizeof(opal_jobid_t));
|
||||
if (NULL == jobid) {
|
||||
OPAL_ERROR_LOG(OPAL_ERR_OUT_OF_RESOURCE);
|
||||
*num_vals = 0;
|
||||
return OPAL_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
/* now unpack them in one shot */
|
||||
if (OPAL_SUCCESS != (rc =
|
||||
opal_dss_unpack_jobid(buffer, jobid, num_vals, OPAL_JOBID))) {
|
||||
OPAL_ERROR_LOG(rc);
|
||||
*num_vals = 0;
|
||||
free(jobid);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* collect all the vpids in a contiguous array */
|
||||
vpid = (opal_vpid_t*)malloc(num * sizeof(opal_vpid_t));
|
||||
if (NULL == vpid) {
|
||||
OPAL_ERROR_LOG(OPAL_ERR_OUT_OF_RESOURCE);
|
||||
*num_vals = 0;
|
||||
free(jobid);
|
||||
return OPAL_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
/* now unpack them in one shot */
|
||||
if (OPAL_SUCCESS != (rc =
|
||||
opal_dss_unpack_vpid(buffer, vpid, num_vals, OPAL_VPID))) {
|
||||
OPAL_ERROR_LOG(rc);
|
||||
*num_vals = 0;
|
||||
free(vpid);
|
||||
free(jobid);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* build the names from the jobid/vpid arrays */
|
||||
proc = (opal_process_name_t*)dest;
|
||||
for (i=0; i < num; i++) {
|
||||
proc->jobid = jobid[i];
|
||||
proc->vpid = vpid[i];
|
||||
proc++;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
free(vpid);
|
||||
free(jobid);
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* JOBID
|
||||
*/
|
||||
int opal_dss_unpack_jobid(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Turn around and unpack the real type */
|
||||
if (OPAL_SUCCESS != (ret = opal_dss_unpack_buffer(buffer, dest, num_vals, OPAL_JOBID_T))) {
|
||||
OPAL_ERROR_LOG(ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* VPID
|
||||
*/
|
||||
int opal_dss_unpack_vpid(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Turn around and unpack the real type */
|
||||
if (OPAL_SUCCESS != (ret = opal_dss_unpack_buffer(buffer, dest, num_vals, OPAL_VPID_T))) {
|
||||
OPAL_ERROR_LOG(ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -45,12 +45,6 @@
|
||||
#include "opal/util/output.h"
|
||||
#endif
|
||||
|
||||
/* define an RTE-agnostic process identifier */
|
||||
typedef uint64_t opal_identifier_t;
|
||||
#define OPAL_ID_T OPAL_UINT64
|
||||
#define OPAL_ID_INVALID UINT64_MAX
|
||||
|
||||
|
||||
/*
|
||||
* portable assignment of pointer to int
|
||||
*/
|
||||
|
@ -1077,7 +1077,7 @@ int mca_btl_openib_add_procs(
|
||||
rc = mca_btl_openib_ib_address_add_new(
|
||||
ib_proc->proc_ports[j].pm_port_info.lid,
|
||||
ib_proc->proc_ports[j].pm_port_info.subnet_id,
|
||||
opal_process_name_jobid(proc->proc_name), endpoint);
|
||||
proc->proc_name.jobid, endpoint);
|
||||
if (OPAL_SUCCESS != rc ) {
|
||||
OPAL_THREAD_UNLOCK(&ib_proc->proc_lock);
|
||||
return OPAL_ERROR;
|
||||
|
@ -2114,7 +2114,7 @@ static int finish_btl_init(mca_btl_openib_module_t *openib_btl)
|
||||
|
||||
opal_output_verbose(1, opal_btl_base_framework.framework_output,
|
||||
"[rank=%d] openib: using port %s:%d",
|
||||
opal_process_name_vpid(OPAL_PROC_MY_NAME),
|
||||
OPAL_PROC_MY_NAME.vpid,
|
||||
ibv_get_device_name(openib_btl->device->ib_dev),
|
||||
openib_btl->port_num);
|
||||
return OPAL_SUCCESS;
|
||||
@ -2371,7 +2371,7 @@ btl_openib_component_init(int *num_btl_modules,
|
||||
goto no_btls;
|
||||
}
|
||||
|
||||
seedv[0] = opal_process_name_vpid(OPAL_PROC_MY_NAME);
|
||||
seedv[0] = OPAL_PROC_MY_NAME.vpid;
|
||||
seedv[1] = opal_timer_base_get_cycles();
|
||||
seedv[2] = opal_timer_base_get_cycles();
|
||||
seed48(seedv);
|
||||
@ -2590,7 +2590,7 @@ btl_openib_component_init(int *num_btl_modules,
|
||||
(dev_sorted[i].distance - distance) > EPS) {
|
||||
opal_output_verbose(1, opal_btl_base_framework.framework_output,
|
||||
"[rank=%d] openib: skipping device %s; it is too far away",
|
||||
opal_process_name_vpid(OPAL_PROC_MY_NAME),
|
||||
OPAL_PROC_MY_NAME.vpid,
|
||||
ibv_get_device_name(dev_sorted[i].ib_dev));
|
||||
break;
|
||||
}
|
||||
|
@ -4,6 +4,8 @@
|
||||
* Copyright (c) 2012 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -373,15 +375,15 @@ void btl_openib_handle_failover_control_messages(mca_btl_openib_control_header_t
|
||||
opal_output_verbose(20, mca_btl_openib_component.verbose_failover,
|
||||
"IB: rank=%d, control message (remote=%d), "
|
||||
"moved local head by one (new=%d)",
|
||||
opal_process_name_vpid(OPAL_PROC_MY_NAME),
|
||||
opal_process_name_vpid(newep->endpoint_proc->proc_opal->proc_name),
|
||||
OPAL_PROC_MY_NAME.vpid,
|
||||
newep->endpoint_proc->proc_opal->proc_name.vpid,
|
||||
newep->eager_rdma_local.head);
|
||||
} else {
|
||||
opal_output_verbose(20, mca_btl_openib_component.verbose_failover,
|
||||
"IB: rank=%d, control message (remote=%d), "
|
||||
"did not move local head by one (still=%d)",
|
||||
opal_process_name_vpid(OPAL_PROC_MY_NAME),
|
||||
opal_process_name_vpid(newep->endpoint_proc->proc_opal->proc_name),
|
||||
OPAL_PROC_MY_NAME.vpid,
|
||||
newep->endpoint_proc->proc_opal->proc_name.vpid,
|
||||
newep->eager_rdma_local.head);
|
||||
}
|
||||
}
|
||||
@ -685,7 +687,7 @@ static void mca_btl_openib_endpoint_notify(mca_btl_base_endpoint_t* endpoint, ui
|
||||
bc_hdr->control.type = type;
|
||||
bc_hdr->lid = endpoint->endpoint_btl->port_info.lid;
|
||||
bc_hdr->subnet_id = endpoint->endpoint_btl->port_info.subnet_id;
|
||||
bc_hdr->vpid = opal_process_name_vpid(OPAL_PROC_MY_NAME);
|
||||
bc_hdr->vpid = OPAL_PROC_MY_NAME.vpid;
|
||||
bc_hdr->index = index;
|
||||
|
||||
if(newep->nbo) {
|
||||
@ -740,7 +742,7 @@ void mca_btl_openib_dump_all_local_rdma_frags(mca_btl_openib_device_t *device) {
|
||||
mca_btl_openib_endpoint_t* endpoint;
|
||||
|
||||
c = device->eager_rdma_buffers_count;
|
||||
opal_output(0, "rank=%d, device=%s", opal_process_name_vpid(OPAL_PROC_MY_NAME), device->ib_dev->name);
|
||||
opal_output(0, "rank=%d, device=%s", OPAL_PROC_MY_NAME.vpid, device->ib_dev->name);
|
||||
|
||||
for(i = 0; i < c; i++) {
|
||||
endpoint = device->eager_rdma_buffers[i];
|
||||
|
@ -2,6 +2,8 @@
|
||||
* Copyright (c) 2007-2008 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 NVIDIA Corporation. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -112,7 +114,7 @@ static void ib_address_destructor(ib_address_t *ib_addr)
|
||||
OBJ_DESTRUCT(&ib_addr->pending_ep);
|
||||
}
|
||||
|
||||
static int ib_address_init(ib_address_t *ib_addr, uint16_t lid, uint64_t s_id, opal_process_name_t ep_jobid)
|
||||
static int ib_address_init(ib_address_t *ib_addr, uint16_t lid, uint64_t s_id, opal_jobid_t ep_jobid)
|
||||
{
|
||||
ib_addr->key = malloc(SIZE_OF3(s_id, lid, ep_jobid));
|
||||
if (NULL == ib_addr->key) {
|
||||
@ -137,7 +139,7 @@ static int ib_address_init(ib_address_t *ib_addr, uint16_t lid, uint64_t s_id, o
|
||||
* Before call to this function you need to protect with
|
||||
*/
|
||||
int mca_btl_openib_ib_address_add_new (uint16_t lid, uint64_t s_id,
|
||||
opal_process_name_t ep_jobid, mca_btl_openib_endpoint_t *ep)
|
||||
opal_jobid_t ep_jobid, mca_btl_openib_endpoint_t *ep)
|
||||
{
|
||||
void *tmp;
|
||||
int ret = OPAL_SUCCESS;
|
||||
|
@ -1,5 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2007-2008 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -44,6 +46,6 @@ typedef struct ib_address_t ib_address_t;
|
||||
int mca_btl_openib_open_xrc_domain(struct mca_btl_openib_device_t *device);
|
||||
int mca_btl_openib_close_xrc_domain(struct mca_btl_openib_device_t *device);
|
||||
int mca_btl_openib_ib_address_add_new (uint16_t lid, uint64_t s_id,
|
||||
opal_process_name_t ep_jobid, mca_btl_openib_endpoint_t *ep);
|
||||
opal_jobid_t ep_jobid, mca_btl_openib_endpoint_t *ep);
|
||||
|
||||
#endif
|
||||
|
@ -112,12 +112,12 @@ static int mca_btl_scif_ep_connect_finish (mca_btl_base_endpoint_t *ep, bool pas
|
||||
}
|
||||
|
||||
if (OPAL_UNLIKELY(-1 == rc)) {
|
||||
BTL_VERBOSE(("error exchanging connection data with peer %d", opal_process_name_vpid(ep->peer_proc->proc_name)));
|
||||
BTL_VERBOSE(("error exchanging connection data with peer %d", ep->peer_proc->proc_name.vpid));
|
||||
mca_btl_scif_ep_free_buffer (ep);
|
||||
return OPAL_ERROR;
|
||||
}
|
||||
|
||||
BTL_VERBOSE(("remote peer %d has scif offset %lu", opal_process_name_vpid(ep->peer_proc->proc_name),
|
||||
BTL_VERBOSE(("remote peer %d has scif offset %lu", ep->peer_proc->proc_name.vpid,
|
||||
(unsigned long) ep->send_buffer.scif_offset));
|
||||
|
||||
ep->send_buffer.buffer = scif_mmap (0, mca_btl_scif_component.segment_size,
|
||||
@ -131,7 +131,7 @@ static int mca_btl_scif_ep_connect_finish (mca_btl_base_endpoint_t *ep, bool pas
|
||||
|
||||
opal_memchecker_base_mem_defined (ep->send_buffer.buffer, mca_btl_scif_component.segment_size);
|
||||
|
||||
BTL_VERBOSE(("remote peer %d buffer mapped to local pointer %p", opal_process_name_vpid(ep->peer_proc->proc_name),
|
||||
BTL_VERBOSE(("remote peer %d buffer mapped to local pointer %p", ep->peer_proc->proc_name.vpid,
|
||||
ep->send_buffer.buffer));
|
||||
|
||||
/* setup the circular send buffers */
|
||||
@ -145,7 +145,7 @@ static int mca_btl_scif_ep_connect_finish (mca_btl_base_endpoint_t *ep, bool pas
|
||||
/* connection complete */
|
||||
ep->state = MCA_BTL_SCIF_EP_STATE_CONNECTED;
|
||||
|
||||
BTL_VERBOSE(("btl/scif connection to remote peer %d established", opal_process_name_vpid(ep->peer_proc->proc_name)));
|
||||
BTL_VERBOSE(("btl/scif connection to remote peer %d established", ep->peer_proc->proc_name.vpid));
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
@ -176,11 +176,11 @@ int mca_btl_scif_ep_connect_start_passive (void) {
|
||||
}
|
||||
|
||||
BTL_VERBOSE(("got connection request from vpid %d on port %u on node %u",
|
||||
opal_process_name_vpid(remote_name), port_id.port, port_id.node));
|
||||
remote_name.vpid, port_id.port, port_id.node));
|
||||
|
||||
for (i = 0 ; i < mca_btl_scif_module.endpoint_count ; ++i) {
|
||||
if (opal_process_name_vpid(mca_btl_scif_module.endpoints[i].peer_proc->proc_name) ==
|
||||
opal_process_name_vpid(remote_name)) {
|
||||
if (mca_btl_scif_module.endpoints[i].peer_proc->proc_name.vpid ==
|
||||
remote_name.vpid) {
|
||||
ep = mca_btl_scif_module.endpoints + i;
|
||||
break;
|
||||
}
|
||||
@ -188,7 +188,7 @@ int mca_btl_scif_ep_connect_start_passive (void) {
|
||||
|
||||
/* peer not found */
|
||||
if (i == mca_btl_scif_module.endpoint_count) {
|
||||
BTL_VERBOSE(("remote peer %d unknown", opal_process_name_vpid(remote_name)));
|
||||
BTL_VERBOSE(("remote peer %d unknown", remote_name.vpid));
|
||||
scif_close (epd);
|
||||
return OPAL_ERROR;
|
||||
}
|
||||
@ -197,7 +197,7 @@ int mca_btl_scif_ep_connect_start_passive (void) {
|
||||
if ((MCA_BTL_SCIF_EP_STATE_CONNECTING == ep->state &&
|
||||
ep->port_id.port < mca_btl_scif_module.port_id.port) ||
|
||||
MCA_BTL_SCIF_EP_STATE_CONNECTED == ep->state) {
|
||||
BTL_VERBOSE(("active connection in progress. connection request from peer %d rejected", opal_process_name_vpid(remote_name)));
|
||||
BTL_VERBOSE(("active connection in progress. connection request from peer %d rejected", remote_name.vpid));
|
||||
scif_close (epd);
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
@ -231,7 +231,7 @@ static inline int mca_btl_scif_ep_connect_start_active (mca_btl_base_endpoint_t
|
||||
int rc = OPAL_SUCCESS;
|
||||
|
||||
BTL_VERBOSE(("initiaiting connection to remote peer %d with port: %u on local scif node: %u",
|
||||
opal_process_name_vpid(ep->peer_proc->proc_name), ep->port_id.port, ep->port_id.node));
|
||||
ep->peer_proc->proc_name.vpid, ep->port_id.port, ep->port_id.node));
|
||||
|
||||
opal_mutex_lock (&ep->lock);
|
||||
do {
|
||||
|
@ -118,7 +118,7 @@ static int mca_btl_scif_send_frag (struct mca_btl_base_endpoint_t *endpoint,
|
||||
unsigned char * restrict dst;
|
||||
|
||||
BTL_VERBOSE(("btl/scif sending descriptor %p from %d -> %d. length = %" PRIu64, (void *) frag,
|
||||
opal_process_name_vpid(OPAL_PROC_MY_NAME), opal_process_name_vpid(endpoint->peer_proc->proc_name), frag->segments[0].base.seg_len));
|
||||
OPAL_PROC_MY_NAME.vpid, endpoint->peer_proc->proc_name.vpid, frag->segments[0].base.seg_len));
|
||||
|
||||
if (OPAL_LIKELY(OPAL_SUCCESS == mca_btl_scif_send_get_buffer (endpoint, size, &dst))) {
|
||||
unsigned char * restrict data = (unsigned char * restrict) frag->segments[0].base.seg_addr.pval;
|
||||
|
@ -17,6 +17,8 @@
|
||||
* Copyright (c) 2010-2012 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -484,7 +486,7 @@ int mca_btl_sm_add_procs(
|
||||
for (proc = 0; proc < (int32_t)nprocs; proc++) {
|
||||
/* check to see if this proc can be reached via shmem (i.e.,
|
||||
if they're on my local host and in my job) */
|
||||
if (opal_process_name_jobid(procs[proc]->proc_name) != opal_process_name_jobid(my_proc->proc_name) ||
|
||||
if (procs[proc]->proc_name.jobid != my_proc->proc_name.jobid ||
|
||||
!OPAL_PROC_ON_LOCAL_NODE(procs[proc]->proc_flags)) {
|
||||
peers[proc] = NULL;
|
||||
continue;
|
||||
|
@ -777,7 +777,7 @@ mca_btl_sm_component_init(int *num_btls,
|
||||
/* create a named pipe to receive events */
|
||||
sprintf( mca_btl_sm_component.sm_fifo_path,
|
||||
"%s"OPAL_PATH_SEP"sm_fifo.%lu", opal_process_info.job_session_dir,
|
||||
(unsigned long)opal_process_name_vpid(OPAL_PROC_MY_NAME) );
|
||||
(unsigned long)OPAL_PROC_MY_NAME.vpid );
|
||||
if(mkfifo(mca_btl_sm_component.sm_fifo_path, 0660) < 0) {
|
||||
opal_output(0, "mca_btl_sm_component_init: mkfifo failed with errno=%d\n",errno);
|
||||
return NULL;
|
||||
|
@ -16,6 +16,8 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2012-2013 NVIDIA Corporation. All rights reserved.
|
||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -505,7 +507,7 @@ int mca_btl_smcuda_add_procs(
|
||||
for (proc = 0; proc < (int32_t)nprocs; proc++) {
|
||||
/* check to see if this proc can be reached via shmem (i.e.,
|
||||
if they're on my local host and in my job) */
|
||||
if (opal_process_name_jobid(procs[proc]->proc_name) != opal_process_name_jobid(my_proc->proc_name) ||
|
||||
if (procs[proc]->proc_name.jobid != my_proc->proc_name.jobid ||
|
||||
!OPAL_PROC_ON_LOCAL_NODE(procs[proc]->proc_flags)) {
|
||||
peers[proc] = NULL;
|
||||
continue;
|
||||
|
@ -10,6 +10,8 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -60,7 +62,7 @@ struct mca_btl_tcp_component_t {
|
||||
int tcp_free_list_max; /**< maximum size of free lists */
|
||||
int tcp_free_list_inc; /**< number of elements to alloc when growing free lists */
|
||||
int tcp_endpoint_cache; /**< amount of cache on each endpoint */
|
||||
opal_hash_table_t tcp_procs; /**< hash table of tcp proc structures */
|
||||
opal_proc_table_t tcp_procs; /**< hash table of tcp proc structures */
|
||||
opal_list_t tcp_events; /**< list of pending tcp events */
|
||||
opal_mutex_t tcp_lock; /**< lock for accessing module state */
|
||||
|
||||
|
@ -17,6 +17,8 @@
|
||||
* reserved.
|
||||
* Copyright (c) 2013-2014 NVIDIA Corporation. All rights reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -314,12 +316,12 @@ static int mca_btl_tcp_component_open(void)
|
||||
|
||||
/* initialize objects */
|
||||
OBJ_CONSTRUCT(&mca_btl_tcp_component.tcp_lock, opal_mutex_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_tcp_component.tcp_procs, opal_hash_table_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_tcp_component.tcp_procs, opal_proc_table_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_tcp_component.tcp_events, opal_list_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_tcp_component.tcp_frag_eager, ompi_free_list_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_tcp_component.tcp_frag_max, ompi_free_list_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_tcp_component.tcp_frag_user, ompi_free_list_t);
|
||||
opal_hash_table_init(&mca_btl_tcp_component.tcp_procs, 256);
|
||||
opal_proc_table_init(&mca_btl_tcp_component.tcp_procs, 16, 256);
|
||||
|
||||
/* if_include and if_exclude need to be mutually exclusive */
|
||||
if (OPAL_SUCCESS !=
|
||||
|
@ -12,6 +12,8 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2008-2010 Oracle and/or its affiliates. All rights reserved
|
||||
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -79,7 +81,7 @@ void mca_btl_tcp_proc_destruct(mca_btl_tcp_proc_t* tcp_proc)
|
||||
if( NULL != tcp_proc->proc_opal ) {
|
||||
/* remove from list of all proc instances */
|
||||
OPAL_THREAD_LOCK(&mca_btl_tcp_component.tcp_lock);
|
||||
opal_hash_table_remove_value_uint64(&mca_btl_tcp_component.tcp_procs,
|
||||
opal_proc_table_remove_value(&mca_btl_tcp_component.tcp_procs,
|
||||
tcp_proc->proc_opal->proc_name);
|
||||
OPAL_THREAD_UNLOCK(&mca_btl_tcp_component.tcp_lock);
|
||||
/* Do not OBJ_RELEASE the proc_opal ! */
|
||||
@ -102,14 +104,13 @@ void mca_btl_tcp_proc_destruct(mca_btl_tcp_proc_t* tcp_proc)
|
||||
|
||||
mca_btl_tcp_proc_t* mca_btl_tcp_proc_create(opal_proc_t* proc)
|
||||
{
|
||||
uint64_t hash = proc->proc_name;
|
||||
mca_btl_tcp_proc_t* btl_proc;
|
||||
size_t size;
|
||||
int rc;
|
||||
|
||||
OPAL_THREAD_LOCK(&mca_btl_tcp_component.tcp_lock);
|
||||
rc = opal_hash_table_get_value_uint64(&mca_btl_tcp_component.tcp_procs,
|
||||
hash, (void**)&btl_proc);
|
||||
rc = opal_proc_table_get_value(&mca_btl_tcp_component.tcp_procs,
|
||||
proc->proc_name, (void**)&btl_proc);
|
||||
if(OPAL_SUCCESS == rc) {
|
||||
OPAL_THREAD_UNLOCK(&mca_btl_tcp_component.tcp_lock);
|
||||
return btl_proc;
|
||||
@ -122,8 +123,8 @@ mca_btl_tcp_proc_t* mca_btl_tcp_proc_create(opal_proc_t* proc)
|
||||
OBJ_RETAIN(btl_proc->proc_opal);
|
||||
|
||||
/* add to hash table of all proc instance */
|
||||
opal_hash_table_set_value_uint64(&mca_btl_tcp_component.tcp_procs,
|
||||
hash, btl_proc);
|
||||
opal_proc_table_set_value(&mca_btl_tcp_component.tcp_procs,
|
||||
proc->proc_name, btl_proc);
|
||||
OPAL_THREAD_UNLOCK(&mca_btl_tcp_component.tcp_lock);
|
||||
|
||||
/* lookup tcp parameters exported by this proc */
|
||||
@ -724,7 +725,7 @@ mca_btl_tcp_proc_t* mca_btl_tcp_proc_lookup(const opal_process_name_t *name)
|
||||
{
|
||||
mca_btl_tcp_proc_t* proc = NULL;
|
||||
OPAL_THREAD_LOCK(&mca_btl_tcp_component.tcp_lock);
|
||||
opal_hash_table_get_value_uint64(&mca_btl_tcp_component.tcp_procs,
|
||||
opal_proc_table_get_value(&mca_btl_tcp_component.tcp_procs,
|
||||
*name, (void**)&proc);
|
||||
OPAL_THREAD_UNLOCK(&mca_btl_tcp_component.tcp_lock);
|
||||
return proc;
|
||||
|
@ -3,6 +3,8 @@
|
||||
* Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2011 UT-Battelle, LLC. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -306,7 +308,7 @@ OPAL_MODULE_DECLSPEC extern mca_btl_ugni_module_t mca_btl_ugni_module;
|
||||
/* Get a unique 64-bit id for the process name */
|
||||
static inline uint64_t mca_btl_ugni_proc_name_to_id (opal_process_name_t name) {
|
||||
/* Throw away the top bit of the jobid for the datagram type */
|
||||
return ((uint64_t) (opal_process_name_jobid(name) & 0x7fffffff) << 32 | opal_process_name_vpid(name));
|
||||
return ((uint64_t) (name.jobid & 0x7fffffff) << 32 | name.vpid);
|
||||
}
|
||||
|
||||
|
||||
|
@ -3,6 +3,8 @@
|
||||
* Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2011 UT-Battelle, LLC. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -163,7 +165,7 @@ mca_btl_ugni_module_finalize (struct mca_btl_base_module_t *btl)
|
||||
/* cancel wildcard post */
|
||||
rc = GNI_EpPostDataCancelById (ugni_module->wildcard_ep,
|
||||
MCA_BTL_UGNI_CONNECT_WILDCARD_ID |
|
||||
opal_process_name_vpid(OPAL_PROC_MY_NAME));
|
||||
OPAL_PROC_MY_NAME.vpid);
|
||||
if (GNI_RC_SUCCESS != rc) {
|
||||
BTL_VERBOSE(("btl/ugni error cancelling wildcard post"));
|
||||
}
|
||||
|
@ -3,6 +3,8 @@
|
||||
* Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2011 UT-Battelle, LLC. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -39,7 +41,7 @@ int mca_btl_ugni_send (struct mca_btl_base_module_t *btl,
|
||||
}
|
||||
|
||||
BTL_VERBOSE(("btl/ugni sending descriptor %p from %d -> %d. length = %" PRIu64, (void *)descriptor,
|
||||
opal_process_name_vpid(OPAL_PROC_MY_NAME), endpoint->common->ep_rem_id, frag->segments[0].base.seg_len));
|
||||
OPAL_PROC_MY_NAME.vpid, endpoint->common->ep_rem_id, frag->segments[0].base.seg_len));
|
||||
|
||||
/* temporarily disable ownership and callback flags so we can reliably check the complete flag */
|
||||
frag->base.des_flags &= ~(MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | MCA_BTL_DES_SEND_ALWAYS_CALLBACK);
|
||||
|
@ -12,6 +12,8 @@
|
||||
* Copyright (c) 2006 Sandia National Laboratories. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -136,7 +138,7 @@ typedef struct opal_btl_usnic_component_t {
|
||||
|
||||
/* Cached hashed version of my RTE proc name (to stuff in
|
||||
protocol headers) */
|
||||
uint64_t my_hashed_rte_name;
|
||||
opal_process_name_t my_name;
|
||||
|
||||
/** array of possible BTLs (>= num_modules elements) */
|
||||
struct opal_btl_usnic_module_t* usnic_all_modules;
|
||||
|
@ -16,6 +16,8 @@
|
||||
* Copyright (c) 2012-2014 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -458,10 +460,10 @@ static mca_btl_base_module_t** usnic_component_init(int* num_btl_modules,
|
||||
************************************************************************/
|
||||
|
||||
/* initialization */
|
||||
mca_btl_usnic_component.my_hashed_rte_name =
|
||||
mca_btl_usnic_component.my_name =
|
||||
opal_proc_local_get()->proc_name;
|
||||
MSGDEBUG1_OUT("%s: my_hashed_rte_name=0x%" PRIx64,
|
||||
__func__, mca_btl_usnic_component.my_hashed_rte_name);
|
||||
MSGDEBUG1_OUT("%s: my_name=%s",
|
||||
__func__, OPAL_NAME_PRINT(mca_btl_usnic_component.my_name));
|
||||
|
||||
opal_srand(&opal_btl_usnic_rand_buff, ((uint32_t) getpid()));
|
||||
|
||||
@ -732,12 +734,12 @@ static mca_btl_base_module_t** usnic_component_init(int* num_btl_modules,
|
||||
}
|
||||
|
||||
/* Make a hash table of senders */
|
||||
OBJ_CONSTRUCT(&module->senders, opal_hash_table_t);
|
||||
OBJ_CONSTRUCT(&module->senders, opal_proc_table_t);
|
||||
/* JMS This is a fixed size -- BAD! But since hash table
|
||||
doesn't grow dynamically, I don't know what size to put
|
||||
here. I think the long-term solution is to write a better
|
||||
hash table... :-( */
|
||||
opal_hash_table_init(&module->senders, 4096);
|
||||
opal_proc_table_init(&module->senders, 16, 4096);
|
||||
|
||||
/* Let this module advance to the next round! */
|
||||
btls[i++] = &(module->super);
|
||||
@ -1440,8 +1442,8 @@ static void dump_endpoint(opal_btl_usnic_endpoint_t *endpoint)
|
||||
|
||||
opal_output(0, " endpoint %p, %s job=%u, rank=%u rts=%s s_credits=%"PRIi32"\n",
|
||||
(void *)endpoint, ep_addr_str,
|
||||
opal_process_name_jobid(endpoint->endpoint_proc->proc_opal->proc_name),
|
||||
opal_process_name_vpid(endpoint->endpoint_proc->proc_opal->proc_name),
|
||||
endpoint->endpoint_proc->proc_opal->proc_name.jobid,
|
||||
endpoint->endpoint_proc->proc_opal->proc_name.vpid,
|
||||
(endpoint->endpoint_ready_to_send ? "true" : "false"),
|
||||
endpoint->endpoint_send_credits);
|
||||
opal_output(0, " endpoint->frag_send_queue:\n");
|
||||
@ -1553,8 +1555,8 @@ void opal_btl_usnic_component_debug(void)
|
||||
opal_list_item_t *item;
|
||||
const opal_proc_t *proc = opal_proc_local_get();
|
||||
|
||||
opal_output(0, "*** dumping usnic state for MPI_COMM_WORLD rank %u ***\n",
|
||||
opal_process_name_vpid(proc->proc_name));
|
||||
opal_output(0, "*** dumping usnic state for MPI_COMM_WORLD rank %" PRIu32 " ***\n",
|
||||
proc->proc_name.vpid);
|
||||
for (i = 0; i < (int)mca_btl_usnic_component.num_modules; ++i) {
|
||||
module = mca_btl_usnic_component.usnic_active_modules[i];
|
||||
|
||||
|
@ -12,6 +12,8 @@
|
||||
* Copyright (c) 2006 Sandia National Laboratories. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -38,7 +40,7 @@ common_send_seg_helper(
|
||||
bseg = &seg->ss_base;
|
||||
|
||||
bseg->us_btl_header = (opal_btl_usnic_btl_header_t *)bseg->us_list.ptr;
|
||||
bseg->us_btl_header->sender = mca_btl_usnic_component.my_hashed_rte_name;
|
||||
bseg->us_btl_header->sender = mca_btl_usnic_component.my_name;
|
||||
|
||||
/* build verbs work request descriptor */
|
||||
seg->ss_send_desc.wr_id = (unsigned long) seg;
|
||||
|
@ -12,6 +12,8 @@
|
||||
* Copyright (c) 2006 Sandia National Laboratories. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -118,8 +120,8 @@ typedef enum {
|
||||
*/
|
||||
typedef struct {
|
||||
|
||||
/* Hashed RTE process name of the sender */
|
||||
uint64_t sender;
|
||||
/* process name of the sender */
|
||||
opal_process_name_t sender;
|
||||
|
||||
/* Sliding window sequence number (echoed back in an ACK). */
|
||||
opal_btl_usnic_seq_t pkt_seq;
|
||||
|
@ -1,6 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -206,7 +208,7 @@ static void map_output_procs(FILE *fp)
|
||||
|
||||
/* Loop over and print the sorted module device information */
|
||||
for (i = 0; i < num_procs; ++i) {
|
||||
fprintf(fp, "peer=%d,", opal_process_name_vpid(procs[i]->proc_opal->proc_name));
|
||||
fprintf(fp, "peer=%" PRIu32 ",", procs[i]->proc_opal->proc_name.vpid);
|
||||
fprintf(fp, "hostname=%s,", opal_get_proc_hostname(procs[i]->proc_opal));
|
||||
map_output_endpoints(fp, procs[i]);
|
||||
}
|
||||
@ -235,8 +237,8 @@ void opal_btl_usnic_connectivity_map(void)
|
||||
mca_btl_usnic_component.connectivity_map_prefix,
|
||||
opal_get_proc_hostname(opal_proc_local_get()),
|
||||
getpid(),
|
||||
opal_process_name_jobid(opal_proc_local_get()->proc_name),
|
||||
opal_process_name_vpid(opal_proc_local_get()->proc_name));
|
||||
opal_proc_local_get()->proc_name.jobid,
|
||||
opal_proc_local_get()->proc_name.vpid);
|
||||
if (NULL == filename) {
|
||||
/* JMS abort? */
|
||||
return;
|
||||
|
@ -12,6 +12,8 @@
|
||||
* Copyright (c) 2006 Sandia National Laboratories. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -135,7 +137,7 @@ typedef struct opal_btl_usnic_module_t {
|
||||
size_t max_tiny_payload; /* threshold for using inline send */
|
||||
|
||||
/** Hash table to keep track of senders */
|
||||
opal_hash_table_t senders;
|
||||
opal_proc_table_t senders;
|
||||
|
||||
/** local address information */
|
||||
struct opal_btl_usnic_addr_t local_addr;
|
||||
|
@ -13,6 +13,8 @@
|
||||
* reserved.
|
||||
* Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -131,7 +133,7 @@ opal_btl_usnic_proc_lookup_ompi(opal_proc_t* opal_proc)
|
||||
*/
|
||||
opal_btl_usnic_endpoint_t *
|
||||
opal_btl_usnic_proc_lookup_endpoint(opal_btl_usnic_module_t *receiver,
|
||||
uint64_t sender_proc_name)
|
||||
opal_process_name_t sender_proc_name)
|
||||
{
|
||||
opal_btl_usnic_proc_t *proc;
|
||||
opal_btl_usnic_endpoint_t *endpoint;
|
||||
@ -152,7 +154,7 @@ opal_btl_usnic_proc_lookup_endpoint(opal_btl_usnic_module_t *receiver,
|
||||
working to give handles instead of proc names, and then
|
||||
have a function pointer to perform comparisons. This would
|
||||
be bad here in the critical path, though... */
|
||||
if (proc->proc_opal->proc_name == sender_proc_name) {
|
||||
if (0 == opal_compare_proc(proc->proc_opal->proc_name, sender_proc_name)) {
|
||||
MSGDEBUG1_OUT("lookup_endpoint: matched endpoint=%p",
|
||||
(void *)endpoint);
|
||||
opal_mutex_unlock(&receiver->all_endpoints_lock);
|
||||
@ -576,8 +578,7 @@ static int match_modex(opal_btl_usnic_module_t *module,
|
||||
* sides are always setting up the exact same graph by always putting
|
||||
* the process with the lower (jobid,vpid) on the "left".
|
||||
*/
|
||||
proc_is_left = (proc->proc_opal->proc_name <
|
||||
opal_proc_local_get()->proc_name);
|
||||
proc_is_left = opal_compare_proc(proc->proc_opal->proc_name, opal_proc_local_get()->proc_name) < 0;
|
||||
|
||||
err = create_proc_module_graph(proc, proc_is_left, &g);
|
||||
if (OPAL_SUCCESS != err) {
|
||||
|
@ -12,6 +12,8 @@
|
||||
* Copyright (c) 2006 Sandia National Laboratories. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -85,7 +87,7 @@ struct opal_btl_usnic_module_t;
|
||||
|
||||
opal_btl_usnic_endpoint_t *
|
||||
opal_btl_usnic_proc_lookup_endpoint(struct opal_btl_usnic_module_t *receiver,
|
||||
uint64_t sender_hashed_rte_name);
|
||||
opal_process_name_t name);
|
||||
|
||||
int opal_btl_usnic_proc_match(opal_proc_t* opal_proc,
|
||||
struct opal_btl_usnic_module_t *module,
|
||||
|
@ -1,5 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -41,7 +43,7 @@ lookup_sender(opal_btl_usnic_module_t *module, opal_btl_usnic_segment_t *seg)
|
||||
btl_header->sender, echo back the ptr to the sender's
|
||||
ompi_proc. There was limited speedup with this scheme; more
|
||||
investigation is required. */
|
||||
ret = opal_hash_table_get_value_uint64(&module->senders,
|
||||
ret = opal_proc_table_get_value(&module->senders,
|
||||
seg->us_btl_header->sender,
|
||||
(void**) &sender);
|
||||
if (OPAL_LIKELY(OPAL_SUCCESS == ret)) {
|
||||
@ -53,7 +55,7 @@ lookup_sender(opal_btl_usnic_module_t *module, opal_btl_usnic_segment_t *seg)
|
||||
sender = opal_btl_usnic_proc_lookup_endpoint(module,
|
||||
seg->us_btl_header->sender);
|
||||
if (NULL != sender) {
|
||||
opal_hash_table_set_value_uint64(&module->senders,
|
||||
opal_proc_table_set_value(&module->senders,
|
||||
seg->us_btl_header->sender, sender);
|
||||
return sender;
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -84,7 +86,7 @@ void opal_btl_usnic_print_stats(
|
||||
/* The usuals */
|
||||
snprintf(str, sizeof(str), "%s:MCW:%3u, ST(P+D)/F/C/R(T+F)/A:%8lu(%8u+%8u)/%8lu/%8lu/%4lu(%4lu+%4lu)/%8lu, RcvTot/Chk/F/C/L/H/D/BF/A:%8lu/%c%c/%8lu/%8lu/%4lu+%2lu/%4lu/%4lu/%6lu OA/DA %4lu/%4lu CRC:%4lu ",
|
||||
prefix,
|
||||
opal_process_name_vpid(opal_proc_local_get()->proc_name),
|
||||
opal_proc_local_get()->proc_name.vpid,
|
||||
|
||||
module->stats.num_total_sends,
|
||||
module->mod_channels[USNIC_PRIORITY_CHANNEL].num_channel_sends,
|
||||
|
@ -289,7 +289,7 @@ static int vader_add_procs (struct mca_btl_base_module_t* btl,
|
||||
for (int32_t proc = 0, local_rank = 0 ; proc < (int32_t) nprocs ; ++proc) {
|
||||
/* check to see if this proc can be reached via shmem (i.e.,
|
||||
if they're on my local host and in my job) */
|
||||
if (opal_process_name_jobid(procs[proc]->proc_name) != opal_process_name_jobid(my_proc->proc_name) ||
|
||||
if (procs[proc]->proc_name.jobid != my_proc->proc_name.jobid ||
|
||||
!OPAL_PROC_ON_LOCAL_NODE(procs[proc]->proc_flags)) {
|
||||
peers[proc] = NULL;
|
||||
continue;
|
||||
|
@ -353,7 +353,7 @@ static int xoob_context_init(opal_common_ofacm_xoob_local_connection_context_t *
|
||||
(opal_common_ofacm_base_module_t *)xcpc;
|
||||
|
||||
/* Set IB address for this context */
|
||||
xcontext->addr = xoob_ib_address_add_new(xcpc, rem_lid, subnet_id, opal_process_name_jobid(proc->proc_opal->proc_name));
|
||||
xcontext->addr = xoob_ib_address_add_new(xcpc, rem_lid, subnet_id, proc->proc_opal->proc_name.jobid);
|
||||
if (NULL == xcontext->addr) {
|
||||
OFACM_ERROR(("Failed to allocate or found xoob ib address"));
|
||||
return OPAL_ERROR;
|
||||
@ -1090,8 +1090,8 @@ static opal_common_ofacm_xoob_local_connection_context_t* xoob_find_context
|
||||
&opal_common_ofacm_xoob.all_procs;
|
||||
|
||||
OFACM_VERBOSE(("Searching for ep and proc with follow parameters:"
|
||||
"jobid %d, vpid %d, sid %d, lid %d, cpc type %d",
|
||||
opal_process_name_jobid(*process_name), opal_process_name_vpid(*process_name), subnet_id, lid, cpc_type));
|
||||
"jobid %" PRIu32 ", vpid %" PRIu32 ", sid %d, lid %d, cpc type %d",
|
||||
process_name->jobid, process_name->vpid, subnet_id, lid, cpc_type));
|
||||
/* find ibproc */
|
||||
for (context_proc = (opal_common_ofacm_base_proc_t*)opal_list_get_first(all_procs);
|
||||
context_proc != (opal_common_ofacm_base_proc_t*)opal_list_get_end(all_procs);
|
||||
|
@ -4,6 +4,8 @@
|
||||
* reserved.
|
||||
* Copyright (c) 2011 UT-Battelle, LLC. All rights reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
|
@ -2,6 +2,8 @@
|
||||
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
|
||||
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -24,6 +26,7 @@
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "opal/class/opal_pointer_array.h"
|
||||
#include "opal/dss/dss.h"
|
||||
#include "opal/util/proc.h"
|
||||
|
||||
#include "opal/mca/dstore/dstore.h"
|
||||
|
||||
@ -104,21 +107,20 @@ OPAL_DECLSPEC int opal_dstore_base_open(const char *name, char* desired_componen
|
||||
OPAL_DECLSPEC int opal_dstore_base_update(int dstorehandle, opal_list_t *attrs);
|
||||
OPAL_DECLSPEC int opal_dstore_base_close(int dstorehandle);
|
||||
OPAL_DECLSPEC int opal_dstore_base_store(int dstorehandle,
|
||||
const opal_identifier_t *id,
|
||||
const opal_process_name_t *id,
|
||||
opal_value_t *kv);
|
||||
OPAL_DECLSPEC int opal_dstore_base_fetch(int dstorehandle,
|
||||
const opal_identifier_t *id,
|
||||
const opal_process_name_t *id,
|
||||
const char *key,
|
||||
opal_list_t *kvs);
|
||||
OPAL_DECLSPEC int opal_dstore_base_remove_data(int dstorehandle,
|
||||
const opal_identifier_t *id,
|
||||
const opal_process_name_t *id,
|
||||
const char *key);
|
||||
OPAL_DECLSPEC int opal_dstore_base_get_handle(int dstorehandle, void **dhdl);
|
||||
|
||||
/* support */
|
||||
OPAL_DECLSPEC opal_dstore_proc_data_t* opal_dstore_base_lookup_proc(opal_hash_table_t *jtable,
|
||||
opal_identifier_t id);
|
||||
|
||||
OPAL_DECLSPEC opal_dstore_proc_data_t* opal_dstore_base_lookup_proc(opal_proc_table_t *jtable,
|
||||
opal_process_name_t id);
|
||||
|
||||
OPAL_DECLSPEC opal_value_t* opal_dstore_base_lookup_keyval(opal_dstore_proc_data_t *proc_data,
|
||||
const char *key);
|
||||
|
@ -3,6 +3,8 @@
|
||||
* Copyright (c) 2013-2014 Intel Inc. All rights reserved
|
||||
* Copyright (c) 2014 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -116,7 +118,7 @@ int opal_dstore_base_close(int dstorehandle)
|
||||
|
||||
|
||||
int opal_dstore_base_store(int dstorehandle,
|
||||
const opal_identifier_t *id,
|
||||
const opal_process_name_t *id,
|
||||
opal_value_t *kv)
|
||||
{
|
||||
opal_dstore_handle_t *hdl;
|
||||
@ -137,7 +139,7 @@ int opal_dstore_base_store(int dstorehandle,
|
||||
}
|
||||
|
||||
int opal_dstore_base_fetch(int dstorehandle,
|
||||
const opal_identifier_t *id,
|
||||
const opal_process_name_t *id,
|
||||
const char *key,
|
||||
opal_list_t *kvs)
|
||||
{
|
||||
@ -170,7 +172,7 @@ int opal_dstore_base_fetch(int dstorehandle,
|
||||
}
|
||||
|
||||
int opal_dstore_base_remove_data(int dstorehandle,
|
||||
const opal_identifier_t *id,
|
||||
const opal_process_name_t *id,
|
||||
const char *key)
|
||||
{
|
||||
opal_dstore_handle_t *hdl;
|
||||
@ -223,13 +225,14 @@ opal_value_t* opal_dstore_base_lookup_keyval(opal_dstore_proc_data_t *proc_data,
|
||||
|
||||
/**
|
||||
* Find proc_data_t container associated with given
|
||||
* opal_identifier_t.
|
||||
* opal_process_name_t.
|
||||
*/
|
||||
opal_dstore_proc_data_t* opal_dstore_base_lookup_proc(opal_hash_table_t *jtable, opal_identifier_t id)
|
||||
opal_dstore_proc_data_t* opal_dstore_base_lookup_proc(opal_proc_table_t *ptable,
|
||||
opal_process_name_t id)
|
||||
{
|
||||
opal_dstore_proc_data_t *proc_data = NULL;
|
||||
|
||||
opal_hash_table_get_value_uint64(jtable, id, (void**)&proc_data);
|
||||
opal_proc_table_get_value(ptable, id, (void**)&proc_data);
|
||||
if (NULL == proc_data) {
|
||||
/* The proc clearly exists, so create a data structure for it */
|
||||
proc_data = OBJ_NEW(opal_dstore_proc_data_t);
|
||||
@ -237,7 +240,7 @@ opal_dstore_proc_data_t* opal_dstore_base_lookup_proc(opal_hash_table_t *jtable,
|
||||
opal_output(0, "dstore:hash:lookup_opal_proc: unable to allocate proc_data_t\n");
|
||||
return NULL;
|
||||
}
|
||||
opal_hash_table_set_value_uint64(jtable, id, proc_data);
|
||||
opal_proc_table_set_value(ptable, id, proc_data);
|
||||
}
|
||||
|
||||
return proc_data;
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "opal/mca/mca.h"
|
||||
#include "opal/mca/event/event.h"
|
||||
#include "opal/dss/dss_types.h"
|
||||
#include "opal/util/proc.h"
|
||||
|
||||
#include "opal/mca/dstore/dstore_types.h"
|
||||
|
||||
@ -90,7 +91,7 @@ typedef int (*opal_dstore_base_API_close_fn_t)(int dstorehandle);
|
||||
* and therefore does not need to be preserved by the caller.
|
||||
*/
|
||||
typedef int (*opal_dstore_base_API_store_fn_t)(int dstorehandle,
|
||||
const opal_identifier_t *id,
|
||||
const opal_process_name_t *id,
|
||||
opal_value_t *kv);
|
||||
|
||||
/*
|
||||
@ -101,7 +102,7 @@ typedef int (*opal_dstore_base_API_store_fn_t)(int dstorehandle,
|
||||
* of opal_value_t objects.
|
||||
*/
|
||||
typedef int (*opal_dstore_base_API_fetch_fn_t)(int dstorehandle,
|
||||
const opal_identifier_t *id,
|
||||
const opal_process_name_t *id,
|
||||
const char *key,
|
||||
opal_list_t *kvs);
|
||||
|
||||
@ -112,7 +113,7 @@ typedef int (*opal_dstore_base_API_fetch_fn_t)(int dstorehandle,
|
||||
* If a NULL key is provided, all data for the given primary key will be deleted.
|
||||
*/
|
||||
typedef int (*opal_dstore_base_API_remove_fn_t)(int dstorehandle,
|
||||
const opal_identifier_t *id,
|
||||
const opal_process_name_t *id,
|
||||
const char *key);
|
||||
|
||||
|
||||
@ -162,18 +163,18 @@ typedef void (*opal_dstore_base_module_finalize_fn_t)(struct opal_dstore_base_mo
|
||||
|
||||
/* store the data in this module */
|
||||
typedef int (*opal_dstore_base_module_store_fn_t)(struct opal_dstore_base_module_t *mod,
|
||||
const opal_identifier_t *id,
|
||||
const opal_process_name_t *id,
|
||||
opal_value_t *kv);
|
||||
|
||||
/* fetch data from the module */
|
||||
typedef int (*opal_dstore_base_module_fetch_fn_t)(struct opal_dstore_base_module_t *mod,
|
||||
const opal_identifier_t *id,
|
||||
const opal_process_name_t *id,
|
||||
const char *key,
|
||||
opal_list_t *kvs);
|
||||
|
||||
/* remove data */
|
||||
typedef int (*opal_dstore_base_module_remove_fn_t)(struct opal_dstore_base_module_t *mod,
|
||||
const opal_identifier_t *id,
|
||||
const opal_process_name_t *id,
|
||||
const char *key);
|
||||
|
||||
/*
|
||||
|
@ -6,6 +6,9 @@
|
||||
* reserved.
|
||||
* Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -35,14 +38,14 @@
|
||||
static int init(struct opal_dstore_base_module_t *imod);
|
||||
static void finalize(struct opal_dstore_base_module_t *imod);
|
||||
static int store(struct opal_dstore_base_module_t *imod,
|
||||
const opal_identifier_t *proc,
|
||||
const opal_process_name_t *proc,
|
||||
opal_value_t *val);
|
||||
static int fetch(struct opal_dstore_base_module_t *imod,
|
||||
const opal_identifier_t *proc,
|
||||
const opal_process_name_t *proc,
|
||||
const char *key,
|
||||
opal_list_t *kvs);
|
||||
static int remove_data(struct opal_dstore_base_module_t *imod,
|
||||
const opal_identifier_t *proc, const char *key);
|
||||
const opal_process_name_t *proc, const char *key);
|
||||
|
||||
mca_dstore_hash_module_t opal_dstore_hash_module = {
|
||||
{
|
||||
@ -60,16 +63,16 @@ static int init(struct opal_dstore_base_module_t *imod)
|
||||
mca_dstore_hash_module_t *mod;
|
||||
|
||||
mod = (mca_dstore_hash_module_t*)imod;
|
||||
OBJ_CONSTRUCT(&mod->hash_data, opal_hash_table_t);
|
||||
opal_hash_table_init(&mod->hash_data, 256);
|
||||
OBJ_CONSTRUCT(&mod->ptable, opal_proc_table_t);
|
||||
opal_proc_table_init(&mod->ptable, 16, 256);
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
static void finalize(struct opal_dstore_base_module_t *imod)
|
||||
{
|
||||
opal_dstore_proc_data_t *proc_data;
|
||||
uint64_t key;
|
||||
char *node;
|
||||
opal_process_name_t key;
|
||||
void *node1, *node2;
|
||||
mca_dstore_hash_module_t *mod;
|
||||
|
||||
mod = (mca_dstore_hash_module_t*)imod;
|
||||
@ -77,50 +80,47 @@ static void finalize(struct opal_dstore_base_module_t *imod)
|
||||
/* to assist in getting a clean valgrind, cycle thru the hash table
|
||||
* and release all data stored in it
|
||||
*/
|
||||
if (OPAL_SUCCESS == opal_hash_table_get_first_key_uint64(&mod->hash_data, &key,
|
||||
if (OPAL_SUCCESS == opal_proc_table_get_first_key(&mod->ptable, &key,
|
||||
(void**)&proc_data,
|
||||
(void**)&node)) {
|
||||
&node1, &node2)) {
|
||||
if (NULL != proc_data) {
|
||||
OBJ_RELEASE(proc_data);
|
||||
}
|
||||
while (OPAL_SUCCESS == opal_hash_table_get_next_key_uint64(&mod->hash_data, &key,
|
||||
while (OPAL_SUCCESS == opal_proc_table_get_next_key(&mod->ptable, &key,
|
||||
(void**)&proc_data,
|
||||
node, (void**)&node)) {
|
||||
node1, &node1,
|
||||
node2, &node2)) {
|
||||
if (NULL != proc_data) {
|
||||
OBJ_RELEASE(proc_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
OBJ_DESTRUCT(&mod->hash_data);
|
||||
OBJ_DESTRUCT(&mod->ptable);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int store(struct opal_dstore_base_module_t *imod,
|
||||
const opal_identifier_t *uid,
|
||||
const opal_process_name_t *id,
|
||||
opal_value_t *val)
|
||||
{
|
||||
opal_dstore_proc_data_t *proc_data;
|
||||
opal_value_t *kv;
|
||||
opal_identifier_t id;
|
||||
mca_dstore_hash_module_t *mod;
|
||||
int rc;
|
||||
|
||||
mod = (mca_dstore_hash_module_t*)imod;
|
||||
|
||||
/* to protect alignment, copy the identifier across */
|
||||
memcpy(&id, uid, sizeof(opal_identifier_t));
|
||||
|
||||
opal_output_verbose(1, opal_dstore_base_framework.framework_output,
|
||||
"%s dstore:hash:store storing data for proc %s",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), OPAL_NAME_PRINT(id));
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), OPAL_NAME_PRINT(*id));
|
||||
|
||||
/* lookup the proc data object for this proc */
|
||||
if (NULL == (proc_data = opal_dstore_base_lookup_proc(&mod->hash_data, id))) {
|
||||
if (NULL == (proc_data = opal_dstore_base_lookup_proc(&mod->ptable, *id))) {
|
||||
/* unrecoverable error */
|
||||
OPAL_OUTPUT_VERBOSE((5, opal_dstore_base_framework.framework_output,
|
||||
"%s dstore:hash:store: storing data for proc %s unrecoverably failed",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), OPAL_NAME_PRINT(id)));
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), OPAL_NAME_PRINT(*id)));
|
||||
return OPAL_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@ static int store(struct opal_dstore_base_module_t *imod,
|
||||
"%s dstore:hash:store: %s key %s[%s] for proc %s",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
(NULL == kv ? "storing" : "updating"),
|
||||
val->key, _data_type, OPAL_NAME_PRINT(id)));
|
||||
val->key, _data_type, OPAL_NAME_PRINT(*id)));
|
||||
free (_data_type);
|
||||
#endif
|
||||
|
||||
@ -153,31 +153,27 @@ static int store(struct opal_dstore_base_module_t *imod,
|
||||
}
|
||||
|
||||
static int fetch(struct opal_dstore_base_module_t *imod,
|
||||
const opal_identifier_t *uid,
|
||||
const opal_process_name_t *id,
|
||||
const char *key, opal_list_t *kvs)
|
||||
{
|
||||
opal_dstore_proc_data_t *proc_data;
|
||||
opal_value_t *kv, *knew;
|
||||
opal_identifier_t id;
|
||||
mca_dstore_hash_module_t *mod;
|
||||
int rc;
|
||||
|
||||
mod = (mca_dstore_hash_module_t*)imod;
|
||||
|
||||
/* to protect alignment, copy the identifier across */
|
||||
memcpy(&id, uid, sizeof(opal_identifier_t));
|
||||
|
||||
OPAL_OUTPUT_VERBOSE((5, opal_dstore_base_framework.framework_output,
|
||||
"%s dstore:hash:fetch: searching for key %s on proc %s",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
(NULL == key) ? "NULL" : key, OPAL_NAME_PRINT(id)));
|
||||
(NULL == key) ? "NULL" : key, OPAL_NAME_PRINT(*id)));
|
||||
|
||||
/* lookup the proc data object for this proc */
|
||||
if (NULL == (proc_data = opal_dstore_base_lookup_proc(&mod->hash_data, id))) {
|
||||
if (NULL == (proc_data = opal_dstore_base_lookup_proc(&mod->ptable, *id))) {
|
||||
OPAL_OUTPUT_VERBOSE((5, opal_dstore_base_framework.framework_output,
|
||||
"%s dstore_hash:fetch data for proc %s not found",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
OPAL_NAME_PRINT(id)));
|
||||
OPAL_NAME_PRINT(*id)));
|
||||
return OPAL_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
@ -193,7 +189,7 @@ static int fetch(struct opal_dstore_base_module_t *imod,
|
||||
"%s dstore:hash:fetch: adding data for key %s on proc %s",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
(NULL == kv->key) ? "NULL" : kv->key,
|
||||
OPAL_NAME_PRINT(id)));
|
||||
OPAL_NAME_PRINT(*id)));
|
||||
|
||||
/* add it to the output list */
|
||||
opal_list_append(kvs, &knew->super);
|
||||
@ -207,7 +203,7 @@ static int fetch(struct opal_dstore_base_module_t *imod,
|
||||
"%s dstore_hash:fetch key %s for proc %s not found",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
(NULL == key) ? "NULL" : key,
|
||||
OPAL_NAME_PRINT(id)));
|
||||
OPAL_NAME_PRINT(*id)));
|
||||
return OPAL_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
@ -223,20 +219,16 @@ static int fetch(struct opal_dstore_base_module_t *imod,
|
||||
}
|
||||
|
||||
static int remove_data(struct opal_dstore_base_module_t *imod,
|
||||
const opal_identifier_t *uid, const char *key)
|
||||
const opal_process_name_t *id, const char *key)
|
||||
{
|
||||
opal_dstore_proc_data_t *proc_data;
|
||||
opal_value_t *kv;
|
||||
opal_identifier_t id;
|
||||
mca_dstore_hash_module_t *mod;
|
||||
|
||||
mod = (mca_dstore_hash_module_t*)imod;
|
||||
|
||||
/* to protect alignment, copy the identifier across */
|
||||
memcpy(&id, uid, sizeof(opal_identifier_t));
|
||||
|
||||
/* lookup the specified proc */
|
||||
if (NULL == (proc_data = opal_dstore_base_lookup_proc(&mod->hash_data, id))) {
|
||||
if (NULL == (proc_data = opal_dstore_base_lookup_proc(&mod->ptable, *id))) {
|
||||
/* no data for this proc */
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
@ -247,7 +239,7 @@ static int remove_data(struct opal_dstore_base_module_t *imod,
|
||||
OBJ_RELEASE(kv);
|
||||
}
|
||||
/* remove the proc_data object itself from the jtable */
|
||||
opal_hash_table_remove_value_uint64(&mod->hash_data, id);
|
||||
opal_proc_table_remove_value(&mod->ptable, *id);
|
||||
/* cleanup */
|
||||
OBJ_RELEASE(proc_data);
|
||||
return OPAL_SUCCESS;
|
||||
|
@ -2,6 +2,8 @@
|
||||
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -22,7 +24,7 @@ OPAL_MODULE_DECLSPEC extern opal_dstore_base_component_t mca_dstore_hash_compone
|
||||
|
||||
typedef struct {
|
||||
opal_dstore_base_module_t api;
|
||||
opal_hash_table_t hash_data;
|
||||
opal_proc_table_t ptable;
|
||||
} mca_dstore_hash_module_t;
|
||||
OPAL_MODULE_DECLSPEC extern mca_dstore_hash_module_t opal_dstore_hash_module;
|
||||
|
||||
|
@ -34,14 +34,14 @@ static int32_t cur_seg_index = -1;
|
||||
static int init(struct opal_dstore_base_module_t *imod);
|
||||
static void finalize(struct opal_dstore_base_module_t *imod);
|
||||
static int store(struct opal_dstore_base_module_t *imod,
|
||||
const opal_identifier_t *proc,
|
||||
const opal_process_name_t *proc,
|
||||
opal_value_t *val);
|
||||
static int fetch(struct opal_dstore_base_module_t *imod,
|
||||
const opal_identifier_t *proc,
|
||||
const opal_process_name_t *proc,
|
||||
const char *key,
|
||||
opal_list_t *kvs);
|
||||
static int remove_data(struct opal_dstore_base_module_t *imod,
|
||||
const opal_identifier_t *proc, const char *key);
|
||||
const opal_process_name_t *proc, const char *key);
|
||||
|
||||
static void smtrkcon(opal_sm_tracker_t *p)
|
||||
{
|
||||
@ -125,7 +125,7 @@ static void finalize(struct opal_dstore_base_module_t *imod)
|
||||
|
||||
|
||||
static int store(struct opal_dstore_base_module_t *imod,
|
||||
const opal_identifier_t *uid,
|
||||
const opal_process_name_t *uid,
|
||||
opal_value_t *val)
|
||||
{
|
||||
mca_dstore_sm_module_t *mod;
|
||||
@ -147,10 +147,10 @@ static int store(struct opal_dstore_base_module_t *imod,
|
||||
mod = (mca_dstore_sm_module_t*)imod;
|
||||
data_size = val->data.bo.size;
|
||||
|
||||
idx = opal_process_name_vpid(*uid);
|
||||
idx = uid->vpid;
|
||||
/* look for segment info for target jobid */
|
||||
OPAL_LIST_FOREACH(trk, &mod->tracklist, opal_sm_tracker_t) {
|
||||
if (trk->jobid == opal_process_name_jobid(*uid)) {
|
||||
if (trk->jobid == uid->jobid) {
|
||||
found_trk = true;
|
||||
break;
|
||||
}
|
||||
@ -159,7 +159,7 @@ static int store(struct opal_dstore_base_module_t *imod,
|
||||
opal_output_verbose(0, opal_dstore_base_framework.framework_output,
|
||||
"%s dstore:sm:store: tracker object wasn't found for job id %u, proc %s",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
opal_process_name_jobid(*uid),
|
||||
uid->jobid,
|
||||
OPAL_NAME_PRINT(*uid));
|
||||
return OPAL_ERROR;
|
||||
}
|
||||
@ -304,7 +304,7 @@ static int store(struct opal_dstore_base_module_t *imod,
|
||||
}
|
||||
|
||||
static int fetch(struct opal_dstore_base_module_t *imod,
|
||||
const opal_identifier_t *uid,
|
||||
const opal_process_name_t *uid,
|
||||
const char *key, opal_list_t *kvs)
|
||||
{
|
||||
int rc;
|
||||
@ -328,7 +328,7 @@ static int fetch(struct opal_dstore_base_module_t *imod,
|
||||
mod = (mca_dstore_sm_module_t*)imod;
|
||||
/* look for segment info for target jobid */
|
||||
OPAL_LIST_FOREACH(trk, &mod->tracklist, opal_sm_tracker_t) {
|
||||
if (trk->jobid == opal_process_name_jobid(*uid)) {
|
||||
if (trk->jobid == uid->jobid) {
|
||||
found_trk = true;
|
||||
break;
|
||||
}
|
||||
@ -337,12 +337,12 @@ static int fetch(struct opal_dstore_base_module_t *imod,
|
||||
opal_output_verbose(0, opal_dstore_base_framework.framework_output,
|
||||
"%s dstore:sm:fetch: tracker object wasn't found for job id %u, proc %s",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
opal_process_name_jobid(*uid),
|
||||
uid->jobid,
|
||||
OPAL_NAME_PRINT(*uid));
|
||||
return OPAL_ERROR;
|
||||
}
|
||||
/* look for data for this process in meta_info segment */
|
||||
idx = opal_process_name_vpid(*uid);
|
||||
idx = uid->vpid;
|
||||
addr = ((uint8_t*)trk->addr + META_OFFSET + idx * sizeof(meta_info));
|
||||
memcpy(&my_info, addr, sizeof(meta_info));
|
||||
if (0 == my_info.data_size) {
|
||||
@ -422,7 +422,7 @@ static int fetch(struct opal_dstore_base_module_t *imod,
|
||||
}
|
||||
|
||||
static int remove_data(struct opal_dstore_base_module_t *imod,
|
||||
const opal_identifier_t *uid, const char *key)
|
||||
const opal_process_name_t *uid, const char *key)
|
||||
{
|
||||
return OPAL_ERR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ int opal_pmix_base_partial_commit_packed( char** data, int* data_offset,
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
int opal_pmix_base_get_packed(const opal_identifier_t* proc, char **packed_data,
|
||||
int opal_pmix_base_get_packed(const opal_process_name_t* proc, char **packed_data,
|
||||
size_t *len, int vallen, kvs_get_fn fn)
|
||||
{
|
||||
char *tmp_encoded = NULL, *pmikey, *pmi_tmp;
|
||||
@ -362,7 +362,7 @@ int opal_pmix_base_get_packed(const opal_identifier_t* proc, char **packed_data,
|
||||
return rc;
|
||||
}
|
||||
|
||||
int opal_pmix_base_cache_keys_locally(const opal_identifier_t* id, const char* key,
|
||||
int opal_pmix_base_cache_keys_locally(const opal_process_name_t* id, const char* key,
|
||||
opal_value_t **out_kv, char* kvs_name,
|
||||
int vallen, kvs_get_fn fn)
|
||||
{
|
||||
@ -393,8 +393,8 @@ int opal_pmix_base_cache_keys_locally(const opal_identifier_t* id, const char* k
|
||||
OPAL_LIST_DESTRUCT(&values);
|
||||
|
||||
OPAL_OUTPUT_VERBOSE((1, opal_pmix_base_framework.framework_output,
|
||||
"pmix: get all keys for proc %" PRIu64 " in KVS %s",
|
||||
*id, kvs_name));
|
||||
"pmix: get all keys for proc %s in KVS %s",
|
||||
OPAL_NAME_PRINT(*id), kvs_name));
|
||||
|
||||
rc = opal_pmix_base_get_packed(id, &tmp_val, &len, vallen, fn);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
@ -506,8 +506,8 @@ static char* setup_key(const opal_process_name_t* name, const char *key, int pmi
|
||||
{
|
||||
char *pmi_kvs_key;
|
||||
|
||||
if (pmix_keylen_max <= asprintf(&pmi_kvs_key, "%" PRIu64 "-%s",
|
||||
*name, key)) {
|
||||
if (pmix_keylen_max <= asprintf(&pmi_kvs_key, "%" PRIu32 "-%" PRIu32 "-%s",
|
||||
name->jobid, name->vpid, key)) {
|
||||
free(pmi_kvs_key);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -30,9 +30,9 @@ OPAL_DECLSPEC int opal_pmix_base_commit_packed(char** data, int* data_offset,
|
||||
OPAL_DECLSPEC int opal_pmix_base_partial_commit_packed(char** data, int* data_offset,
|
||||
char** enc_data, int* enc_data_offset,
|
||||
int max_key, int* pack_key, kvs_put_fn fn);
|
||||
OPAL_DECLSPEC int opal_pmix_base_cache_keys_locally(const opal_identifier_t* id, const char* key,
|
||||
OPAL_DECLSPEC int opal_pmix_base_cache_keys_locally(const opal_process_name_t* id, const char* key,
|
||||
opal_value_t **out_kv, char* kvs_name, int vallen, kvs_get_fn fn);
|
||||
OPAL_DECLSPEC int opal_pmix_base_get_packed(const opal_identifier_t* proc, char **packed_data,
|
||||
OPAL_DECLSPEC int opal_pmix_base_get_packed(const opal_process_name_t* proc, char **packed_data,
|
||||
size_t *len, int vallen, kvs_get_fn fn);
|
||||
|
||||
END_C_DECLS
|
||||
|
@ -6,6 +6,8 @@
|
||||
* Copyright (c) 2011-2013 Los Alamos National Security, LLC. All
|
||||
* rights reserved.
|
||||
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -33,11 +35,6 @@
|
||||
#include "opal/mca/pmix/base/base.h"
|
||||
#include "pmix_cray.h"
|
||||
|
||||
typedef struct {
|
||||
uint32_t jid;
|
||||
uint32_t vid;
|
||||
} pmix_pname_t;
|
||||
|
||||
static int cray_init(void);
|
||||
static int cray_fini(void);
|
||||
static bool cray_initialized(void);
|
||||
@ -53,7 +50,7 @@ static int cray_job_connect(const char jobId[]);
|
||||
static int cray_job_disconnect(const char jobId[]);
|
||||
static int cray_put(opal_pmix_scope_t scope, opal_value_t *kv);
|
||||
static int cray_fence(opal_process_name_t *procs, size_t nprocs);
|
||||
static int cray_get(const opal_identifier_t *id,
|
||||
static int cray_get(const opal_process_name_t *id,
|
||||
const char *key,
|
||||
opal_value_t **kv);
|
||||
static int cray_publish(const char service_name[],
|
||||
@ -115,7 +112,7 @@ static int pmix_appnum = 0;
|
||||
static int pmix_usize = 0;
|
||||
static char *pmix_kvs_name = NULL;
|
||||
static int *pmix_lranks = NULL;
|
||||
static pmix_pname_t pmix_pname;
|
||||
static opal_process_name_t pmix_pname;
|
||||
static uint32_t pmix_jobid = -1;
|
||||
|
||||
|
||||
@ -199,12 +196,12 @@ static int cray_init(void)
|
||||
* debug messages will make sense - an upper
|
||||
* layer will eventually overwrite it, but that
|
||||
* won't do any harm */
|
||||
pmix_pname.jid = pmix_jobid;
|
||||
pmix_pname.vid = pmix_rank;
|
||||
opal_proc_set_name((opal_process_name_t*)&pmix_pname);
|
||||
pmix_pname.jobid = pmix_jobid;
|
||||
pmix_pname.vpid = pmix_rank;
|
||||
opal_proc_set_name(&pmix_pname);
|
||||
opal_output_verbose(10, opal_pmix_base_framework.framework_output,
|
||||
"%s pmix:cray: assigned tmp name %d %d pmix_kvs_name %s",
|
||||
OPAL_NAME_PRINT(*(opal_process_name_t*)&pmix_pname),pmix_pname.jid,pmix_pname.vid,pmix_kvs_name);
|
||||
OPAL_NAME_PRINT(pmix_pname),pmix_pname.jobid,pmix_pname.vpid,pmix_kvs_name);
|
||||
|
||||
pmapping = (char*)malloc(PMI2_MAX_VALLEN);
|
||||
if( pmapping == NULL ){
|
||||
@ -432,8 +429,8 @@ static int cray_fence(opal_process_name_t *procs, size_t nprocs)
|
||||
/* we only need to set locality for each local rank as "not found"
|
||||
* equates to "non-local" */
|
||||
for (i=0; i < pmix_nlranks; i++) {
|
||||
pmix_pname.vid = pmix_lranks[i];
|
||||
rc = opal_pmix_base_cache_keys_locally((opal_identifier_t*)&pmix_pname, OPAL_DSTORE_CPUSET,
|
||||
pmix_pname.vpid = pmix_lranks[i];
|
||||
rc = opal_pmix_base_cache_keys_locally(&pmix_pname, OPAL_DSTORE_CPUSET,
|
||||
&kp, pmix_kvs_name, pmix_vallen_max, kvs_get);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OPAL_ERROR_LOG(rc);
|
||||
@ -461,14 +458,14 @@ static int cray_fence(opal_process_name_t *procs, size_t nprocs)
|
||||
OPAL_OUTPUT_VERBOSE((1, opal_pmix_base_framework.framework_output,
|
||||
"%s pmix:s2 proc %s locality %s",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
OPAL_NAME_PRINT(*(opal_identifier_t*)&pmix_pname),
|
||||
OPAL_NAME_PRINT(pmix_pname),
|
||||
opal_hwloc_base_print_locality(locality)));
|
||||
|
||||
OBJ_CONSTRUCT(&kvn, opal_value_t);
|
||||
kvn.key = strdup(OPAL_DSTORE_LOCALITY);
|
||||
kvn.type = OPAL_UINT16;
|
||||
kvn.data.uint16 = locality;
|
||||
(void)opal_dstore.store(opal_dstore_internal, (opal_identifier_t*)&pmix_pname, &kvn);
|
||||
(void)opal_dstore.store(opal_dstore_internal, &pmix_pname, &kvn);
|
||||
OBJ_DESTRUCT(&kvn);
|
||||
}
|
||||
}
|
||||
@ -511,7 +508,7 @@ static int kvs_get(const char key[], char value [], int maxvalue)
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
static int cray_get(const opal_identifier_t *id, const char *key, opal_value_t **kv)
|
||||
static int cray_get(const opal_process_name_t *id, const char *key, opal_value_t **kv)
|
||||
{
|
||||
int rc;
|
||||
rc = opal_pmix_base_cache_keys_locally(id, key, kv, pmix_kvs_name, pmix_vallen_max, kvs_get);
|
||||
|
@ -46,10 +46,10 @@ static int native_fence_nb(opal_process_name_t *procs, size_t nprocs,
|
||||
opal_pmix_cbfunc_t cbfunc, void *cbdata);
|
||||
static int native_put(opal_pmix_scope_t scope,
|
||||
opal_value_t *kv);
|
||||
static int native_get(const opal_identifier_t *id,
|
||||
static int native_get(const opal_process_name_t *id,
|
||||
const char *key,
|
||||
opal_value_t **kv);
|
||||
static void native_get_nb(const opal_identifier_t *id,
|
||||
static void native_get_nb(const opal_process_name_t *id,
|
||||
const char *key,
|
||||
opal_pmix_cbfunc_t cbfunc,
|
||||
void *cbdata);
|
||||
@ -99,23 +99,20 @@ const opal_pmix_base_module_t opal_pmix_native_module = {
|
||||
|
||||
// local variables
|
||||
static int init_cntr = 0;
|
||||
static struct {
|
||||
uint32_t jid;
|
||||
uint32_t vid;
|
||||
} native_pname;
|
||||
opal_process_name_t native_pname;
|
||||
static char *local_uri = NULL;
|
||||
static uint32_t sm_flag;
|
||||
|
||||
static void unpack_segment_info(opal_buffer_t *buf, opal_identifier_t *id, char** seg_info)
|
||||
static void unpack_segment_info(opal_buffer_t *buf, opal_process_name_t *id, char** seg_info)
|
||||
{
|
||||
int cnt;
|
||||
int rc;
|
||||
char *sinfo;
|
||||
opal_identifier_t uid;
|
||||
opal_process_name_t uid;
|
||||
*seg_info = NULL;
|
||||
/* extract the id of the contributor from the blob */
|
||||
cnt = 1;
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.unpack(buf, &uid, &cnt, OPAL_UINT64))) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.unpack(buf, &uid, &cnt, OPAL_NAME))) {
|
||||
if (OPAL_ERR_UNPACK_READ_PAST_END_OF_BUFFER == rc) {
|
||||
return;
|
||||
}
|
||||
@ -223,7 +220,7 @@ static int native_init(void)
|
||||
if (0 != access(uri[1], R_OK)) {
|
||||
return OPAL_ERR_NOT_FOUND;
|
||||
}
|
||||
mca_pmix_native_component.server = strtoull(uri[0], NULL, 10);
|
||||
opal_convert_string_to_process_name(&mca_pmix_native_component.server, uri[0]);
|
||||
snprintf(mca_pmix_native_component.address.sun_path,
|
||||
sizeof(mca_pmix_native_component.address.sun_path)-1,
|
||||
"%s", uri[1]);
|
||||
@ -251,7 +248,7 @@ static int native_init(void)
|
||||
/* error out - should have been here, but isn't */
|
||||
return OPAL_ERROR;
|
||||
}
|
||||
rc = pmix_sm_attach(opal_process_name_jobid(OPAL_PROC_MY_NAME), seg_info);
|
||||
rc = pmix_sm_attach(OPAL_PROC_MY_NAME.jobid, seg_info);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
/* error out - should have shared memory segment attached */
|
||||
return OPAL_ERROR;
|
||||
@ -458,7 +455,7 @@ static int native_fence(opal_process_name_t *procs, size_t nprocs)
|
||||
opal_pmix_scope_t scope;
|
||||
int32_t cnt;
|
||||
opal_value_t *kp;
|
||||
opal_identifier_t id;
|
||||
opal_process_name_t id;
|
||||
size_t i;
|
||||
uint64_t np;
|
||||
char *seg_info;
|
||||
@ -486,7 +483,7 @@ static int native_fence(opal_process_name_t *procs, size_t nprocs)
|
||||
return rc;
|
||||
}
|
||||
if (0 < nprocs) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(msg, procs, nprocs, OPAL_UINT64))) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(msg, procs, nprocs, OPAL_NAME))) {
|
||||
OPAL_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(msg);
|
||||
return rc;
|
||||
@ -588,7 +585,7 @@ static int native_fence(opal_process_name_t *procs, size_t nprocs)
|
||||
}
|
||||
/* extract the id of the contributor from the blob */
|
||||
cnt = 1;
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.unpack(msg, &id, &cnt, OPAL_UINT64))) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.unpack(msg, &id, &cnt, OPAL_NAME))) {
|
||||
OPAL_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
@ -620,7 +617,7 @@ static int native_fence(opal_process_name_t *procs, size_t nprocs)
|
||||
} else {
|
||||
unpack_segment_info(&cb->data, &id, &seg_info);
|
||||
if (NULL != seg_info) {
|
||||
pmix_sm_attach(opal_process_name_jobid(id), seg_info);
|
||||
pmix_sm_attach(id.jobid, seg_info);
|
||||
}
|
||||
}
|
||||
if (OPAL_SUCCESS != rc && OPAL_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) {
|
||||
@ -647,7 +644,7 @@ static void fencenb_cbfunc(opal_buffer_t *buf, void *cbdata)
|
||||
opal_pmix_scope_t scope;
|
||||
int32_t cnt;
|
||||
opal_value_t *kp;
|
||||
opal_identifier_t id;
|
||||
opal_process_name_t id;
|
||||
size_t i;
|
||||
uint64_t np;
|
||||
char *seg_info;
|
||||
@ -672,7 +669,7 @@ static void fencenb_cbfunc(opal_buffer_t *buf, void *cbdata)
|
||||
}
|
||||
/* extract the id of the contributor from the blob */
|
||||
cnt = 1;
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.unpack(msg, &id, &cnt, OPAL_UINT64))) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.unpack(msg, &id, &cnt, OPAL_NAME))) {
|
||||
OPAL_ERROR_LOG(rc);
|
||||
return;
|
||||
}
|
||||
@ -704,7 +701,7 @@ static void fencenb_cbfunc(opal_buffer_t *buf, void *cbdata)
|
||||
} else {
|
||||
unpack_segment_info(buf, &id, &seg_info);
|
||||
if (NULL != seg_info) {
|
||||
pmix_sm_attach(opal_process_name_jobid(id), seg_info);
|
||||
pmix_sm_attach(id.jobid, seg_info);
|
||||
}
|
||||
}
|
||||
if (OPAL_SUCCESS != rc && OPAL_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) {
|
||||
@ -750,7 +747,7 @@ static int native_fence_nb(opal_process_name_t *procs, size_t nprocs,
|
||||
return rc;
|
||||
}
|
||||
if (0 < nprocs) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(msg, procs, nprocs, OPAL_UINT64))) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(msg, procs, nprocs, OPAL_NAME))) {
|
||||
OPAL_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(msg);
|
||||
return rc;
|
||||
@ -832,7 +829,7 @@ static int native_fence_nb(opal_process_name_t *procs, size_t nprocs,
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
static int native_get(const opal_identifier_t *id,
|
||||
static int native_get(const opal_process_name_t *id,
|
||||
const char *key,
|
||||
opal_value_t **kv)
|
||||
{
|
||||
@ -860,7 +857,7 @@ static int native_get(const opal_identifier_t *id,
|
||||
handle = opal_dstore_internal;
|
||||
}
|
||||
opal_proc_t *myproc = opal_proc_local_get();
|
||||
if (myproc->proc_name == (opal_process_name_t)*id) {
|
||||
if (0 == opal_compare_proc(myproc->proc_name, *id)) {
|
||||
handle = opal_dstore_internal;
|
||||
}
|
||||
if (OPAL_SUCCESS == opal_dstore.fetch(handle, id,
|
||||
@ -888,7 +885,7 @@ static int native_get(const opal_identifier_t *id,
|
||||
}
|
||||
/* pack the request information - we'll get the entire blob
|
||||
* for this proc, so we don't need to pass the key */
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(msg, id, 1, OPAL_UINT64))) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(msg, id, 1, OPAL_NAME))) {
|
||||
OPAL_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(msg);
|
||||
return rc;
|
||||
@ -916,10 +913,10 @@ static int native_get(const opal_identifier_t *id,
|
||||
}
|
||||
found = false;
|
||||
if (1 == sm_flag) {
|
||||
opal_identifier_t uid;
|
||||
opal_process_name_t uid;
|
||||
unpack_segment_info(&cb->data, &uid, &seg_info);
|
||||
if (NULL != seg_info) {
|
||||
pmix_sm_attach(opal_process_name_jobid(uid), seg_info);
|
||||
pmix_sm_attach(uid.jobid, seg_info);
|
||||
}
|
||||
OBJ_CONSTRUCT(&vals, opal_list_t);
|
||||
if (OPAL_SUCCESS == opal_dstore.fetch(opal_dstore_modex, id,
|
||||
@ -988,7 +985,7 @@ static int native_get(const opal_identifier_t *id,
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void native_get_nb(const opal_identifier_t *id,
|
||||
static void native_get_nb(const opal_process_name_t *id,
|
||||
const char *key,
|
||||
opal_pmix_cbfunc_t cbfunc,
|
||||
void *cbdata)
|
||||
@ -1029,7 +1026,7 @@ static bool native_get_attr(const char *attr, opal_value_t **kv)
|
||||
opal_hwloc_locality_t locality;
|
||||
pmix_cb_t *cb;
|
||||
uint32_t i, myrank;
|
||||
opal_identifier_t id;
|
||||
opal_process_name_t id;
|
||||
char *cpuset;
|
||||
opal_buffer_t buf;
|
||||
|
||||
@ -1138,7 +1135,7 @@ static bool native_get_attr(const char *attr, opal_value_t **kv)
|
||||
kp->data.bo.size = 0;
|
||||
OBJ_RELEASE(kp);
|
||||
cnt=1;
|
||||
while (OPAL_SUCCESS == (rc = opal_dss.unpack(&buf, &id, &cnt, OPAL_UINT64))) {
|
||||
while (OPAL_SUCCESS == (rc = opal_dss.unpack(&buf, &id, &cnt, OPAL_NAME))) {
|
||||
cnt=1;
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.unpack(&buf, &cpuset, &cnt, OPAL_STRING))) {
|
||||
OPAL_ERROR_LOG(rc);
|
||||
@ -1185,9 +1182,9 @@ static bool native_get_attr(const char *attr, opal_value_t **kv)
|
||||
"%s saving local peers %s",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), lclpeers->data.string);
|
||||
} else if (0 == strcmp(PMIX_JOBID, kp->key)) {
|
||||
native_pname.jid = kp->data.uint32;
|
||||
native_pname.jobid = kp->data.uint32;
|
||||
} else if (0 == strcmp(PMIX_RANK, kp->key)) {
|
||||
native_pname.vid = kp->data.uint32;
|
||||
native_pname.vpid = kp->data.uint32;
|
||||
}
|
||||
if (0 == strcmp(attr, kp->key)) {
|
||||
OBJ_RETAIN(kp);
|
||||
@ -1208,7 +1205,7 @@ static bool native_get_attr(const char *attr, opal_value_t **kv)
|
||||
return false;
|
||||
}
|
||||
OBJ_RELEASE(cb);
|
||||
opal_proc_set_name((opal_process_name_t*)&native_pname);
|
||||
opal_proc_set_name(&native_pname);
|
||||
|
||||
/* if the list of local peers wasn't included, then we are done */
|
||||
if (NULL == lclpeers) {
|
||||
@ -1219,7 +1216,7 @@ static bool native_get_attr(const char *attr, opal_value_t **kv)
|
||||
}
|
||||
|
||||
/* baseline all the procs as nonlocal */
|
||||
myrank = native_pname.vid;
|
||||
myrank = native_pname.vpid;
|
||||
/* we only need to set locality for each local rank as "not found"
|
||||
* equates to "non local" */
|
||||
ranks = opal_argv_split(lclpeers->data.string, ',');
|
||||
@ -1228,16 +1225,15 @@ static bool native_get_attr(const char *attr, opal_value_t **kv)
|
||||
if (myrank == vid) {
|
||||
continue;
|
||||
}
|
||||
native_pname.vid = vid;
|
||||
memcpy(&id, &native_pname, sizeof(opal_identifier_t));
|
||||
native_pname.vpid = vid;
|
||||
#if OPAL_HAVE_HWLOC
|
||||
OBJ_CONSTRUCT(&vals, opal_list_t);
|
||||
if (OPAL_SUCCESS != (rc = opal_dstore.fetch(opal_dstore_internal, (opal_identifier_t*)&native_pname,
|
||||
if (OPAL_SUCCESS != (rc = opal_dstore.fetch(opal_dstore_internal, &native_pname,
|
||||
OPAL_DSTORE_CPUSET, &vals))) {
|
||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||
"%s cpuset for local proc %s not found",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
OPAL_NAME_PRINT(id));
|
||||
OPAL_NAME_PRINT(native_pname));
|
||||
OPAL_LIST_DESTRUCT(&vals);
|
||||
/* even though the cpuset wasn't found, we at least know it is
|
||||
* on the same node with us */
|
||||
@ -1264,14 +1260,14 @@ static bool native_get_attr(const char *attr, opal_value_t **kv)
|
||||
OPAL_OUTPUT_VERBOSE((1, opal_pmix_base_framework.framework_output,
|
||||
"%s pmix:native proc %s locality %s",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
OPAL_NAME_PRINT(id),
|
||||
OPAL_NAME_PRINT(native_pname),
|
||||
opal_hwloc_base_print_locality(locality)));
|
||||
|
||||
OBJ_CONSTRUCT(&kvn, opal_value_t);
|
||||
kvn.key = strdup(OPAL_DSTORE_LOCALITY);
|
||||
kvn.type = OPAL_UINT16;
|
||||
kvn.data.uint16 = locality;
|
||||
(void)opal_dstore.store(opal_dstore_internal, (opal_identifier_t*)&native_pname, &kvn);
|
||||
(void)opal_dstore.store(opal_dstore_internal, &native_pname, &kvn);
|
||||
OBJ_DESTRUCT(&kvn);
|
||||
}
|
||||
opal_argv_free(ranks);
|
||||
|
@ -65,7 +65,7 @@ typedef void (*pmix_usock_cbfunc_t)(opal_buffer_t *buf, void *cbdata);
|
||||
|
||||
/* header for messages */
|
||||
typedef struct {
|
||||
opal_identifier_t id;
|
||||
opal_process_name_t id;
|
||||
uint8_t type;
|
||||
uint32_t tag;
|
||||
size_t nbytes;
|
||||
@ -134,8 +134,8 @@ typedef struct {
|
||||
opal_buffer_t *cache_remote;
|
||||
opal_buffer_t *cache_global;
|
||||
opal_event_base_t *evbase;
|
||||
opal_identifier_t id;
|
||||
opal_identifier_t server;
|
||||
opal_process_name_t id;
|
||||
opal_process_name_t server;
|
||||
char *uri;
|
||||
struct sockaddr_un address;
|
||||
int sd;
|
||||
|
@ -79,7 +79,7 @@ static int pmix_native_open(void)
|
||||
{
|
||||
/* construct the component fields */
|
||||
mca_pmix_native_component.uri = NULL;
|
||||
mca_pmix_native_component.id = 0;
|
||||
mca_pmix_native_component.id = opal_name_invalid;
|
||||
mca_pmix_native_component.cache_local = NULL;
|
||||
mca_pmix_native_component.cache_remote = NULL;
|
||||
mca_pmix_native_component.cache_global = NULL;
|
||||
@ -124,8 +124,8 @@ static int pmix_native_component_query(mca_base_module_t **module, int *priority
|
||||
mca_pmix_native_component.uri = NULL;
|
||||
} else {
|
||||
/* if PMIx is present, then we need to use it */
|
||||
opal_convert_string_to_process_name(&mca_pmix_native_component.id, id);
|
||||
mca_pmix_native_component.uri = strdup(t);
|
||||
mca_pmix_native_component.id = strtoull(id, NULL, 10);
|
||||
opal_proc_set_name(&mca_pmix_native_component.id);
|
||||
*priority = 100;
|
||||
}
|
||||
|
@ -14,6 +14,8 @@
|
||||
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2011 Oak Ridge National Labs. All rights reserved.
|
||||
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -581,11 +583,12 @@ static int usock_recv_connect_ack(void)
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME));
|
||||
|
||||
/* compare the servers name to the expected value */
|
||||
if (hdr.id != mca_pmix_native_component.server) {
|
||||
if (0 != opal_compare_proc(hdr.id, mca_pmix_native_component.server)) {
|
||||
opal_output(0, "usock_peer_recv_connect_ack: "
|
||||
"%s received unexpected process identifier %"PRIu64" from server: expected %"PRIu64"",
|
||||
"%s received unexpected process identifier (%s) from server: expected (%s)",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
hdr.id, mca_pmix_native_component.server);
|
||||
OPAL_NAME_PRINT(hdr.id),
|
||||
OPAL_NAME_PRINT(mca_pmix_native_component.server));
|
||||
mca_pmix_native_component.state = PMIX_USOCK_FAILED;
|
||||
CLOSE_THE_SOCKET(mca_pmix_native_component.sd);
|
||||
return OPAL_ERR_UNREACH;
|
||||
|
@ -107,6 +107,37 @@ typedef void (*opal_pmix_cbfunc_t)(int status, opal_value_t *kv, void *cbdata);
|
||||
#define PMIX_NET_TOPO "pmix.ntopo" // (byte_object) network topology
|
||||
#define PMIX_LOCAL_TOPO "pmix.ltopo" // (hwloc topo) local node topology
|
||||
|
||||
/**
|
||||
* Provide a simplified macro for sending data via modex
|
||||
* to other processes. The macro requires four arguments:
|
||||
*
|
||||
* r - the integer return status from the modex op
|
||||
* f - whether this modex requires sync or is async ready
|
||||
* sc - the PMIX scope of the data
|
||||
* s - the key to tag the data being posted
|
||||
* d - pointer to the data object being posted
|
||||
* t - the type of the data
|
||||
*/
|
||||
#define OPAL_MODEX_SEND_VALUE(r, f, sc, s, d, t) \
|
||||
do { \
|
||||
opal_value_t kv; \
|
||||
if (PMIX_SYNC_REQD == (f)) { \
|
||||
opal_pmix_use_collective = true; \
|
||||
} \
|
||||
OBJ_CONSTRUCT(&kv, opal_value_t); \
|
||||
kv.key = (s); \
|
||||
if (OPAL_SUCCESS != ((r) = opal_value_load(&kv, (d), (t)))) { \
|
||||
OPAL_ERROR_LOG((r)); \
|
||||
} else { \
|
||||
if (OPAL_SUCCESS != ((r) = opal_pmix.put(sc, &kv))) { \
|
||||
OPAL_ERROR_LOG((r)); \
|
||||
} \
|
||||
} \
|
||||
/* do not destruct the keyval as we don't own */ \
|
||||
/* the data - the caller will take care of the */ \
|
||||
/* key and value storage, and the kv itself has none */ \
|
||||
} while(0);
|
||||
|
||||
/**
|
||||
* Provide a simplified macro for sending data via modex
|
||||
* to other processes. The macro requires four arguments:
|
||||
@ -168,7 +199,7 @@ typedef void (*opal_pmix_cbfunc_t)(int status, opal_value_t *kv, void *cbdata);
|
||||
* p - pointer to the opal_proc_t of the proc that posted
|
||||
* the data (opal_proc_t*)
|
||||
* d - pointer to a location wherein the data object
|
||||
* it to be returned
|
||||
* is to be returned
|
||||
* t - the expected data type
|
||||
*/
|
||||
#define OPAL_MODEX_RECV_VALUE(r, s, p, d, t) \
|
||||
@ -300,7 +331,7 @@ typedef int (*opal_pmix_base_module_put_fn_t)(opal_pmix_scope_t scope,
|
||||
* reflect the proposed PMIx extensions, and to include the process identifier so
|
||||
* we can form the PMI key within the active component instead of sprinkling that
|
||||
* code all over the code base. */
|
||||
typedef int (*opal_pmix_base_module_get_fn_t)(const opal_identifier_t *id,
|
||||
typedef int (*opal_pmix_base_module_get_fn_t)(const opal_process_name_t *id,
|
||||
const char *key,
|
||||
opal_value_t **kv);
|
||||
|
||||
@ -309,7 +340,7 @@ typedef int (*opal_pmix_base_module_get_fn_t)(const opal_identifier_t *id,
|
||||
* opal_value_t object in the callback. We include the process identifier so
|
||||
* we can form the PMI key within the active component instead of sprinkling that
|
||||
* code all over the code base. */
|
||||
typedef void (*opal_pmix_base_module_get_nb_fn_t)(const opal_identifier_t *id,
|
||||
typedef void (*opal_pmix_base_module_get_nb_fn_t)(const opal_process_name_t *id,
|
||||
const char *key,
|
||||
opal_pmix_cbfunc_t cbfunc,
|
||||
void *cbdata);
|
||||
|
@ -35,7 +35,7 @@ static int s1_abort(int flag, const char msg[]);
|
||||
static int s1_fence(opal_process_name_t *procs, size_t nprocs);
|
||||
static int s1_put(opal_pmix_scope_t scope,
|
||||
opal_value_t *kv);
|
||||
static int s1_get(const opal_identifier_t *id,
|
||||
static int s1_get(const opal_process_name_t *id,
|
||||
const char *key,
|
||||
opal_value_t **kv);
|
||||
static int s1_publish(const char service_name[],
|
||||
@ -105,10 +105,7 @@ static int s1_jsize;
|
||||
static int s1_appnum;
|
||||
static int s1_nlranks;
|
||||
static int *s1_lranks=NULL;
|
||||
static struct {
|
||||
uint32_t jid;
|
||||
uint32_t vid;
|
||||
} s1_pname;
|
||||
static opal_process_name_t s1_pname;
|
||||
|
||||
static bool got_modex_data = false;
|
||||
static char* pmix_error(int pmix_err);
|
||||
@ -222,12 +219,12 @@ static int s1_init(void)
|
||||
* debug messages will make sense - an upper
|
||||
* layer will eventually overwrite it, but that
|
||||
* won't do any harm */
|
||||
s1_pname.jid = s1_jobid;
|
||||
s1_pname.vid = s1_rank;
|
||||
opal_proc_set_name((opal_process_name_t*)&s1_pname);
|
||||
s1_pname.jobid = s1_jobid;
|
||||
s1_pname.vpid = s1_rank;
|
||||
opal_proc_set_name(&s1_pname);
|
||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||
"%s pmix:s1: assigned tmp name",
|
||||
OPAL_NAME_PRINT(*(opal_process_name_t*)&s1_pname));
|
||||
OPAL_NAME_PRINT(s1_pname));
|
||||
|
||||
pmix_kvs_name = (char*)malloc(pmix_kvslen_max);
|
||||
if( pmix_kvs_name == NULL ){
|
||||
@ -444,8 +441,8 @@ static int s1_fence(opal_process_name_t *procs, size_t nprocs)
|
||||
/* we only need to set locality for each local rank as "not found"
|
||||
* equates to "non-local" */
|
||||
for (i=0; i < s1_nlranks; i++) {
|
||||
s1_pname.vid = s1_lranks[i];
|
||||
rc = opal_pmix_base_cache_keys_locally((opal_identifier_t*)&s1_pname, OPAL_DSTORE_CPUSET,
|
||||
s1_pname.vpid = s1_lranks[i];
|
||||
rc = opal_pmix_base_cache_keys_locally(&s1_pname, OPAL_DSTORE_CPUSET,
|
||||
&kp, pmix_kvs_name, pmix_vallen_max, kvs_get);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OPAL_ERROR_LOG(rc);
|
||||
@ -473,14 +470,14 @@ static int s1_fence(opal_process_name_t *procs, size_t nprocs)
|
||||
OPAL_OUTPUT_VERBOSE((1, opal_pmix_base_framework.framework_output,
|
||||
"%s pmix:s1 proc %s locality %s",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
OPAL_NAME_PRINT(*(opal_identifier_t*)&s1_pname),
|
||||
OPAL_NAME_PRINT(s1_pname),
|
||||
opal_hwloc_base_print_locality(locality)));
|
||||
|
||||
OBJ_CONSTRUCT(&kvn, opal_value_t);
|
||||
kvn.key = strdup(OPAL_DSTORE_LOCALITY);
|
||||
kvn.type = OPAL_UINT16;
|
||||
kvn.data.uint16 = locality;
|
||||
(void)opal_dstore.store(opal_dstore_internal, (opal_identifier_t*)&s1_pname, &kvn);
|
||||
(void)opal_dstore.store(opal_dstore_internal, &s1_pname, &kvn);
|
||||
OBJ_DESTRUCT(&kvn);
|
||||
}
|
||||
}
|
||||
@ -488,7 +485,7 @@ static int s1_fence(opal_process_name_t *procs, size_t nprocs)
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
static int s1_get(const opal_identifier_t *id,
|
||||
static int s1_get(const opal_process_name_t *id,
|
||||
const char *key,
|
||||
opal_value_t **kv)
|
||||
{
|
||||
|
@ -50,7 +50,7 @@ static int s2_spawn(int count, const char * cmds[],
|
||||
static int s2_put(opal_pmix_scope_t scope,
|
||||
opal_value_t *kv);
|
||||
static int s2_fence(opal_process_name_t *procs, size_t nprocs);
|
||||
static int s2_get(const opal_identifier_t *id,
|
||||
static int s2_get(const opal_process_name_t *id,
|
||||
const char *key,
|
||||
opal_value_t **kv);
|
||||
static int s2_publish(const char service_name[],
|
||||
@ -114,10 +114,7 @@ static int s2_jsize;
|
||||
static int s2_appnum;
|
||||
static int s2_nlranks;
|
||||
static int *s2_lranks=NULL;
|
||||
static struct {
|
||||
uint32_t jid;
|
||||
uint32_t vid;
|
||||
} s2_pname;
|
||||
static opal_process_name_t s2_pname;
|
||||
|
||||
static bool got_modex_data = false;
|
||||
static char* pmix_error(int pmix_err);
|
||||
@ -230,12 +227,12 @@ static int s2_init(void)
|
||||
* debug messages will make sense - an upper
|
||||
* layer will eventually overwrite it, but that
|
||||
* won't do any harm */
|
||||
s2_pname.jid = s2_jobid;
|
||||
s2_pname.vid = s2_rank;
|
||||
opal_proc_set_name((opal_process_name_t*)&s2_pname);
|
||||
s2_pname.jobid = s2_jobid;
|
||||
s2_pname.vpid = s2_rank;
|
||||
opal_proc_set_name(&s2_pname);
|
||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||
"%s pmix:s2: assigned tmp name",
|
||||
OPAL_NAME_PRINT(*(opal_process_name_t*)&s2_pname));
|
||||
OPAL_NAME_PRINT(s2_pname));
|
||||
|
||||
char *pmapping = (char*)malloc(PMI2_MAX_VALLEN);
|
||||
if( pmapping == NULL ){
|
||||
@ -250,7 +247,7 @@ static int s2_init(void)
|
||||
return OPAL_ERROR;
|
||||
}
|
||||
|
||||
s2_lranks = mca_common_pmi2_parse_pmap(pmapping, s2_pname.vid, &my_node, &s2_nlranks);
|
||||
s2_lranks = mca_common_pmi2_parse_pmap(pmapping, s2_pname.vpid, &my_node, &s2_nlranks);
|
||||
if (NULL == s2_lranks) {
|
||||
rc = OPAL_ERR_OUT_OF_RESOURCE;
|
||||
OPAL_ERROR_LOG(rc);
|
||||
@ -335,9 +332,9 @@ static int s2_spawn(int count, const char * cmds[],
|
||||
static int s2_job_connect(const char jobId[])
|
||||
{
|
||||
int rc;
|
||||
PMI2_Connect_comm_t *conn;
|
||||
PMI2_Connect_comm_t conn;
|
||||
/*FIXME should change function prototype to add void* conn */
|
||||
rc = PMI2_Job_Connect(jobId, conn);
|
||||
rc = PMI2_Job_Connect(jobId, &conn);
|
||||
if( PMI2_SUCCESS != rc ){
|
||||
OPAL_PMI_ERROR(rc, "PMI2_Job_Connect");
|
||||
return OPAL_ERROR;
|
||||
@ -422,8 +419,8 @@ static int s2_fence(opal_process_name_t *procs, size_t nprocs)
|
||||
/* we only need to set locality for each local rank as "not found"
|
||||
* equates to "non-local" */
|
||||
for (i=0; i < s2_nlranks; i++) {
|
||||
s2_pname.vid = s2_lranks[i];
|
||||
rc = opal_pmix_base_cache_keys_locally((opal_identifier_t*)&s2_pname, OPAL_DSTORE_CPUSET,
|
||||
s2_pname.vpid = s2_lranks[i];
|
||||
rc = opal_pmix_base_cache_keys_locally(&s2_pname, OPAL_DSTORE_CPUSET,
|
||||
&kp, pmix_kvs_name, pmix_vallen_max, kvs_get);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OPAL_ERROR_LOG(rc);
|
||||
@ -451,14 +448,14 @@ static int s2_fence(opal_process_name_t *procs, size_t nprocs)
|
||||
OPAL_OUTPUT_VERBOSE((1, opal_pmix_base_framework.framework_output,
|
||||
"%s pmix:s2 proc %s locality %s",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
OPAL_NAME_PRINT(*(opal_identifier_t*)&s2_pname),
|
||||
OPAL_NAME_PRINT(s2_pname),
|
||||
opal_hwloc_base_print_locality(locality)));
|
||||
|
||||
OBJ_CONSTRUCT(&kvn, opal_value_t);
|
||||
kvn.key = strdup(OPAL_DSTORE_LOCALITY);
|
||||
kvn.type = OPAL_UINT16;
|
||||
kvn.data.uint16 = locality;
|
||||
(void)opal_dstore.store(opal_dstore_internal, (opal_identifier_t*)&s2_pname, &kvn);
|
||||
(void)opal_dstore.store(opal_dstore_internal, &s2_pname, &kvn);
|
||||
OBJ_DESTRUCT(&kvn);
|
||||
}
|
||||
}
|
||||
@ -466,7 +463,7 @@ static int s2_fence(opal_process_name_t *procs, size_t nprocs)
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
static int s2_get(const opal_identifier_t *id,
|
||||
static int s2_get(const opal_process_name_t *id,
|
||||
const char *key,
|
||||
opal_value_t **kv)
|
||||
{
|
||||
|
@ -28,7 +28,7 @@
|
||||
static int init(void);
|
||||
static void finalize(void);
|
||||
static int get_my_cred(int dstorehandle,
|
||||
opal_identifier_t *my_id,
|
||||
opal_process_name_t *my_id,
|
||||
opal_sec_cred_t **cred);
|
||||
static int authenticate(opal_sec_cred_t *cred);
|
||||
|
||||
@ -55,7 +55,7 @@ static void finalize(void)
|
||||
}
|
||||
|
||||
static int get_my_cred(int dstorehandle,
|
||||
opal_identifier_t *my_id,
|
||||
opal_process_name_t *my_id,
|
||||
opal_sec_cred_t **cred)
|
||||
{
|
||||
opal_list_t vals;
|
||||
|
@ -33,7 +33,7 @@
|
||||
static int init(void);
|
||||
static void finalize(void);
|
||||
static int get_my_cred(int dstorehandle,
|
||||
opal_identifier_t *my_id,
|
||||
opal_process_name_t *my_id,
|
||||
opal_sec_cred_t **cred);
|
||||
static int authenticate(opal_sec_cred_t *cred);
|
||||
|
||||
@ -65,7 +65,7 @@ static size_t op_cbfunc(void *ptr, size_t size, size_t count, void *stream)
|
||||
}
|
||||
|
||||
static int get_my_cred(int dstorehandle,
|
||||
opal_identifier_t *my_id,
|
||||
opal_process_name_t *my_id,
|
||||
opal_sec_cred_t **cred)
|
||||
{
|
||||
char *cmd;
|
||||
|
@ -1,5 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -17,6 +19,7 @@
|
||||
|
||||
#include "opal_config.h"
|
||||
#include "opal/types.h"
|
||||
#include "opal/util/proc.h"
|
||||
|
||||
#include "opal/mca/mca.h"
|
||||
#include "opal/dss/dss_types.h"
|
||||
@ -74,7 +77,7 @@ typedef void (*opal_sec_base_module_finalize_fn_t)(void);
|
||||
* code indicating why it failed
|
||||
*/
|
||||
typedef int (*opal_sec_base_module_get_my_cred_fn_t)(int dstorehandle,
|
||||
opal_identifier_t *my_id,
|
||||
opal_process_name_t *my_id,
|
||||
opal_sec_cred_t **cred);
|
||||
|
||||
/*
|
||||
|
@ -19,6 +19,9 @@
|
||||
#include "opal/mca/dstore/dstore.h"
|
||||
#include "opal/mca/pmix/pmix.h"
|
||||
|
||||
opal_process_name_t opal_name_wildcard = {OPAL_JOBID_WILDCARD, OPAL_VPID_WILDCARD};
|
||||
opal_process_name_t opal_name_invalid = {OPAL_JOBID_INVALID, OPAL_VPID_INVALID};
|
||||
|
||||
opal_process_info_t opal_process_info = {
|
||||
.nodename = NULL,
|
||||
.job_session_dir = NULL,
|
||||
@ -33,7 +36,7 @@ opal_process_info_t opal_process_info = {
|
||||
static opal_proc_t opal_local_proc = {
|
||||
{ .opal_list_next = NULL,
|
||||
.opal_list_prev = NULL},
|
||||
OPAL_NAME_INVALID,
|
||||
{OPAL_JOBID_INVALID, OPAL_VPID_INVALID},
|
||||
0,
|
||||
0,
|
||||
NULL,
|
||||
@ -46,13 +49,13 @@ static void opal_proc_construct(opal_proc_t* proc)
|
||||
proc->proc_arch = opal_local_arch;
|
||||
proc->proc_convertor = NULL;
|
||||
proc->proc_flags = 0;
|
||||
proc->proc_name = 0;
|
||||
proc->proc_name = *OPAL_NAME_INVALID;
|
||||
}
|
||||
|
||||
static void opal_proc_destruct(opal_proc_t* proc)
|
||||
{
|
||||
proc->proc_flags = 0;
|
||||
proc->proc_name = 0;
|
||||
proc->proc_name = *OPAL_NAME_INVALID;
|
||||
proc->proc_hostname = NULL;
|
||||
proc->proc_convertor = NULL;
|
||||
}
|
||||
@ -64,14 +67,20 @@ static int
|
||||
opal_compare_opal_procs(const opal_process_name_t p1,
|
||||
const opal_process_name_t p2)
|
||||
{
|
||||
opal_process_name_t proc1, proc2;
|
||||
/* to protect alignment, copy the name across */
|
||||
memcpy(&proc1, &p1, sizeof(opal_process_name_t));
|
||||
memcpy(&proc2, &p2, sizeof(opal_process_name_t));
|
||||
if( proc1 == proc2 ) return 0;
|
||||
if( proc1 < proc2 ) return -1;
|
||||
if( p1.jobid < p2.jobid ) {
|
||||
return -1;
|
||||
}
|
||||
if( p1.jobid > p2.jobid ) {
|
||||
return 1;
|
||||
}
|
||||
if( p1.vpid < p2.vpid ) {
|
||||
return -1;
|
||||
}
|
||||
if( p1.vpid > p2.vpid ) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
opal_compare_proc_fct_t opal_compare_proc = opal_compare_opal_procs;
|
||||
|
||||
@ -118,15 +127,28 @@ opal_process_name_print_should_never_be_called(const opal_process_name_t procnam
|
||||
return "My Name is Nobody";
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
opal_process_name_vpid_should_never_be_called(const opal_process_name_t unused)
|
||||
static char*
|
||||
opal_vpid_print_should_never_be_called(const opal_vpid_t unused)
|
||||
{
|
||||
return UINT_MAX;
|
||||
return "My VPID";
|
||||
}
|
||||
|
||||
static char*
|
||||
opal_jobid_print_should_never_be_called(const opal_jobid_t unused)
|
||||
{
|
||||
return "My JOBID";
|
||||
}
|
||||
|
||||
static int opal_convert_string_to_process_name_should_never_be_called(opal_process_name_t *name,
|
||||
const char* name_string)
|
||||
{
|
||||
return OPAL_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
char* (*opal_process_name_print)(const opal_process_name_t) = opal_process_name_print_should_never_be_called;
|
||||
uint32_t (*opal_process_name_vpid)(const opal_process_name_t) = opal_process_name_vpid_should_never_be_called;
|
||||
uint32_t (*opal_process_name_jobid)(const opal_process_name_t) = opal_process_name_vpid_should_never_be_called;
|
||||
char* (*opal_vpid_print)(const opal_vpid_t) = opal_vpid_print_should_never_be_called;
|
||||
char* (*opal_jobid_print)(const opal_jobid_t) = opal_jobid_print_should_never_be_called;
|
||||
int (*opal_convert_string_to_process_name)(opal_process_name_t *name, const char* name_string) = opal_convert_string_to_process_name_should_never_be_called;
|
||||
|
||||
char* opal_get_proc_hostname(const opal_proc_t *proc)
|
||||
{
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "opal/types.h"
|
||||
#include "opal/dss/dss.h"
|
||||
|
||||
|
||||
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
@ -34,24 +35,45 @@
|
||||
* is to be copied from one structure to another, otherwise it should
|
||||
* only be used via the accessors defined below.
|
||||
*/
|
||||
typedef opal_identifier_t opal_process_name_t;
|
||||
#define OPAL_JOBID_T OPAL_UINT32
|
||||
#define OPAL_JOBID_MAX UINT32_MAX-2
|
||||
#define OPAL_JOBID_MIN 0
|
||||
#define OPAL_JOBID_INVALID (OPAL_JOBID_MAX + 2)
|
||||
#define OPAL_JOBID_WILDCARD (OPAL_JOBID_MAX + 1)
|
||||
|
||||
#define OPAL_VPID_T OPAL_UINT32
|
||||
#define OPAL_VPID_MAX UINT32_MAX-2
|
||||
#define OPAL_VPID_MIN 0
|
||||
#define OPAL_VPID_INVALID (OPAL_VPID_MAX + 2)
|
||||
#define OPAL_VPID_WILDCARD (OPAL_VPID_MAX + 1)
|
||||
|
||||
#define OPAL_PROC_MY_NAME (opal_proc_local_get()->proc_name)
|
||||
#define OPAL_PROC_MY_HOSTNAME (opal_proc_local_get()->proc_hostname)
|
||||
|
||||
#define OPAL_NAME_WILDCARD (&opal_name_wildcard)
|
||||
OPAL_DECLSPEC extern opal_process_name_t opal_name_wildcard;
|
||||
#define OPAL_NAME_INVALID (&opal_name_invalid)
|
||||
OPAL_DECLSPEC extern opal_process_name_t opal_name_invalid;
|
||||
|
||||
|
||||
#define OPAL_NAME_ARGS(n) \
|
||||
(unsigned long) ((NULL == n) ? (unsigned long)OPAL_JOBID_INVALID : (unsigned long)(n)->jobid), \
|
||||
(unsigned long) ((NULL == n) ? (unsigned long)OPAL_VPID_INVALID : (unsigned long)(n)->vpid) \
|
||||
|
||||
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && !defined(WORDS_BIGENDIAN)
|
||||
#define OPAL_PROCESS_NAME_NTOH(guid) opal_process_name_ntoh_intr(&(guid))
|
||||
static inline __opal_attribute_always_inline__ void
|
||||
opal_process_name_ntoh_intr(opal_process_name_t *name)
|
||||
{
|
||||
uint32_t * w = (uint32_t *)name;
|
||||
w[0] = ntohl(w[0]);
|
||||
w[1] = ntohl(w[1]);
|
||||
name->jobid = ntohl(name->jobid);
|
||||
name->vpid = ntohl(name->vpid);
|
||||
}
|
||||
#define OPAL_PROCESS_NAME_HTON(guid) opal_process_name_hton_intr(&(guid))
|
||||
static inline __opal_attribute_always_inline__ void
|
||||
opal_process_name_hton_intr(opal_process_name_t *name)
|
||||
{
|
||||
uint32_t * w = (uint32_t *)name;
|
||||
w[0] = htonl(w[0]);
|
||||
w[1] = htonl(w[1]);
|
||||
name->jobid = htonl(name->jobid);
|
||||
name->vpid = htonl(name->vpid);
|
||||
}
|
||||
#else
|
||||
#define OPAL_PROCESS_NAME_NTOH(guid)
|
||||
@ -80,7 +102,7 @@ typedef struct opal_process_info_t {
|
||||
char *job_session_dir; /**< Session directory for job */
|
||||
char *proc_session_dir; /**< Session directory for the process */
|
||||
int32_t num_local_peers; /**< number of procs from my job that share my node with me */
|
||||
int32_t my_local_rank; /**< local rank */
|
||||
int32_t my_local_rank; /**< local rank on this node within my job */
|
||||
#if OPAL_HAVE_HWLOC
|
||||
char *cpuset; /**< String-representation of bitmap where we are bound */
|
||||
#endif
|
||||
@ -99,14 +121,14 @@ OPAL_DECLSPEC extern void opal_proc_set_name(opal_process_name_t *name);
|
||||
typedef int (*opal_compare_proc_fct_t)(const opal_process_name_t, const opal_process_name_t);
|
||||
OPAL_DECLSPEC extern opal_compare_proc_fct_t opal_compare_proc;
|
||||
|
||||
/* Provide print functions that will be overwritten by the RTE layer */
|
||||
OPAL_DECLSPEC extern char* (*opal_process_name_print)(const opal_process_name_t);
|
||||
OPAL_DECLSPEC extern uint32_t (*opal_process_name_vpid)(const opal_process_name_t);
|
||||
OPAL_DECLSPEC extern uint32_t (*opal_process_name_jobid)(const opal_process_name_t);
|
||||
OPAL_DECLSPEC extern int (*opal_convert_string_to_process_name)(opal_process_name_t *name,
|
||||
const char* name_string);
|
||||
OPAL_DECLSPEC extern char* (*opal_vpid_print)(const opal_vpid_t);
|
||||
OPAL_DECLSPEC extern char* (*opal_jobid_print)(const opal_jobid_t);
|
||||
|
||||
#define OPAL_NAME_PRINT(OPAL_PN) opal_process_name_print(OPAL_PN)
|
||||
#define OPAL_PROC_MY_NAME (opal_proc_local_get()->proc_name)
|
||||
#define OPAL_PROC_MY_HOSTNAME (opal_proc_local_get()->proc_hostname)
|
||||
#define OPAL_NAME_INVALID 0xffffffffffffffff
|
||||
|
||||
/* provide a safe way to retrieve the hostname of a proc, including
|
||||
* our own. This is to be used by all BTLs so we don't retrieve hostnames
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include "opal/dss/dss_types.h"
|
||||
#include "opal/util/proc.h"
|
||||
|
||||
/**
|
||||
* Supported datatypes for messaging and storage operations.
|
||||
@ -58,42 +59,24 @@ typedef uint32_t orte_app_idx_t;
|
||||
#define ORTE_APP_IDX OPAL_UINT32
|
||||
#define ORTE_APP_IDX_MAX UINT32_MAX
|
||||
|
||||
/*
|
||||
* general typedefs & structures
|
||||
*/
|
||||
/** Set the allowed range for ids in each space
|
||||
*
|
||||
* NOTE: Be sure to update the ORTE_NAME_ARGS #define (above) and all
|
||||
* uses of it if these types change to be larger than (long)! The
|
||||
* HTON and NTOH macros below must be updated, as well as the MIN /
|
||||
* MAX macros below and the datatype packing representations in
|
||||
* orte/mca/plm/base/plm_private.h
|
||||
*
|
||||
* NOTE: Be sure to keep the jobid and vpid types the same size! Due
|
||||
* to padding rules, it won't save anything to have one larger than
|
||||
* the other, and it will cause problems in the communication subsystems
|
||||
/* general typedefs & structures */
|
||||
|
||||
/* Equate the ORTE jobid/vpid types and their associated values/structs
|
||||
* to their OPAL equivalents
|
||||
*/
|
||||
|
||||
typedef uint32_t orte_jobid_t;
|
||||
#define ORTE_JOBID_T OPAL_UINT32
|
||||
#define ORTE_JOBID_MAX UINT32_MAX-2
|
||||
#define ORTE_JOBID_MIN 0
|
||||
typedef uint32_t orte_vpid_t;
|
||||
#define ORTE_VPID_T OPAL_UINT32
|
||||
#define ORTE_VPID_MAX UINT32_MAX-2
|
||||
#define ORTE_VPID_MIN 0
|
||||
typedef opal_jobid_t orte_jobid_t;
|
||||
#define ORTE_JOBID_T OPAL_JOBID_T
|
||||
#define ORTE_JOBID_MAX OPAL_JOBID_MAX
|
||||
#define ORTE_JOBID_MIN OPAL_JOBID_MIN
|
||||
typedef opal_vpid_t orte_vpid_t;
|
||||
#define ORTE_VPID_T OPAL_VPID_T
|
||||
#define ORTE_VPID_MAX OPAL_VPID_MAX
|
||||
#define ORTE_VPID_MIN OPAL_VPID_MIX
|
||||
|
||||
#define ORTE_PROCESS_NAME_HTON(n) \
|
||||
do { \
|
||||
n.jobid = htonl(n.jobid); \
|
||||
n.vpid = htonl(n.vpid); \
|
||||
} while (0)
|
||||
#define ORTE_PROCESS_NAME_HTON(n) OPAL_PROCESS_NAME_HTON(n)
|
||||
|
||||
#define ORTE_PROCESS_NAME_NTOH(n) \
|
||||
do { \
|
||||
n.jobid = ntohl(n.jobid); \
|
||||
n.vpid = ntohl(n.vpid); \
|
||||
} while (0)
|
||||
#define ORTE_PROCESS_NAME_NTOH(n) OPAL_PROCESS_NAME_NTOH(n)
|
||||
|
||||
#define ORTE_NAME_ARGS(n) \
|
||||
(unsigned long) ((NULL == n) ? (unsigned long)ORTE_JOBID_INVALID : (unsigned long)(n)->jobid), \
|
||||
@ -102,25 +85,21 @@ do { \
|
||||
/*
|
||||
* define invalid values
|
||||
*/
|
||||
#define ORTE_JOBID_INVALID (ORTE_JOBID_MAX + 2)
|
||||
#define ORTE_VPID_INVALID (ORTE_VPID_MAX + 2)
|
||||
#define ORTE_JOBID_INVALID OPAL_JOBID_INVALID
|
||||
#define ORTE_VPID_INVALID OPAL_VPID_INVALID
|
||||
#define ORTE_LOCAL_JOBID_INVALID (ORTE_JOBID_INVALID & 0x0000FFFF)
|
||||
|
||||
/*
|
||||
* define wildcard values
|
||||
*/
|
||||
#define ORTE_JOBID_WILDCARD (ORTE_JOBID_MAX + 1)
|
||||
#define ORTE_VPID_WILDCARD (ORTE_VPID_MAX + 1)
|
||||
#define ORTE_JOBID_WILDCARD OPAL_JOBID_WILDCARD
|
||||
#define ORTE_VPID_WILDCARD OPAL_VPID_WILDCARD
|
||||
#define ORTE_LOCAL_JOBID_WILDCARD (ORTE_JOBID_WILDCARD & 0x0000FFFF)
|
||||
|
||||
/*
|
||||
* define the process name structure
|
||||
*/
|
||||
struct orte_process_name_t {
|
||||
orte_jobid_t jobid; /**< Job number */
|
||||
orte_vpid_t vpid; /**< Process id - equivalent to rank */
|
||||
};
|
||||
typedef struct orte_process_name_t orte_process_name_t;
|
||||
typedef opal_process_name_t orte_process_name_t;
|
||||
|
||||
|
||||
/**
|
||||
@ -169,41 +148,41 @@ typedef struct {
|
||||
OPAL_DECLSPEC OBJ_CLASS_DECLARATION(orte_attribute_t);
|
||||
|
||||
|
||||
/* Name-related types - equate to OPAL equivalents*/
|
||||
#define ORTE_NAME OPAL_NAME /**< an orte_process_name_t */
|
||||
#define ORTE_VPID OPAL_VPID /**< a vpid */
|
||||
#define ORTE_JOBID OPAL_JOBID /**< a jobid */
|
||||
|
||||
/* General ORTE types - support handled within DSS */
|
||||
#define ORTE_STD_CNTR (OPAL_DSS_ID_DYNAMIC + 1) /**< standard counter type */
|
||||
/* PLM types */
|
||||
/* Name-related types */
|
||||
#define ORTE_NAME (OPAL_DSS_ID_DYNAMIC + 2) /**< an orte_process_name_t */
|
||||
#define ORTE_VPID (OPAL_DSS_ID_DYNAMIC + 3) /**< a vpid */
|
||||
#define ORTE_JOBID (OPAL_DSS_ID_DYNAMIC + 4) /**< a jobid */
|
||||
/* State-related types */
|
||||
#define ORTE_NODE_STATE (OPAL_DSS_ID_DYNAMIC + 6) /**< node status flag */
|
||||
#define ORTE_PROC_STATE (OPAL_DSS_ID_DYNAMIC + 7) /**< process/resource status */
|
||||
#define ORTE_JOB_STATE (OPAL_DSS_ID_DYNAMIC + 8) /**< job status flag */
|
||||
#define ORTE_EXIT_CODE (OPAL_DSS_ID_DYNAMIC + 9) /**< process exit code */
|
||||
#define ORTE_NODE_STATE (OPAL_DSS_ID_DYNAMIC + 2) /**< node status flag */
|
||||
#define ORTE_PROC_STATE (OPAL_DSS_ID_DYNAMIC + 3) /**< process/resource status */
|
||||
#define ORTE_JOB_STATE (OPAL_DSS_ID_DYNAMIC + 4) /**< job status flag */
|
||||
#define ORTE_EXIT_CODE (OPAL_DSS_ID_DYNAMIC + 5) /**< process exit code */
|
||||
/* Data-passing types */
|
||||
#define ORTE_VALUE (OPAL_DSS_ID_DYNAMIC + 10) /**< registry return value */
|
||||
#define ORTE_VALUE (OPAL_DSS_ID_DYNAMIC + 6) /**< registry return value */
|
||||
/* Resource types */
|
||||
#define ORTE_APP_CONTEXT (OPAL_DSS_ID_DYNAMIC + 11) /**< argv and enviro arrays */
|
||||
#define ORTE_NODE_DESC (OPAL_DSS_ID_DYNAMIC + 12) /**< describes capabilities of nodes */
|
||||
#define ORTE_SLOT_DESC (OPAL_DSS_ID_DYNAMIC + 13) /**< describes slot allocations/reservations */
|
||||
#define ORTE_JOB (OPAL_DSS_ID_DYNAMIC + 14) /**< job information */
|
||||
#define ORTE_NODE (OPAL_DSS_ID_DYNAMIC + 15) /**< node information */
|
||||
#define ORTE_PROC (OPAL_DSS_ID_DYNAMIC + 16) /**< process information */
|
||||
#define ORTE_JOB_MAP (OPAL_DSS_ID_DYNAMIC + 17) /**< map of process locations */
|
||||
#define ORTE_APP_CONTEXT (OPAL_DSS_ID_DYNAMIC + 7) /**< argv and enviro arrays */
|
||||
#define ORTE_NODE_DESC (OPAL_DSS_ID_DYNAMIC + 8) /**< describes capabilities of nodes */
|
||||
#define ORTE_SLOT_DESC (OPAL_DSS_ID_DYNAMIC + 9) /**< describes slot allocations/reservations */
|
||||
#define ORTE_JOB (OPAL_DSS_ID_DYNAMIC + 10) /**< job information */
|
||||
#define ORTE_NODE (OPAL_DSS_ID_DYNAMIC + 11) /**< node information */
|
||||
#define ORTE_PROC (OPAL_DSS_ID_DYNAMIC + 12) /**< process information */
|
||||
#define ORTE_JOB_MAP (OPAL_DSS_ID_DYNAMIC + 13) /**< map of process locations */
|
||||
|
||||
/* RML types */
|
||||
#define ORTE_RML_TAG (OPAL_DSS_ID_DYNAMIC + 18) /**< tag for sending/receiving messages */
|
||||
#define ORTE_RML_TAG (OPAL_DSS_ID_DYNAMIC + 14) /**< tag for sending/receiving messages */
|
||||
/* DAEMON command type */
|
||||
#define ORTE_DAEMON_CMD (OPAL_DSS_ID_DYNAMIC + 19) /**< command flag for communicating with the daemon */
|
||||
#define ORTE_DAEMON_CMD (OPAL_DSS_ID_DYNAMIC + 15) /**< command flag for communicating with the daemon */
|
||||
|
||||
/* IOF types */
|
||||
#define ORTE_IOF_TAG (OPAL_DSS_ID_DYNAMIC + 20)
|
||||
#define ORTE_IOF_TAG (OPAL_DSS_ID_DYNAMIC + 16)
|
||||
|
||||
/* Attribute */
|
||||
#define ORTE_ATTRIBUTE (OPAL_DSS_ID_DYNAMIC + 21)
|
||||
#define ORTE_ATTRIBUTE (OPAL_DSS_ID_DYNAMIC + 17)
|
||||
/* Grpcomm signature */
|
||||
#define ORTE_SIGNATURE (OPAL_DSS_ID_DYNAMIC + 22)
|
||||
#define ORTE_SIGNATURE (OPAL_DSS_ID_DYNAMIC + 18)
|
||||
|
||||
/* provide a boundary for others to use */
|
||||
#define ORTE_DSS_ID_DYNAMIC (OPAL_DSS_ID_DYNAMIC + 50)
|
||||
|
@ -2,6 +2,8 @@
|
||||
* Copyright (c) 2012-2013 Los Alamos National Security, LLC.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -556,7 +558,7 @@ static void process_opens(int fd, short args, void *cbdata)
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), host);
|
||||
OBJ_CONSTRUCT(&myvals, opal_list_t);
|
||||
if (ORTE_SUCCESS != (rc = opal_dstore.fetch(opal_dstore_internal,
|
||||
(opal_identifier_t*)ORTE_NAME_WILDCARD,
|
||||
ORTE_NAME_WILDCARD,
|
||||
host, &myvals))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OPAL_LIST_DESTRUCT(&myvals);
|
||||
|
@ -1,6 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
|
||||
* Copyright (c) 2013 Intel, Inc. All rights reserved
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -27,7 +29,6 @@
|
||||
|
||||
#include "opal/util/opal_environ.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/util/output.h"
|
||||
|
||||
#include "orte/util/show_help.h"
|
||||
#include "orte/mca/dfs/base/base.h"
|
||||
|
@ -1,6 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2012 Los Alamos National Security, LLC.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -15,6 +17,7 @@
|
||||
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "opal/dss/dss_types.h"
|
||||
#include "opal/util/proc.h"
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
|
@ -2,6 +2,8 @@
|
||||
* Copyright (c) 2012-2013 Los Alamos National Security, LLC.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -483,7 +485,7 @@ static void process_opens(int fd, short args, void *cbdata)
|
||||
/* fetch the hostname where this daemon is located */
|
||||
OBJ_CONSTRUCT(&myvals, opal_list_t);
|
||||
if (ORTE_SUCCESS != (rc = opal_dstore.fetch(opal_dstore_internal,
|
||||
(opal_identifier_t*)&daemon,
|
||||
&daemon,
|
||||
OPAL_DSTORE_HOSTNAME, &myvals))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OPAL_LIST_DESTRUCT(&myvals);
|
||||
|
@ -13,6 +13,8 @@
|
||||
* Copyright (c) 2011-2013 Los Alamos National Security, LLC.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2013 Intel, Inc. All rights reserved
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -39,7 +41,6 @@
|
||||
|
||||
#include "opal/util/opal_environ.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/util/output.h"
|
||||
|
||||
#include "orte/util/show_help.h"
|
||||
#include "orte/mca/errmgr/base/base.h"
|
||||
|
@ -13,6 +13,8 @@
|
||||
* Copyright (c) 2011-2012 Los Alamos National Security, LLC.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -304,7 +306,7 @@ int orte_ess_base_proc_binding(void)
|
||||
goto error;
|
||||
}
|
||||
/* and store a copy locally */
|
||||
(void)opal_dstore.store(opal_dstore_internal, (opal_identifier_t*)ORTE_PROC_MY_NAME, &kv);
|
||||
(void)opal_dstore.store(opal_dstore_internal, ORTE_PROC_MY_NAME, &kv);
|
||||
OBJ_DESTRUCT(&kv);
|
||||
}
|
||||
return ORTE_SUCCESS;
|
||||
|
@ -13,6 +13,8 @@
|
||||
* Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -162,7 +164,7 @@ int orte_ess_base_app_setup(bool db_restrict_local)
|
||||
kv.type = OPAL_STRING;
|
||||
kv.data.string = strdup(orte_process_info.job_session_dir);
|
||||
if (OPAL_SUCCESS != (ret = opal_dstore.store(opal_dstore_internal,
|
||||
(opal_identifier_t*)ORTE_PROC_MY_NAME,
|
||||
ORTE_PROC_MY_NAME,
|
||||
&kv))) {
|
||||
ORTE_ERROR_LOG(ret);
|
||||
OBJ_DESTRUCT(&kv);
|
||||
@ -175,7 +177,7 @@ int orte_ess_base_app_setup(bool db_restrict_local)
|
||||
kv.type = OPAL_STRING;
|
||||
kv.data.string = strdup(orte_process_info.proc_session_dir);
|
||||
if (OPAL_SUCCESS != (ret = opal_dstore.store(opal_dstore_internal,
|
||||
(opal_identifier_t*)ORTE_PROC_MY_NAME,
|
||||
ORTE_PROC_MY_NAME,
|
||||
&kv))) {
|
||||
ORTE_ERROR_LOG(ret);
|
||||
OBJ_DESTRUCT(&kv);
|
||||
|
@ -13,6 +13,8 @@
|
||||
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -55,7 +57,7 @@
|
||||
static void stdin_write_handler(int fd, short event, void *cbdata);
|
||||
|
||||
static void
|
||||
orte_iof_hnp_exception_handler(const orte_process_name_t* peer, orte_rml_exception_t reason);
|
||||
orte_iof_hnp_exception_handler(orte_process_name_t* peer, orte_rml_exception_t reason);
|
||||
|
||||
/* API FUNCTIONS */
|
||||
static int init(void);
|
||||
@ -585,7 +587,7 @@ CHECK:
|
||||
*/
|
||||
|
||||
static void
|
||||
orte_iof_hnp_exception_handler(const orte_process_name_t* peer, orte_rml_exception_t reason)
|
||||
orte_iof_hnp_exception_handler(orte_process_name_t* peer, orte_rml_exception_t reason)
|
||||
{
|
||||
#if 0
|
||||
orte_iof_base_endpoint_t *endpoint;
|
||||
|
@ -564,7 +564,6 @@ static int setup_child(orte_proc_t *child,
|
||||
char *param, *value, ***env;
|
||||
int rc;
|
||||
int32_t nrestarts=0, *nrptr;
|
||||
opal_identifier_t id;
|
||||
|
||||
/* for convenience */
|
||||
env = &app->env;
|
||||
@ -652,8 +651,7 @@ static int setup_child(orte_proc_t *child,
|
||||
* name itself. Although in most cases the ID and the
|
||||
* process name are the same, it isn't necessarily
|
||||
* required */
|
||||
memcpy(&id, &child->name, sizeof(id));
|
||||
asprintf(&value, "%"PRIu64"", id);
|
||||
orte_util_convert_process_name_to_string(&value, &child->name);
|
||||
opal_setenv("PMIX_ID", value, true, env);
|
||||
free(value);
|
||||
|
||||
|
@ -65,8 +65,7 @@ void orte_oob_base_send_nb(int fd, short args, void *cbdata)
|
||||
* to our hash table
|
||||
*/
|
||||
OBJ_CONSTRUCT(&myvals, opal_list_t);
|
||||
if (OPAL_SUCCESS == opal_dstore.fetch(opal_dstore_internal,
|
||||
(opal_identifier_t*)&msg->dst,
|
||||
if (OPAL_SUCCESS == opal_dstore.fetch(opal_dstore_internal, &msg->dst,
|
||||
OPAL_DSTORE_URI, &myvals)) {
|
||||
kv = (opal_value_t*)opal_list_get_first(&myvals);
|
||||
if (NULL != kv) {
|
||||
|
@ -359,7 +359,7 @@ static int tcp_peer_send_connect_ack(mca_oob_tcp_peer_t* peer)
|
||||
|
||||
/* get our security credential*/
|
||||
if (OPAL_SUCCESS != (rc = opal_sec.get_my_credential(opal_dstore_internal,
|
||||
(opal_identifier_t*)ORTE_PROC_MY_NAME, &cred))) {
|
||||
ORTE_PROC_MY_NAME, &cred))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
|
@ -2,6 +2,9 @@
|
||||
/*
|
||||
* Copyright (c) 2011-2012 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
*
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -169,7 +172,7 @@ struct mca_oob_ud_component_t {
|
||||
|
||||
opal_mutex_t ud_match_lock;
|
||||
|
||||
opal_hash_table_t ud_peers;
|
||||
opal_proc_table_t ud_peers;
|
||||
};
|
||||
|
||||
typedef struct mca_oob_ud_component_t mca_oob_ud_component_t;
|
||||
|
@ -2,6 +2,8 @@
|
||||
/*
|
||||
* Copyright (c) 2011-2012 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -62,7 +64,7 @@ static int mca_oob_ud_component_open (void)
|
||||
OBJ_CONSTRUCT(&mca_oob_ud_component.ud_lock, opal_mutex_t);
|
||||
OBJ_CONSTRUCT(&mca_oob_ud_component.ud_match_lock, opal_mutex_t);
|
||||
|
||||
OBJ_CONSTRUCT(&mca_oob_ud_component.ud_peers, opal_hash_table_t);
|
||||
OBJ_CONSTRUCT(&mca_oob_ud_component.ud_peers, opal_proc_table_t);
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
@ -224,7 +226,7 @@ static mca_oob_t *mca_oob_ud_component_init(int *priority)
|
||||
*/
|
||||
*priority = 0;
|
||||
|
||||
opal_hash_table_init (&mca_oob_ud_component.ud_peers, 1024);
|
||||
opal_proc_table_init (&mca_oob_ud_component.ud_peers, 16, 1024);
|
||||
|
||||
devices = ibv_get_device_list (&num_devices);
|
||||
if (NULL == devices || 0 == num_devices) {
|
||||
|
@ -2,6 +2,8 @@
|
||||
/*
|
||||
* Copyright (c) 2011-2012 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -135,9 +137,8 @@ int mca_oob_ud_set_addr (const orte_process_name_t *name, const char *uri)
|
||||
peer->needs_notification = true;
|
||||
}
|
||||
|
||||
opal_hash_table_set_value_uint64(&mca_oob_ud_component.ud_peers,
|
||||
orte_util_hash_name(name),
|
||||
(void *)peer);
|
||||
opal_proc_table_set_value(&mca_oob_ud_component.ud_peers,
|
||||
name, (void *)peer);
|
||||
|
||||
OPAL_THREAD_UNLOCK(&mca_oob_ud_component.ud_lock);
|
||||
|
||||
@ -393,7 +394,7 @@ static int mca_oob_ud_module_fini (void)
|
||||
mca_oob_ud_peer_t *peer;
|
||||
opal_list_item_t *item;
|
||||
uint64_t key;
|
||||
void *node;
|
||||
void *node1, *node2;
|
||||
int rc;
|
||||
|
||||
OPAL_OUTPUT_VERBOSE((5, mca_oob_base_output, "%s oob:ud:fini entering",
|
||||
@ -418,19 +419,19 @@ static int mca_oob_ud_module_fini (void)
|
||||
|
||||
OPAL_THREAD_UNLOCK(&mca_oob_ud_component.ud_match_lock);
|
||||
|
||||
rc = opal_hash_table_get_first_key_uint64 (&mca_oob_ud_component.ud_peers, &key,
|
||||
(void **) &peer, &node);
|
||||
rc = opal_proc_table_get_first_key (&mca_oob_ud_component.ud_peers, &key,
|
||||
(void **) &peer, &node1, &node2);
|
||||
if (OPAL_SUCCESS == rc) {
|
||||
do {
|
||||
if (NULL != peer) {
|
||||
mca_oob_ud_peer_release (peer);
|
||||
}
|
||||
rc = opal_hash_table_get_next_key_uint64 (&mca_oob_ud_component.ud_peers, &key,
|
||||
(void **) &peer, node, &node);
|
||||
rc = opal_proc_table_get_next_key (&mca_oob_ud_component.ud_peers, &key,
|
||||
(void **) &peer, node1, &node1, node2, &node2);
|
||||
} while (OPAL_SUCCESS == rc);
|
||||
}
|
||||
|
||||
opal_hash_table_remove_all (&mca_oob_ud_component.ud_peers);
|
||||
opal_proc_table_remove_all (&mca_oob_ud_component.ud_peers);
|
||||
|
||||
for (item = opal_list_get_first (&mca_oob_ud_component.ud_devices);
|
||||
item != opal_list_get_end (&mca_oob_ud_component.ud_devices);
|
||||
|
@ -2,6 +2,8 @@
|
||||
/*
|
||||
* Copyright (c) 2011-2012 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -34,8 +36,8 @@ int mca_oob_ud_peer_lookup (const orte_process_name_t *name, mca_oob_ud_peer_t *
|
||||
|
||||
*peer = NULL;
|
||||
|
||||
rc = opal_hash_table_get_value_uint64(&mca_oob_ud_component.ud_peers,
|
||||
orte_util_hash_name(name), (void**)peer);
|
||||
rc = opal_proc_table_get_value(&mca_oob_ud_component.ud_peers,
|
||||
*name, (void**)peer);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
return ORTE_ERR_UNREACH;
|
||||
}
|
||||
@ -156,9 +158,8 @@ mca_oob_ud_peer_t *mca_oob_ud_get_peer (struct mca_oob_ud_port_t *port,
|
||||
peer->peer_context = port->device;
|
||||
|
||||
OPAL_THREAD_LOCK(&mca_oob_ud_component.ud_lock);
|
||||
opal_hash_table_set_value_uint64(&mca_oob_ud_component.ud_peers,
|
||||
orte_util_hash_name(name),
|
||||
(void *) peer);
|
||||
opal_proc_table_set_value(&mca_oob_ud_component.ud_peers,
|
||||
*name, (void *) peer);
|
||||
OPAL_THREAD_UNLOCK(&mca_oob_ud_component.ud_lock);
|
||||
|
||||
return peer;
|
||||
|
@ -14,6 +14,8 @@
|
||||
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2011 Oak Ridge National Labs. All rights reserved.
|
||||
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -282,7 +284,7 @@ static int usock_peer_send_connect_ack(mca_oob_usock_peer_t* peer)
|
||||
|
||||
/* get our security credential*/
|
||||
if (OPAL_SUCCESS != (rc = opal_sec.get_my_credential(opal_dstore_internal,
|
||||
(opal_identifier_t*)ORTE_PROC_MY_NAME, &cred))) {
|
||||
ORTE_PROC_MY_NAME, &cred))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
|
@ -12,6 +12,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007-2014 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -249,31 +250,6 @@ ORTE_DECLSPEC void orte_rml_base_post_recv(int sd, short args, void *cbdata);
|
||||
ORTE_DECLSPEC void orte_rml_base_process_msg(int fd, short flags, void *cbdata);
|
||||
ORTE_DECLSPEC void orte_rml_base_process_error(int fd, short flags, void *cbdata);
|
||||
|
||||
/* null functions */
|
||||
int orte_rml_base_null_send_nb(struct orte_process_name_t* peer,
|
||||
struct iovec* msg,
|
||||
int count,
|
||||
orte_rml_tag_t tag,
|
||||
orte_rml_callback_fn_t cbfunc,
|
||||
void* cbdata);
|
||||
int orte_rml_base_null_send_buffer_nb(struct orte_process_name_t* peer,
|
||||
struct opal_buffer_t* buffer,
|
||||
orte_rml_tag_t tag,
|
||||
orte_rml_buffer_callback_fn_t cbfunc,
|
||||
void* cbdata);
|
||||
void orte_rml_base_null_recv_nb(struct orte_process_name_t* peer,
|
||||
orte_rml_tag_t tag,
|
||||
bool persistent,
|
||||
orte_rml_callback_fn_t cbfunc,
|
||||
void* cbdata);
|
||||
void orte_rml_base_null_recv_buffer_nb(struct orte_process_name_t* peer,
|
||||
orte_rml_tag_t tag,
|
||||
bool persistent,
|
||||
orte_rml_buffer_callback_fn_t cbfunc,
|
||||
void* cbdata);
|
||||
void orte_rml_base_null_recv_cancel(orte_process_name_t* peer,
|
||||
orte_rml_tag_t tag);
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif /* MCA_RML_BASE_H */
|
||||
|
@ -12,6 +12,8 @@
|
||||
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Los Alamos National Security, LLC.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -84,7 +86,7 @@ void orte_rml_oob_set_uri(const char*);
|
||||
|
||||
int orte_rml_oob_add_exception(orte_rml_exception_callback_t cbfunc);
|
||||
int orte_rml_oob_del_exception(orte_rml_exception_callback_t cbfunc);
|
||||
void orte_rml_oob_exception_callback(const orte_process_name_t *peer,
|
||||
void orte_rml_oob_exception_callback(orte_process_name_t *peer,
|
||||
orte_rml_exception_t exception);
|
||||
|
||||
|
||||
|
@ -1,4 +1,19 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2010 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 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Los Alamos National Security, LLC.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -22,7 +37,7 @@ static OBJ_CLASS_INSTANCE(orte_rml_oob_exception_t, opal_list_item_t,
|
||||
|
||||
|
||||
void
|
||||
orte_rml_oob_exception_callback(const orte_process_name_t *peer,
|
||||
orte_rml_oob_exception_callback(orte_process_name_t *peer,
|
||||
orte_rml_exception_t exception)
|
||||
{
|
||||
opal_list_item_t *item;
|
||||
|
@ -52,7 +52,6 @@ BEGIN_C_DECLS
|
||||
|
||||
|
||||
struct opal_buffer_t;
|
||||
struct orte_process_name_t;
|
||||
struct orte_rml_module_t;
|
||||
typedef struct {
|
||||
opal_object_t super;
|
||||
@ -146,7 +145,7 @@ typedef struct orte_rml_component_2_0_0_t orte_rml_component_t;
|
||||
* @param[in] cbdata User data passed to send_nb()
|
||||
*/
|
||||
typedef void (*orte_rml_callback_fn_t)(int status,
|
||||
struct orte_process_name_t* peer,
|
||||
orte_process_name_t* peer,
|
||||
struct iovec* msg,
|
||||
int count,
|
||||
orte_rml_tag_t tag,
|
||||
@ -171,7 +170,7 @@ typedef void (*orte_rml_callback_fn_t)(int status,
|
||||
* @param[in] cbdata User data passed to send_buffer_nb() or recv_buffer_nb()
|
||||
*/
|
||||
typedef void (*orte_rml_buffer_callback_fn_t)(int status,
|
||||
struct orte_process_name_t* peer,
|
||||
orte_process_name_t* peer,
|
||||
struct opal_buffer_t* buffer,
|
||||
orte_rml_tag_t tag,
|
||||
void* cbdata);
|
||||
@ -188,7 +187,7 @@ typedef void (*orte_rml_buffer_callback_fn_t)(int status,
|
||||
* @param[in] peer Name of peer process
|
||||
* @param[in] exception Description of the error causing the exception
|
||||
*/
|
||||
typedef void (*orte_rml_exception_callback_t)(const orte_process_name_t* peer,
|
||||
typedef void (*orte_rml_exception_callback_t)(orte_process_name_t* peer,
|
||||
orte_rml_exception_t exception);
|
||||
|
||||
|
||||
@ -315,7 +314,7 @@ typedef int (*orte_rml_module_ping_fn_t)(const char* contact_info,
|
||||
* receiving process is not available
|
||||
* @retval ORTE_ERROR An unspecified error occurred
|
||||
*/
|
||||
typedef int (*orte_rml_module_send_nb_fn_t)(struct orte_process_name_t* peer,
|
||||
typedef int (*orte_rml_module_send_nb_fn_t)(orte_process_name_t* peer,
|
||||
struct iovec* msg,
|
||||
int count,
|
||||
orte_rml_tag_t tag,
|
||||
@ -345,7 +344,7 @@ typedef int (*orte_rml_module_send_nb_fn_t)(struct orte_process_name_t* peer,
|
||||
* receiving process is not available
|
||||
* @retval ORTE_ERROR An unspecified error occurred
|
||||
*/
|
||||
typedef int (*orte_rml_module_send_buffer_nb_fn_t)(struct orte_process_name_t* peer,
|
||||
typedef int (*orte_rml_module_send_buffer_nb_fn_t)(orte_process_name_t* peer,
|
||||
struct opal_buffer_t* buffer,
|
||||
orte_rml_tag_t tag,
|
||||
orte_rml_buffer_callback_fn_t cbfunc,
|
||||
@ -360,7 +359,7 @@ typedef int (*orte_rml_module_send_buffer_nb_fn_t)(struct orte_process_name_t* p
|
||||
* @param[in] cbfunc Callback function on message comlpetion
|
||||
* @param[in] cbdata User data to provide during completion callback
|
||||
*/
|
||||
typedef void (*orte_rml_module_recv_nb_fn_t)(struct orte_process_name_t* peer,
|
||||
typedef void (*orte_rml_module_recv_nb_fn_t)(orte_process_name_t* peer,
|
||||
orte_rml_tag_t tag,
|
||||
bool persistent,
|
||||
orte_rml_callback_fn_t cbfunc,
|
||||
@ -376,7 +375,7 @@ typedef void (*orte_rml_module_recv_nb_fn_t)(struct orte_process_name_t* peer,
|
||||
* @param[in] cbfunc Callback function on message comlpetion
|
||||
* @param[in] cbdata User data to provide during completion callback
|
||||
*/
|
||||
typedef void (*orte_rml_module_recv_buffer_nb_fn_t)(struct orte_process_name_t* peer,
|
||||
typedef void (*orte_rml_module_recv_buffer_nb_fn_t)(orte_process_name_t* peer,
|
||||
orte_rml_tag_t tag,
|
||||
bool persistent,
|
||||
orte_rml_buffer_callback_fn_t cbfunc,
|
||||
@ -427,7 +426,7 @@ typedef int (*orte_rml_module_ft_event_fn_t)(int state);
|
||||
* to/from a specified process. Used when a process aborts
|
||||
* and is to be restarted
|
||||
*/
|
||||
typedef void (*orte_rml_module_purge_fn_t)(struct orte_process_name_t *peer);
|
||||
typedef void (*orte_rml_module_purge_fn_t)(orte_process_name_t *peer);
|
||||
|
||||
/* ******************************************************************** */
|
||||
|
||||
|
@ -16,6 +16,8 @@
|
||||
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -188,23 +190,23 @@ opal_dstore_attr_t *pmix_server_create_shared_segment(orte_jobid_t jid)
|
||||
return attr;
|
||||
}
|
||||
|
||||
int pack_segment_info(opal_identifier_t id, opal_buffer_t *reply)
|
||||
int pack_segment_info(opal_process_name_t id, opal_buffer_t *reply)
|
||||
{
|
||||
opal_dstore_attr_t *attr;
|
||||
int rc;
|
||||
bool found_trk = false;
|
||||
OPAL_LIST_FOREACH(attr, &meta_segments, opal_dstore_attr_t) {
|
||||
if (attr->jobid == opal_process_name_jobid(id)) {
|
||||
if (attr->jobid == id.jobid) {
|
||||
found_trk = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found_trk) {
|
||||
/* create new segment for this job id and attach to it*/
|
||||
attr = pmix_server_create_shared_segment(opal_process_name_jobid(id));
|
||||
attr = pmix_server_create_shared_segment(id.jobid);
|
||||
}
|
||||
/* pack proc id into reply buffer */
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &id, 1, OPAL_UINT64))) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &id, 1, OPAL_NAME))) {
|
||||
return OPAL_ERROR;
|
||||
}
|
||||
/* pack seg info into reply buffer */
|
||||
@ -267,7 +269,15 @@ int pmix_server_init(void)
|
||||
ORTE_JOB_FAMILY_PRINT(ORTE_PROC_MY_NAME->jobid), "pmix");
|
||||
|
||||
/* add it to our launch environment so our children get it */
|
||||
(void)asprintf(&pmix_server_uri, "%"PRIu64":%s", *(opal_identifier_t*)&orte_process_info.my_name, address.sun_path);
|
||||
#if 0
|
||||
(void)asprintf(&pmix_server_uri, "%s:%s",
|
||||
OPAL_NAME_PRINT(orte_process_info.my_name),
|
||||
address.sun_path);
|
||||
#else
|
||||
(void)asprintf(&pmix_server_uri, "%"PRIu32".%"PRIu32":%s",
|
||||
orte_process_info.my_name.jobid,
|
||||
orte_process_info.my_name.vpid, address.sun_path);
|
||||
#endif
|
||||
opal_output_verbose(2, pmix_server_output,
|
||||
"%s PMIX server uri: %s",
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), pmix_server_uri);
|
||||
@ -509,7 +519,7 @@ static void connection_handler(int incoming_sd, short flags, void* cbdata)
|
||||
OPAL_ERROR_LOG(rc);
|
||||
return;
|
||||
}
|
||||
memcpy(&peer->name, &hdr.id, sizeof(opal_identifier_t));
|
||||
peer->name = hdr.id;
|
||||
peer->state = PMIX_SERVER_ACCEPTING;
|
||||
peer->sd = sd;
|
||||
}
|
||||
@ -593,7 +603,7 @@ pmix_server_peer_t* pmix_server_peer_lookup(int sd)
|
||||
}
|
||||
|
||||
|
||||
static pmix_server_trk_t* get_trk(opal_identifier_t *id,
|
||||
static pmix_server_trk_t* get_trk(opal_process_name_t *id,
|
||||
orte_grpcomm_signature_t *sig)
|
||||
{
|
||||
pmix_server_trk_t *trk;
|
||||
@ -681,7 +691,7 @@ static void pmix_server_recv(int status, orte_process_name_t* sender,
|
||||
orte_process_name_t name;
|
||||
int rc;
|
||||
int32_t cnt;
|
||||
opal_identifier_t id;
|
||||
opal_process_name_t id;
|
||||
pmix_server_trk_t *trk;
|
||||
pmix_server_local_t *lcl;
|
||||
uint32_t tag;
|
||||
@ -696,7 +706,7 @@ static void pmix_server_recv(int status, orte_process_name_t* sender,
|
||||
/* unpack the id of the proc involved - must be one
|
||||
* of my local children */
|
||||
cnt = 1;
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.unpack(buffer, &id, &cnt, OPAL_UINT64))) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.unpack(buffer, &id, &cnt, OPAL_NAME))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return;
|
||||
}
|
||||
@ -772,7 +782,7 @@ static void pmix_server_release(int status,
|
||||
int rc;
|
||||
opal_pmix_scope_t scope;
|
||||
int32_t cnt;
|
||||
opal_identifier_t id;
|
||||
opal_process_name_t id;
|
||||
size_t i;
|
||||
uint32_t np;
|
||||
bool stored;
|
||||
@ -841,7 +851,7 @@ static void pmix_server_release(int status,
|
||||
}
|
||||
/* extract the id of the contributor from the blob */
|
||||
cnt = 1;
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.unpack(msg, &id, &cnt, OPAL_UINT64))) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.unpack(msg, &id, &cnt, OPAL_NAME))) {
|
||||
OPAL_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(reply);
|
||||
OBJ_RELEASE(reply_short);
|
||||
@ -934,7 +944,7 @@ static void pmix_server_dmdx_recv(int status, orte_process_name_t* sender,
|
||||
int32_t cnt;
|
||||
opal_buffer_t *reply, *bptr, buf;
|
||||
opal_value_t *kvp, *kvp2, kv, *kp;
|
||||
opal_identifier_t idreq;
|
||||
opal_process_name_t idreq;
|
||||
orte_process_name_t name;
|
||||
orte_job_t *jdata;
|
||||
orte_proc_t *proc;
|
||||
@ -949,7 +959,7 @@ static void pmix_server_dmdx_recv(int status, orte_process_name_t* sender,
|
||||
|
||||
/* unpack the id of the proc whose data is being requested */
|
||||
cnt = 1;
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.unpack(buffer, &idreq, &cnt, OPAL_UINT64))) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.unpack(buffer, &idreq, &cnt, OPAL_NAME))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return;
|
||||
}
|
||||
@ -967,7 +977,7 @@ static void pmix_server_dmdx_recv(int status, orte_process_name_t* sender,
|
||||
/* send back an error - they obviously have made a mistake */
|
||||
reply = OBJ_NEW(opal_buffer_t);
|
||||
/* pack the id of the requested proc */
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &idreq, 1, OPAL_UINT64))) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &idreq, 1, OPAL_NAME))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(reply);
|
||||
return;
|
||||
@ -1028,7 +1038,7 @@ static void pmix_server_dmdx_recv(int status, orte_process_name_t* sender,
|
||||
/* return it */
|
||||
reply = OBJ_NEW(opal_buffer_t);
|
||||
/* pack the id of the requested proc */
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &idreq, 1, OPAL_UINT64))) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &idreq, 1, OPAL_NAME))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(reply);
|
||||
return;
|
||||
@ -1129,9 +1139,8 @@ static void pmix_server_dmdx_resp(int status, orte_process_name_t* sender,
|
||||
int rc, ret;
|
||||
int32_t cnt;
|
||||
opal_buffer_t *reply, xfer, *bptr, *data, *reply_short;
|
||||
opal_identifier_t target;
|
||||
opal_process_name_t target;
|
||||
opal_value_t kv;
|
||||
orte_process_name_t name;
|
||||
orte_proc_t *proc, *proc_peer;
|
||||
bool stored;
|
||||
|
||||
@ -1142,13 +1151,12 @@ static void pmix_server_dmdx_resp(int status, orte_process_name_t* sender,
|
||||
|
||||
/* unpack the id of the target whose info we just received */
|
||||
cnt = 1;
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.unpack(buffer, &target, &cnt, OPAL_UINT64))) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.unpack(buffer, &target, &cnt, OPAL_NAME))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return;
|
||||
}
|
||||
|
||||
memcpy((char*)&name, (char*)&target, sizeof(orte_process_name_t));
|
||||
proc = orte_get_proc_object(&name);
|
||||
proc = orte_get_proc_object(&target);
|
||||
|
||||
/* unpack the status */
|
||||
cnt = 1;
|
||||
@ -1186,7 +1194,7 @@ static void pmix_server_dmdx_resp(int status, orte_process_name_t* sender,
|
||||
* process */
|
||||
reply_short = NULL;
|
||||
OPAL_LIST_FOREACH_SAFE(req, nxt, &pmix_server_pending_dmx_reqs, pmix_server_dmx_req_t) {
|
||||
if (target == req->target) {
|
||||
if (0 == opal_compare_proc(target, req->target)) {
|
||||
/* get the proc object for the peer */
|
||||
proc_peer = orte_get_proc_object(&req->peer->name);
|
||||
/* check if peer has access to shared memory dstore,
|
||||
|
@ -14,6 +14,8 @@
|
||||
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2011 Oak Ridge National Labs. All rights reserved.
|
||||
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -89,13 +91,13 @@ int pmix_server_send_connect_ack(pmix_server_peer_t* peer)
|
||||
/* send a handshake that includes our process identifier
|
||||
* to ensure we are talking to another OMPI process
|
||||
*/
|
||||
memcpy(&hdr.id, ORTE_PROC_MY_NAME, sizeof(opal_identifier_t));
|
||||
hdr.id = *ORTE_PROC_MY_NAME;
|
||||
hdr.type = PMIX_USOCK_IDENT;
|
||||
hdr.tag = UINT32_MAX;
|
||||
|
||||
/* get our security credential*/
|
||||
if (OPAL_SUCCESS != (rc = opal_sec.get_my_credential(opal_dstore_internal,
|
||||
(opal_identifier_t*)ORTE_PROC_MY_NAME, &cred))) {
|
||||
ORTE_PROC_MY_NAME, &cred))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
@ -264,7 +266,7 @@ int pmix_server_recv_connect_ack(pmix_server_peer_t* pr, int sd,
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
||||
(NULL == peer) ? "UNKNOWN" : ORTE_NAME_PRINT(&peer->name));
|
||||
|
||||
memcpy(&sender, &hdr.id, sizeof(opal_identifier_t));
|
||||
sender = hdr.id;
|
||||
/* if we don't already have it, get the peer */
|
||||
if (NULL == peer) {
|
||||
peer = pmix_server_peer_lookup(sd);
|
||||
|
@ -15,6 +15,8 @@
|
||||
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -78,7 +80,7 @@ typedef uint8_t pmix_cmd_t;
|
||||
/* header for pmix client-server msgs - must
|
||||
* match that in opal/mca/pmix/native! */
|
||||
typedef struct {
|
||||
opal_identifier_t id;
|
||||
opal_process_name_t id;
|
||||
uint8_t type;
|
||||
uint32_t tag;
|
||||
size_t nbytes;
|
||||
@ -136,7 +138,7 @@ typedef struct {
|
||||
opal_list_item_t super;
|
||||
pmix_server_peer_t *peer;
|
||||
orte_proc_t *proxy;
|
||||
opal_identifier_t target;
|
||||
opal_process_name_t target;
|
||||
uint32_t tag;
|
||||
} pmix_server_dmx_req_t;
|
||||
OBJ_CLASS_DECLARATION(pmix_server_dmx_req_t);
|
||||
@ -201,7 +203,7 @@ extern void pmix_server_peer_event_init(pmix_server_peer_t* peer);
|
||||
extern char* pmix_server_state_print(pmix_server_state_t state);
|
||||
extern pmix_server_peer_t* pmix_server_peer_lookup(int sd);
|
||||
extern void pmix_server_peer_dump(pmix_server_peer_t* peer, const char* msg);
|
||||
extern int pack_segment_info(opal_identifier_t id, opal_buffer_t *reply);
|
||||
extern int pack_segment_info(opal_process_name_t id, opal_buffer_t *reply);
|
||||
|
||||
|
||||
/* exposed shared variables */
|
||||
|
@ -16,6 +16,8 @@
|
||||
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -482,7 +484,7 @@ static int stuff_proc_values(opal_buffer_t *reply, orte_job_t *jdata, orte_proc_
|
||||
tmp = NULL;
|
||||
if (orte_get_attribute(&pptr->attributes, ORTE_PROC_CPU_BITMAP, (void**)&tmp, OPAL_STRING)) {
|
||||
/* add the name of the proc */
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(&buf, (opal_identifier_t*)&pptr->name, 1, OPAL_UINT64))) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(&buf, &pptr->name, 1, OPAL_NAME))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
opal_argv_free(list);
|
||||
return rc;
|
||||
@ -517,8 +519,8 @@ static int stuff_proc_values(opal_buffer_t *reply, orte_job_t *jdata, orte_proc_
|
||||
/* pass the local ldr */
|
||||
OBJ_CONSTRUCT(&kv, opal_value_t);
|
||||
kv.key = strdup(PMIX_LOCALLDR);
|
||||
kv.type = OPAL_UINT64;
|
||||
kv.data.uint64 = *(uint64_t*)&name;
|
||||
kv.type = OPAL_NAME;
|
||||
kv.data.name = name;
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &kp, 1, OPAL_VALUE))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OBJ_DESTRUCT(&kv);
|
||||
@ -622,7 +624,7 @@ static void process_message(pmix_server_peer_t *peer)
|
||||
opal_buffer_t *reply, xfer, *bptr, buf, save, blocal, bremote;
|
||||
opal_buffer_t *data;
|
||||
opal_value_t kv, *kvp, *kvp2, *kp;
|
||||
opal_identifier_t id, idreq;
|
||||
opal_process_name_t id, idreq;
|
||||
orte_process_name_t name;
|
||||
orte_job_t *jdata;
|
||||
orte_proc_t *proc;
|
||||
@ -727,7 +729,7 @@ static void process_message(pmix_server_peer_t *peer)
|
||||
if (0 < sig->sz) {
|
||||
sig->signature = (orte_process_name_t*)malloc(sig->sz * sizeof(orte_process_name_t));
|
||||
cnt = sig->sz;
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.unpack(&xfer, sig->signature, &cnt, OPAL_UINT64))) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.unpack(&xfer, sig->signature, &cnt, OPAL_NAME))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(sig);
|
||||
goto reply_fence;
|
||||
@ -766,7 +768,7 @@ static void process_message(pmix_server_peer_t *peer)
|
||||
OBJ_CONSTRUCT(&save, opal_buffer_t);
|
||||
if (orte_process_info.num_procs < orte_direct_modex_cutoff) {
|
||||
/* need to include the id of the sender for later unpacking */
|
||||
opal_dss.pack(&save, &id, 1, OPAL_UINT64);
|
||||
opal_dss.pack(&save, &id, 1, OPAL_NAME);
|
||||
opal_dss.copy_payload(&save, &xfer);
|
||||
}
|
||||
|
||||
@ -878,7 +880,7 @@ static void process_message(pmix_server_peer_t *peer)
|
||||
/* see if anyone is waiting for it - we send a response even if no data
|
||||
* was actually provided so we don't hang if no modex data is being given */
|
||||
OPAL_LIST_FOREACH_SAFE(req, nextreq, &pmix_server_pending_dmx_reqs, pmix_server_dmx_req_t) {
|
||||
if (id == req->target) {
|
||||
if (0 == opal_compare_proc(id, req->target)) {
|
||||
/* yes - deliver a copy */
|
||||
reply = OBJ_NEW(opal_buffer_t);
|
||||
if (NULL == req->proxy) {
|
||||
@ -995,7 +997,7 @@ static void process_message(pmix_server_peer_t *peer)
|
||||
PMIX_SERVER_QUEUE_SEND(req->peer, req->tag, reply);
|
||||
} else {
|
||||
/* pack the id of the requested proc */
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &id, 1, OPAL_UINT64))) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &id, 1, OPAL_NAME))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(reply);
|
||||
OBJ_DESTRUCT(&xfer);
|
||||
@ -1051,7 +1053,7 @@ static void process_message(pmix_server_peer_t *peer)
|
||||
/* send notification to myself */
|
||||
reply = OBJ_NEW(opal_buffer_t);
|
||||
/* pack the id of the sender */
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &id, 1, OPAL_UINT64))) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &id, 1, OPAL_NAME))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(reply);
|
||||
OBJ_RELEASE(sig);
|
||||
@ -1119,7 +1121,7 @@ static void process_message(pmix_server_peer_t *peer)
|
||||
proc_peer = orte_get_proc_object(&name);
|
||||
/* unpack the id of the proc whose data is being requested */
|
||||
cnt = 1;
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.unpack(&xfer, &idreq, &cnt, OPAL_UINT64))) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.unpack(&xfer, &idreq, &cnt, OPAL_NAME))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OBJ_DESTRUCT(&xfer);
|
||||
return;
|
||||
@ -1173,7 +1175,7 @@ static void process_message(pmix_server_peer_t *peer)
|
||||
/* are we already tracking it? */
|
||||
found = false;
|
||||
OPAL_LIST_FOREACH(req, &pmix_server_pending_dmx_reqs, pmix_server_dmx_req_t) {
|
||||
if (idreq == req->target) {
|
||||
if (0 == opal_compare_proc(idreq, req->target)) {
|
||||
/* yes, so we don't need to send another request, but
|
||||
* we do need to track that this peer also wants
|
||||
* a copy */
|
||||
@ -1208,7 +1210,7 @@ static void process_message(pmix_server_peer_t *peer)
|
||||
/* setup the request */
|
||||
reply = OBJ_NEW(opal_buffer_t);
|
||||
/* pack the proc we want info about */
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &idreq, 1, OPAL_UINT64))) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.pack(reply, &idreq, 1, OPAL_NAME))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return;
|
||||
}
|
||||
@ -1894,7 +1896,7 @@ int pmix_server_peer_recv_connect_ack(pmix_server_peer_t* pr,
|
||||
|
||||
/* if we don't already have it, get the peer */
|
||||
if (NULL == peer) {
|
||||
memcpy(&sender, &hdr.id, sizeof(opal_identifier_t));
|
||||
sender = hdr.id;
|
||||
peer = pmix_server_peer_lookup(sd);
|
||||
if (NULL == peer) {
|
||||
opal_output_verbose(2, pmix_server_output,
|
||||
|
@ -38,83 +38,6 @@ int orte_dt_compare_std_cntr(orte_std_cntr_t *value1, orte_std_cntr_t *value2, o
|
||||
return OPAL_EQUAL;
|
||||
}
|
||||
|
||||
int orte_dt_compare_name(orte_process_name_t *value1,
|
||||
orte_process_name_t *value2,
|
||||
opal_data_type_t type)
|
||||
{
|
||||
if (NULL == value1 && NULL == value2) {
|
||||
return OPAL_EQUAL;
|
||||
} else if (NULL == value1) {
|
||||
return OPAL_VALUE2_GREATER;
|
||||
} else if (NULL == value2) {
|
||||
return OPAL_VALUE1_GREATER;
|
||||
}
|
||||
|
||||
/* If any of the fields are wildcard,
|
||||
* then we want to just ignore that one field. In the case
|
||||
* of ORTE_NAME_WILDCARD (where ALL of the fields are wildcard), this
|
||||
* will automatically result in OPAL_EQUAL for any name in the other
|
||||
* value - a totally useless result, but consistent in behavior.
|
||||
*/
|
||||
|
||||
/** check the jobids - if one of them is WILDCARD, then ignore
|
||||
* this field since anything is okay
|
||||
*/
|
||||
if (value1->jobid != ORTE_JOBID_WILDCARD &&
|
||||
value2->jobid != ORTE_JOBID_WILDCARD) {
|
||||
if (value1->jobid < value2->jobid) {
|
||||
return OPAL_VALUE2_GREATER;
|
||||
} else if (value1->jobid > value2->jobid) {
|
||||
return OPAL_VALUE1_GREATER;
|
||||
}
|
||||
}
|
||||
|
||||
/** check the vpids - if one of them is WILDCARD, then ignore
|
||||
* this field since anything is okay
|
||||
*/
|
||||
if (value1->vpid != ORTE_VPID_WILDCARD &&
|
||||
value2->vpid != ORTE_VPID_WILDCARD) {
|
||||
if (value1->vpid < value2->vpid) {
|
||||
return OPAL_VALUE2_GREATER;
|
||||
} else if (value1->vpid > value2->vpid) {
|
||||
return OPAL_VALUE1_GREATER;
|
||||
}
|
||||
}
|
||||
|
||||
/** only way to get here is if all fields are equal or WILDCARD */
|
||||
return OPAL_EQUAL;
|
||||
}
|
||||
|
||||
int orte_dt_compare_vpid(orte_vpid_t *value1,
|
||||
orte_vpid_t *value2,
|
||||
opal_data_type_t type)
|
||||
{
|
||||
/** if either value is WILDCARD, then return equal */
|
||||
if (*value1 == ORTE_VPID_WILDCARD ||
|
||||
*value2 == ORTE_VPID_WILDCARD) return OPAL_EQUAL;
|
||||
|
||||
if (*value1 > *value2) return OPAL_VALUE1_GREATER;
|
||||
|
||||
if (*value2 > *value1) return OPAL_VALUE2_GREATER;
|
||||
|
||||
return OPAL_EQUAL;
|
||||
}
|
||||
|
||||
int orte_dt_compare_jobid(orte_jobid_t *value1,
|
||||
orte_jobid_t *value2,
|
||||
opal_data_type_t type)
|
||||
{
|
||||
/** if either value is WILDCARD, then return equal */
|
||||
if (*value1 == ORTE_JOBID_WILDCARD ||
|
||||
*value2 == ORTE_JOBID_WILDCARD) return OPAL_EQUAL;
|
||||
|
||||
if (*value1 > *value2) return OPAL_VALUE1_GREATER;
|
||||
|
||||
if (*value2 > *value1) return OPAL_VALUE2_GREATER;
|
||||
|
||||
return OPAL_EQUAL;
|
||||
}
|
||||
|
||||
/**
|
||||
* JOB
|
||||
*/
|
||||
|
@ -52,62 +52,6 @@ int orte_dt_copy_std_cntr(orte_std_cntr_t **dest, orte_std_cntr_t *src, opal_dat
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
/* PROCESS NAME */
|
||||
int orte_dt_copy_name(orte_process_name_t **dest, orte_process_name_t *src, opal_data_type_t type)
|
||||
{
|
||||
orte_process_name_t *val;
|
||||
|
||||
val = (orte_process_name_t*)malloc(sizeof(orte_process_name_t));
|
||||
if (NULL == val) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
val->jobid = src->jobid;
|
||||
val->vpid = src->vpid;
|
||||
|
||||
*dest = val;
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* JOBID
|
||||
*/
|
||||
int orte_dt_copy_jobid(orte_jobid_t **dest, orte_jobid_t *src, opal_data_type_t type)
|
||||
{
|
||||
orte_jobid_t *val;
|
||||
|
||||
val = (orte_jobid_t*)malloc(sizeof(orte_jobid_t));
|
||||
if (NULL == val) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
*val = *src;
|
||||
*dest = val;
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* VPID
|
||||
*/
|
||||
int orte_dt_copy_vpid(orte_vpid_t **dest, orte_vpid_t *src, opal_data_type_t type)
|
||||
{
|
||||
orte_vpid_t *val;
|
||||
|
||||
val = (orte_vpid_t*)malloc(sizeof(orte_vpid_t));
|
||||
if (NULL == val) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
*val = *src;
|
||||
*dest = val;
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* JOB
|
||||
*/
|
||||
|
@ -53,95 +53,6 @@ int orte_dt_pack_std_cntr(opal_buffer_t *buffer, const void *src,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* NAME
|
||||
*/
|
||||
int orte_dt_pack_name(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type)
|
||||
{
|
||||
int rc;
|
||||
int32_t i;
|
||||
orte_process_name_t* proc;
|
||||
orte_jobid_t *jobid;
|
||||
orte_vpid_t *vpid;
|
||||
|
||||
/* collect all the jobids in a contiguous array */
|
||||
jobid = (orte_jobid_t*)malloc(num_vals * sizeof(orte_jobid_t));
|
||||
if (NULL == jobid) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
proc = (orte_process_name_t*)src;
|
||||
for (i=0; i < num_vals; i++) {
|
||||
jobid[i] = proc->jobid;
|
||||
proc++;
|
||||
}
|
||||
/* now pack them in one shot */
|
||||
if (ORTE_SUCCESS != (rc =
|
||||
orte_dt_pack_jobid(buffer, jobid, num_vals, ORTE_JOBID))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
free(jobid);
|
||||
return rc;
|
||||
}
|
||||
free(jobid);
|
||||
|
||||
/* collect all the vpids in a contiguous array */
|
||||
vpid = (orte_vpid_t*)malloc(num_vals * sizeof(orte_vpid_t));
|
||||
if (NULL == vpid) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
proc = (orte_process_name_t*)src;
|
||||
for (i=0; i < num_vals; i++) {
|
||||
vpid[i] = proc->vpid;
|
||||
proc++;
|
||||
}
|
||||
/* now pack them in one shot */
|
||||
if (ORTE_SUCCESS != (rc =
|
||||
orte_dt_pack_vpid(buffer, vpid, num_vals, ORTE_VPID))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
free(vpid);
|
||||
return rc;
|
||||
}
|
||||
free(vpid);
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* JOBID
|
||||
*/
|
||||
int orte_dt_pack_jobid(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Turn around and pack the real type */
|
||||
if (ORTE_SUCCESS != (
|
||||
ret = opal_dss_pack_buffer(buffer, src, num_vals, ORTE_JOBID_T))) {
|
||||
ORTE_ERROR_LOG(ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* VPID
|
||||
*/
|
||||
int orte_dt_pack_vpid(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Turn around and pack the real type */
|
||||
if (ORTE_SUCCESS != (
|
||||
ret = opal_dss_pack_buffer(buffer, src, num_vals, ORTE_VPID_T))) {
|
||||
ORTE_ERROR_LOG(ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* JOB
|
||||
* NOTE: We do not pack all of the job object's fields as many of them have no
|
||||
|
@ -129,16 +129,6 @@ int orte_dt_std_print(char **output, char *prefix, void *src, opal_data_type_t t
|
||||
orte_dt_quick_print(output, "ORTE_STD_CNTR", prefix, src, ORTE_STD_CNTR_T);
|
||||
break;
|
||||
|
||||
case ORTE_VPID:
|
||||
orte_dt_quick_print(output, "ORTE_VPID", prefix, src, ORTE_VPID_T);
|
||||
break;
|
||||
|
||||
case ORTE_JOBID:
|
||||
asprintf(output, "%sData Type: ORTE_JOBID\tData size: %lu\tValue: %s",
|
||||
(NULL == prefix) ? "" : prefix, (unsigned long)sizeof(orte_jobid_t),
|
||||
ORTE_JOBID_PRINT(*(orte_jobid_t*)src));
|
||||
break;
|
||||
|
||||
case ORTE_PROC_STATE:
|
||||
orte_dt_quick_print(output, "ORTE_PROC_STATE", prefix, src, ORTE_PROC_STATE_T);
|
||||
break;
|
||||
@ -175,25 +165,6 @@ int orte_dt_std_print(char **output, char *prefix, void *src, opal_data_type_t t
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* NAME
|
||||
*/
|
||||
int orte_dt_print_name(char **output, char *prefix, orte_process_name_t *name, opal_data_type_t type)
|
||||
{
|
||||
/* set default result */
|
||||
*output = NULL;
|
||||
|
||||
if (NULL == name) {
|
||||
asprintf(output, "%sData type: ORTE_PROCESS_NAME\tData Value: NULL",
|
||||
(NULL == prefix ? " " : prefix));
|
||||
} else {
|
||||
asprintf(output, "%sData type: ORTE_PROCESS_NAME\tData Value: %s",
|
||||
(NULL == prefix ? " " : prefix), ORTE_NAME_PRINT(name));
|
||||
}
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* JOB
|
||||
*/
|
||||
|
@ -46,15 +46,6 @@ BEGIN_C_DECLS
|
||||
|
||||
/** Data type compare functions */
|
||||
int orte_dt_compare_std_cntr(orte_std_cntr_t *value1, orte_std_cntr_t *value2, opal_data_type_t type);
|
||||
int orte_dt_compare_name(orte_process_name_t *value1,
|
||||
orte_process_name_t *value2,
|
||||
opal_data_type_t type);
|
||||
int orte_dt_compare_jobid(orte_jobid_t *value1,
|
||||
orte_jobid_t *value2,
|
||||
opal_data_type_t type);
|
||||
int orte_dt_compare_vpid(orte_vpid_t *value1,
|
||||
orte_vpid_t *value2,
|
||||
opal_data_type_t type);
|
||||
int orte_dt_compare_job(orte_job_t *value1, orte_job_t *value2, opal_data_type_t type);
|
||||
int orte_dt_compare_node(orte_node_t *value1, orte_node_t *value2, opal_data_type_t type);
|
||||
int orte_dt_compare_proc(orte_proc_t *value1, orte_proc_t *value2, opal_data_type_t type);
|
||||
@ -82,9 +73,6 @@ int orte_dt_compare_sig(orte_grpcomm_signature_t *value1, orte_grpcomm_signature
|
||||
|
||||
/** Data type copy functions */
|
||||
int orte_dt_copy_std_cntr(orte_std_cntr_t **dest, orte_std_cntr_t *src, opal_data_type_t type);
|
||||
int orte_dt_copy_name(orte_process_name_t **dest, orte_process_name_t *src, opal_data_type_t type);
|
||||
int orte_dt_copy_jobid(orte_jobid_t **dest, orte_jobid_t *src, opal_data_type_t type);
|
||||
int orte_dt_copy_vpid(orte_vpid_t **dest, orte_vpid_t *src, opal_data_type_t type);
|
||||
int orte_dt_copy_job(orte_job_t **dest, orte_job_t *src, opal_data_type_t type);
|
||||
int orte_dt_copy_node(orte_node_t **dest, orte_node_t *src, opal_data_type_t type);
|
||||
int orte_dt_copy_proc(orte_proc_t **dest, orte_proc_t *src, opal_data_type_t type);
|
||||
@ -105,14 +93,6 @@ int orte_dt_copy_sig(orte_grpcomm_signature_t **dest, orte_grpcomm_signature_t *
|
||||
/** Data type pack functions */
|
||||
int orte_dt_pack_std_cntr(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int orte_dt_pack_jobid(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int orte_dt_pack_name(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int orte_dt_pack_jobid(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int orte_dt_pack_vpid(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int orte_dt_pack_job(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int orte_dt_pack_node(opal_buffer_t *buffer, const void *src,
|
||||
@ -146,7 +126,6 @@ int orte_dt_pack_sig(opal_buffer_t *buffer, const void *src, int32_t num_vals,
|
||||
|
||||
/** Data type print functions */
|
||||
int orte_dt_std_print(char **output, char *prefix, void *src, opal_data_type_t type);
|
||||
int orte_dt_print_name(char **output, char *prefix, orte_process_name_t *name, opal_data_type_t type);
|
||||
int orte_dt_print_job(char **output, char *prefix, orte_job_t *src, opal_data_type_t type);
|
||||
int orte_dt_print_node(char **output, char *prefix, orte_node_t *src, opal_data_type_t type);
|
||||
int orte_dt_print_proc(char **output, char *prefix, orte_proc_t *src, opal_data_type_t type);
|
||||
@ -158,12 +137,6 @@ int orte_dt_print_sig(char **output, char *prefix, orte_grpcomm_signature_t *src
|
||||
/** Data type unpack functions */
|
||||
int orte_dt_unpack_std_cntr(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
int orte_dt_unpack_name(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
int orte_dt_unpack_jobid(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
int orte_dt_unpack_vpid(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
int orte_dt_unpack_job(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
int orte_dt_unpack_node(opal_buffer_t *buffer, void *dest,
|
||||
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче
Block a user