Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion opal/mca/pmix/external/pmix_ext.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2015 Research Organization for Information Science
* Copyright (c) 2014-2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2014 Mellanox Technologies, Inc.
* All rights reserved.
Expand Down Expand Up @@ -490,6 +490,7 @@ static void opcon(pmix_ext_opcaddy_t *p)
p->ninfo = 0;
p->apps = NULL;
p->sz = 0;
p->active = false;
p->opcbfunc = NULL;
p->mdxcbfunc = NULL;
p->valcbfunc = NULL;
Expand Down
3 changes: 3 additions & 0 deletions opal/mca/pmix/external/pmix_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2015 Mellanox Technologies, Inc.
* All rights reserved.
* Copyright (c) 2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -61,6 +63,7 @@ typedef struct {
size_t ninfo;
pmix_app_t *apps;
size_t sz;
volatile bool active;
opal_pmix_op_cbfunc_t opcbfunc;
opal_pmix_modex_cbfunc_t mdxcbfunc;
opal_pmix_value_cbfunc_t valcbfunc;
Expand Down
34 changes: 23 additions & 11 deletions opal/mca/pmix/external/pmix_ext_server_south.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2016 Research Organization for Information Science
* Copyright (c) 2014-2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2014 Mellanox Technologies, Inc.
* All rights reserved.
Expand Down Expand Up @@ -54,6 +54,14 @@ static void release_cbfunc(void *cbdata)
pmix_ext_opalcaddy_t *cd = (pmix_ext_opalcaddy_t*)cbdata;
OBJ_RELEASE(cd);
}

#define PMIX_WAIT_FOR_COMPLETION(a) \
do { \
while ((a)) { \
usleep(10); \
} \
} while (0);

static void myerr(pmix_status_t status,
pmix_proc_t procs[], size_t nprocs,
pmix_info_t info[], size_t ninfo)
Expand Down Expand Up @@ -178,7 +186,11 @@ static void opcbfunc(pmix_status_t status, void *cbdata)
if (NULL != op->opcbfunc) {
op->opcbfunc(pmix_ext_convert_rc(status), op->cbdata);
}
OBJ_RELEASE(op);
if (op->active) {
op->active = false;
} else {
OBJ_RELEASE(op);
}
}

int pmix_ext_server_register_nspace(opal_jobid_t jobid,
Expand All @@ -192,7 +204,7 @@ int pmix_ext_server_register_nspace(opal_jobid_t jobid,
size_t sz, szmap, m, n;
char nspace[PMIX_MAX_NSLEN];
pmix_status_t rc;
pmix_ext_opcaddy_t *op;
pmix_ext_opcaddy_t op;
opal_list_t *pmapinfo;
opal_pmix_ext_jobid_trkr_t *job;

Expand Down Expand Up @@ -238,15 +250,15 @@ int pmix_ext_server_register_nspace(opal_jobid_t jobid,
}

/* setup the caddy */
op = OBJ_NEW(pmix_ext_opcaddy_t);
op->info = pinfo;
op->sz = sz;
op->opcbfunc = cbfunc;
op->cbdata = cbdata;
OBJ_CONSTRUCT(&op, pmix_ext_opcaddy_t);
op.info = pinfo;
op.sz = sz;
op.opcbfunc = cbfunc;
op.cbdata = cbdata;
rc = PMIx_server_register_nspace(nspace, nlocalprocs, pinfo, sz,
opcbfunc, op);
if (PMIX_SUCCESS != rc) {
OBJ_RELEASE(op);
opcbfunc, &op);
if (PMIX_SUCCESS == rc) {
PMIX_WAIT_FOR_COMPLETION(op.active);
}
return pmix_ext_convert_rc(rc);
}
Expand Down
3 changes: 3 additions & 0 deletions opal/mca/pmix/pmix112/pmix1.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* Copyright (c) 2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -59,6 +61,7 @@ typedef struct {
size_t ninfo;
pmix_app_t *apps;
size_t sz;
volatile bool active;
opal_pmix_op_cbfunc_t opcbfunc;
opal_pmix_modex_cbfunc_t mdxcbfunc;
opal_pmix_value_cbfunc_t valcbfunc;
Expand Down
35 changes: 24 additions & 11 deletions opal/mca/pmix/pmix112/pmix1_server_south.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2016 Research Organization for Information Science
* Copyright (c) 2014-2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2014 Mellanox Technologies, Inc.
* All rights reserved.
Expand Down Expand Up @@ -54,6 +54,14 @@ static void release_cbfunc(void *cbdata)
pmix1_opalcaddy_t *cd = (pmix1_opalcaddy_t*)cbdata;
OBJ_RELEASE(cd);
}

#define PMIX_WAIT_FOR_COMPLETION(a) \
do { \
while ((a)) { \
usleep(10); \
} \
} while (0);

static void myerr(pmix_status_t status,
pmix_proc_t procs[], size_t nprocs,
pmix_info_t info[], size_t ninfo)
Expand Down Expand Up @@ -178,7 +186,11 @@ static void opcbfunc(pmix_status_t status, void *cbdata)
if (NULL != op->opcbfunc) {
op->opcbfunc(pmix1_convert_rc(status), op->cbdata);
}
OBJ_RELEASE(op);
if (op->active) {
op->active = false;
} else {
OBJ_RELEASE(op);
}
}

int pmix1_server_register_nspace(opal_jobid_t jobid,
Expand All @@ -192,7 +204,7 @@ int pmix1_server_register_nspace(opal_jobid_t jobid,
size_t sz, szmap, m, n;
char nspace[PMIX_MAX_NSLEN];
pmix_status_t rc;
pmix1_opcaddy_t *op;
pmix1_opcaddy_t op;
opal_list_t *pmapinfo;
opal_pmix1_jobid_trkr_t *job;

Expand Down Expand Up @@ -238,15 +250,16 @@ int pmix1_server_register_nspace(opal_jobid_t jobid,
}

/* setup the caddy */
op = OBJ_NEW(pmix1_opcaddy_t);
op->info = pinfo;
op->sz = sz;
op->opcbfunc = cbfunc;
op->cbdata = cbdata;
OBJ_CONSTRUCT(&op, pmix1_opcaddy_t);
op.info = pinfo;
op.sz = sz;
op.opcbfunc = cbfunc;
op.cbdata = cbdata;
op.active = true;
rc = PMIx_server_register_nspace(nspace, nlocalprocs, pinfo, sz,
opcbfunc, op);
if (PMIX_SUCCESS != rc) {
OBJ_RELEASE(op);
opcbfunc, &op);
if (PMIX_SUCCESS == rc) {
PMIX_WAIT_FOR_COMPLETION(op.active);
}
return pmix1_convert_rc(rc);
}
Expand Down
3 changes: 2 additions & 1 deletion opal/mca/pmix/pmix112/pmix_pmix1.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2015 Research Organization for Information Science
* Copyright (c) 2014-2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2014 Mellanox Technologies, Inc.
* All rights reserved.
Expand Down Expand Up @@ -490,6 +490,7 @@ static void opcon(pmix1_opcaddy_t *p)
p->ninfo = 0;
p->apps = NULL;
p->sz = 0;
p->active = false;
p->opcbfunc = NULL;
p->mdxcbfunc = NULL;
p->valcbfunc = NULL;
Expand Down
4 changes: 4 additions & 0 deletions orte/mca/ess/hnp/ess_hnp_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* Copyright (c) 2015-2017 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2017 Intel, Inc. All rights reserved.
* Copyright (c) 2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand All @@ -26,6 +28,8 @@
* entire components just to query their version and parameters.
*/

#include "opal/util/argv.h"

#include "orte_config.h"
#include "orte/constants.h"

Expand Down
1 change: 1 addition & 0 deletions orte/runtime/orte_finalize.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include "opal/runtime/opal.h"
#include "opal/util/output.h"
#include "opal/util/argv.h"

#include "orte/mca/ess/ess.h"
#include "orte/mca/ess/base/base.h"
Expand Down