Upgrade the new opal trace system to utilize verbosity. Begin building the trace command into the ORTE system.
This commit was SVN r7267.
Этот коммит содержится в:
родитель
0b255830e0
Коммит
76ccec0cee
@ -17,6 +17,8 @@
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/mca/mca.h"
|
||||
#include "opal/mca/base/base.h"
|
||||
|
||||
#include "opal/util/trace.h"
|
||||
|
||||
@ -31,13 +33,31 @@ static opal_output_stream_t tracer;
|
||||
void opal_trace_init(void)
|
||||
{
|
||||
#if OPAL_ENABLE_TRACE
|
||||
int param, value;
|
||||
|
||||
/* get a file setup for opal_output to use for the trace */
|
||||
OBJ_CONSTRUCT(&tracer, opal_output_stream_t);
|
||||
tracer.lds_file_suffix = "trace";
|
||||
tracer.lds_want_file = true;
|
||||
param = mca_base_param_reg_int_name("trace", "verbose",
|
||||
"Verbosity level for opal trace system",
|
||||
false, false, 0, &value);
|
||||
|
||||
opal_trace_handle = opal_output_open(&tracer);
|
||||
OBJ_CONSTRUCT(&tracer, opal_output_stream_t);
|
||||
|
||||
/* if the value is < 0, then we want the output to go to the screen */
|
||||
if (0 > value) {
|
||||
tracer.lds_want_file = false;
|
||||
tracer.lds_want_stderr = true;
|
||||
value = -1 * value;
|
||||
} else if (0 == value) { /* don't provide any output */
|
||||
opal_trace_handle = -1;
|
||||
return;
|
||||
} else {
|
||||
/* get a file setup for opal_output to use for the trace */
|
||||
tracer.lds_file_suffix = "trace";
|
||||
tracer.lds_want_file = true;
|
||||
}
|
||||
|
||||
tracer.lds_verbose_level = value;
|
||||
|
||||
opal_trace_handle = opal_output_open(&tracer);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -32,9 +32,9 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define OPAL_TRACE() \
|
||||
#define OPAL_TRACE(verbose) \
|
||||
do { \
|
||||
opal_output(opal_trace_handle, "TRACE: %s @ %s:%d", \
|
||||
opal_output_verbose(verbose, opal_trace_handle, "TRACE: %s @ %s:%d", \
|
||||
__func__, __FILE__, __LINE__); \
|
||||
} while (0)
|
||||
#else
|
||||
|
@ -4,14 +4,14 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* 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$
|
||||
*
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
/** @file:
|
||||
@ -28,6 +28,7 @@
|
||||
#include "include/orte_constants.h"
|
||||
#include "dps/dps_types.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/util/trace.h"
|
||||
#include "util/proc_info.h"
|
||||
|
||||
#include "mca/errmgr/errmgr.h"
|
||||
@ -42,16 +43,13 @@ int orte_gpr_proxy_increment_value(orte_gpr_value_t *value)
|
||||
{
|
||||
orte_buffer_t *cmd, *answer;
|
||||
int rc, ret;
|
||||
|
||||
if (orte_gpr_proxy_globals.debug) {
|
||||
opal_output(0, "[%lu,%lu,%lu] gpr_proxy_increment_value entered",
|
||||
ORTE_NAME_ARGS(orte_process_info.my_name));
|
||||
}
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
if (orte_gpr_proxy_globals.compound_cmd_mode) {
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_pack_increment_value(
|
||||
orte_gpr_proxy_globals.compound_cmd,
|
||||
value))) {
|
||||
value))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
}
|
||||
return rc;
|
||||
@ -62,9 +60,9 @@ int orte_gpr_proxy_increment_value(orte_gpr_value_t *value)
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_pack_increment_value(cmd, value))) {
|
||||
OBJ_RELEASE(cmd);
|
||||
OBJ_RELEASE(cmd);
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
@ -72,30 +70,30 @@ int orte_gpr_proxy_increment_value(orte_gpr_value_t *value)
|
||||
if (0 > orte_rml.send_buffer(orte_process_info.gpr_replica, cmd, ORTE_RML_TAG_GPR, 0)) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_COMM_FAILURE);
|
||||
OBJ_RELEASE(cmd);
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
}
|
||||
OBJ_RELEASE(cmd);
|
||||
|
||||
|
||||
answer = OBJ_NEW(orte_buffer_t);
|
||||
if (NULL == answer) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
|
||||
if (0 > orte_rml.recv_buffer(orte_process_info.gpr_replica, answer, ORTE_RML_TAG_GPR)) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_COMM_FAILURE);
|
||||
OBJ_RELEASE(answer);
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_unpack_increment_value(answer, &ret))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(answer);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
OBJ_RELEASE(answer);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -103,11 +101,8 @@ int orte_gpr_proxy_decrement_value(orte_gpr_value_t *value)
|
||||
{
|
||||
orte_buffer_t *cmd, *answer;
|
||||
int rc, ret;
|
||||
|
||||
if (orte_gpr_proxy_globals.debug) {
|
||||
opal_output(0, "[%lu,%lu,%lu] gpr_proxy_decrement_value entered",
|
||||
ORTE_NAME_ARGS(orte_process_info.my_name));
|
||||
}
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
if (orte_gpr_proxy_globals.compound_cmd_mode) {
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_pack_decrement_value(
|
||||
@ -123,7 +118,7 @@ int orte_gpr_proxy_decrement_value(orte_gpr_value_t *value)
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_pack_decrement_value(cmd, value))) {
|
||||
OBJ_RELEASE(cmd);
|
||||
ORTE_ERROR_LOG(rc);
|
||||
@ -136,26 +131,26 @@ int orte_gpr_proxy_decrement_value(orte_gpr_value_t *value)
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
}
|
||||
OBJ_RELEASE(cmd);
|
||||
|
||||
|
||||
answer = OBJ_NEW(orte_buffer_t);
|
||||
if (NULL == answer) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
|
||||
if (0 > orte_rml.recv_buffer(orte_process_info.gpr_replica, answer, ORTE_RML_TAG_GPR)) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_COMM_FAILURE);
|
||||
OBJ_RELEASE(answer);
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_unpack_decrement_value(answer, &ret))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(answer);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
OBJ_RELEASE(answer);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -3,14 +3,14 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* 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$
|
||||
*
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
/** @file:
|
||||
@ -27,6 +27,7 @@
|
||||
|
||||
#include "include/orte_constants.h"
|
||||
#include "include/orte_types.h"
|
||||
#include "opal/util/trace.h"
|
||||
#include "dps/dps_types.h"
|
||||
|
||||
#include "mca/errmgr/errmgr.h"
|
||||
@ -42,6 +43,8 @@ int orte_gpr_proxy_cleanup_job(orte_jobid_t jobid)
|
||||
orte_buffer_t *cmd, *answer;
|
||||
int rc, ret;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
if (orte_gpr_proxy_globals.compound_cmd_mode) {
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_pack_cleanup_job(orte_gpr_proxy_globals.compound_cmd, jobid))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
@ -52,13 +55,13 @@ int orte_gpr_proxy_cleanup_job(orte_jobid_t jobid)
|
||||
cmd = OBJ_NEW(orte_buffer_t);
|
||||
if (NULL == cmd) { /* got a problem */
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_pack_cleanup_job(cmd, jobid))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(cmd);
|
||||
return rc;
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (0 > orte_rml.send_buffer(orte_process_info.gpr_replica, cmd, ORTE_RML_TAG_GPR, 0)) {
|
||||
@ -67,27 +70,27 @@ int orte_gpr_proxy_cleanup_job(orte_jobid_t jobid)
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
}
|
||||
OBJ_RELEASE(cmd);
|
||||
|
||||
|
||||
answer = OBJ_NEW(orte_buffer_t);
|
||||
if (NULL == answer) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
|
||||
if (0 > orte_rml.recv_buffer(orte_process_info.gpr_replica, answer, ORTE_RML_TAG_GPR)) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_COMM_FAILURE);
|
||||
OBJ_RELEASE(answer);
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_unpack_cleanup_job(answer, &ret))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(answer);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
OBJ_RELEASE(answer);
|
||||
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
@ -97,7 +100,9 @@ int orte_gpr_proxy_cleanup_proc(orte_process_name_t *proc)
|
||||
{
|
||||
orte_buffer_t *cmd, *answer;
|
||||
int rc, ret;
|
||||
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
if (orte_gpr_proxy_globals.compound_cmd_mode) {
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_pack_cleanup_proc(orte_gpr_proxy_globals.compound_cmd, proc))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
@ -123,26 +128,26 @@ int orte_gpr_proxy_cleanup_proc(orte_process_name_t *proc)
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
}
|
||||
OBJ_RELEASE(cmd);
|
||||
|
||||
|
||||
answer = OBJ_NEW(orte_buffer_t);
|
||||
if (NULL == answer) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
|
||||
if (0 > orte_rml.recv_buffer(orte_process_info.gpr_replica, answer, ORTE_RML_TAG_GPR)) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_COMM_FAILURE);
|
||||
OBJ_RELEASE(answer);
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_unpack_cleanup_proc(answer, &ret))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(answer);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
OBJ_RELEASE(answer);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -3,14 +3,14 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* 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$
|
||||
*
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
/** @file:
|
||||
@ -23,6 +23,7 @@
|
||||
#include "include/orte_types.h"
|
||||
#include "dps/dps.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/util/trace.h"
|
||||
#include "util/proc_info.h"
|
||||
|
||||
#include "mca/errmgr/errmgr.h"
|
||||
@ -46,20 +47,22 @@ int orte_gpr_proxy_delete_segment(char *segment)
|
||||
orte_buffer_t *answer;
|
||||
int rc, ret;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
if (orte_gpr_proxy_globals.compound_cmd_mode) {
|
||||
return orte_gpr_base_pack_delete_segment(orte_gpr_proxy_globals.compound_cmd, segment);
|
||||
return orte_gpr_base_pack_delete_segment(orte_gpr_proxy_globals.compound_cmd, segment);
|
||||
}
|
||||
|
||||
cmd = OBJ_NEW(orte_buffer_t);
|
||||
if (NULL == cmd) { /* got a problem */
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_pack_delete_segment(cmd, segment))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(cmd);
|
||||
return rc;
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (0 > orte_rml.send_buffer(orte_process_info.gpr_replica, cmd, ORTE_RML_TAG_GPR, 0)) {
|
||||
@ -68,17 +71,17 @@ int orte_gpr_proxy_delete_segment(char *segment)
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
}
|
||||
OBJ_RELEASE(cmd);
|
||||
|
||||
|
||||
answer = OBJ_NEW(orte_buffer_t);
|
||||
if (NULL == answer) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
|
||||
if (0 > orte_rml.recv_buffer(orte_process_info.gpr_replica, answer, ORTE_RML_TAG_GPR)) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_COMM_FAILURE);
|
||||
OBJ_RELEASE(answer);
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
}
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_unpack_delete_segment(answer, &ret))) {
|
||||
@ -86,9 +89,9 @@ int orte_gpr_proxy_delete_segment(char *segment)
|
||||
OBJ_RELEASE(answer);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
OBJ_RELEASE(answer);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -96,30 +99,30 @@ int orte_gpr_proxy_delete_segment(char *segment)
|
||||
int orte_gpr_proxy_delete_segment_nb(char *segment,
|
||||
orte_gpr_notify_cb_fn_t cbfunc, void *user_tag)
|
||||
{
|
||||
OPAL_TRACE(1);
|
||||
|
||||
return ORTE_ERR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
int orte_gpr_proxy_delete_entries(orte_gpr_addr_mode_t mode,
|
||||
char *segment, char **tokens, char **keys)
|
||||
char *segment, char **tokens, char **keys)
|
||||
{
|
||||
orte_buffer_t *cmd;
|
||||
orte_buffer_t *answer;
|
||||
int rc, ret;
|
||||
|
||||
if (orte_gpr_proxy_globals.debug) {
|
||||
opal_output(0, "[%lu,%lu,%lu] gpr_proxy_delete_object", ORTE_NAME_ARGS(orte_process_info.my_name));
|
||||
}
|
||||
OPAL_TRACE(1);
|
||||
|
||||
/* need to protect against errors */
|
||||
if (NULL == segment) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
|
||||
return ORTE_ERR_BAD_PARAM;
|
||||
return ORTE_ERR_BAD_PARAM;
|
||||
}
|
||||
|
||||
if (orte_gpr_proxy_globals.compound_cmd_mode) {
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_pack_delete_entries(orte_gpr_proxy_globals.compound_cmd,
|
||||
mode, segment, tokens, keys))) {
|
||||
mode, segment, tokens, keys))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
}
|
||||
return rc;
|
||||
@ -128,23 +131,23 @@ int orte_gpr_proxy_delete_entries(orte_gpr_addr_mode_t mode,
|
||||
cmd = OBJ_NEW(orte_buffer_t);
|
||||
if (NULL == cmd) { /* got a problem */
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_pack_delete_entries(cmd,
|
||||
mode, segment, tokens, keys))) {
|
||||
mode, segment, tokens, keys))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(cmd);
|
||||
return rc;
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (0 > orte_rml.send_buffer(orte_process_info.gpr_replica, cmd, ORTE_RML_TAG_GPR, 0)) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_COMM_FAILURE);
|
||||
OBJ_RELEASE(cmd);
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
}
|
||||
OBJ_RELEASE(cmd);
|
||||
|
||||
|
||||
answer = OBJ_NEW(orte_buffer_t);
|
||||
if (NULL == answer) { /* got a problem */
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
@ -154,7 +157,7 @@ int orte_gpr_proxy_delete_entries(orte_gpr_addr_mode_t mode,
|
||||
if (0 > orte_rml.recv_buffer(orte_process_info.gpr_replica, answer, ORTE_RML_TAG_GPR)) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_COMM_FAILURE);
|
||||
OBJ_RELEASE(answer);
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
}
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_unpack_delete_entries(answer, &ret))) {
|
||||
@ -162,7 +165,7 @@ int orte_gpr_proxy_delete_entries(orte_gpr_addr_mode_t mode,
|
||||
OBJ_RELEASE(answer);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
OBJ_RELEASE(answer);
|
||||
|
||||
return ret;
|
||||
@ -174,6 +177,8 @@ int orte_gpr_proxy_delete_entries_nb(
|
||||
char *segment, char **tokens, char **keys,
|
||||
orte_gpr_notify_cb_fn_t cbfunc, void *user_tag)
|
||||
{
|
||||
OPAL_TRACE(1);
|
||||
|
||||
return ORTE_ERR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
@ -184,40 +189,42 @@ int orte_gpr_proxy_index(char *segment, size_t *cnt, char ***index)
|
||||
orte_buffer_t *answer;
|
||||
int rc, ret;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
if (NULL == index || NULL == cnt) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
|
||||
return ORTE_ERR_BAD_PARAM;
|
||||
}
|
||||
|
||||
|
||||
*cnt = 0;
|
||||
*index = NULL;
|
||||
|
||||
if (orte_gpr_proxy_globals.compound_cmd_mode) {
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_pack_index(orte_gpr_proxy_globals.compound_cmd, segment))) {
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_pack_index(orte_gpr_proxy_globals.compound_cmd, segment))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
}
|
||||
return rc;
|
||||
return rc;
|
||||
}
|
||||
|
||||
cmd = OBJ_NEW(orte_buffer_t);
|
||||
if (NULL == cmd) { /* got a problem */
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_pack_index(cmd, segment))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(cmd);
|
||||
OBJ_RELEASE(cmd);
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (0 > orte_rml.send_buffer(orte_process_info.gpr_replica, cmd, ORTE_RML_TAG_GPR, 0)) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_COMM_FAILURE);
|
||||
OBJ_RELEASE(cmd);
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
}
|
||||
OBJ_RELEASE(cmd);
|
||||
|
||||
|
||||
answer = OBJ_NEW(orte_buffer_t);
|
||||
if (NULL == answer) { /* got a problem */
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
@ -226,7 +233,7 @@ int orte_gpr_proxy_index(char *segment, size_t *cnt, char ***index)
|
||||
|
||||
if (0 > orte_rml.recv_buffer(orte_process_info.gpr_replica, answer, ORTE_RML_TAG_GPR)) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_COMM_FAILURE);
|
||||
OBJ_RELEASE(answer);
|
||||
OBJ_RELEASE(answer);
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
}
|
||||
|
||||
@ -235,7 +242,7 @@ int orte_gpr_proxy_index(char *segment, size_t *cnt, char ***index)
|
||||
OBJ_RELEASE(answer);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
OBJ_RELEASE(answer);
|
||||
|
||||
return ret;
|
||||
@ -244,5 +251,7 @@ int orte_gpr_proxy_index(char *segment, size_t *cnt, char ***index)
|
||||
int orte_gpr_proxy_index_nb(char *segment,
|
||||
orte_gpr_notify_cb_fn_t cbfunc, void *user_tag)
|
||||
{
|
||||
OPAL_TRACE(1);
|
||||
|
||||
return ORTE_ERR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "include/orte_types.h"
|
||||
#include "dps/dps.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/util/trace.h"
|
||||
#include "util/proc_info.h"
|
||||
|
||||
#include "mca/ns/ns.h"
|
||||
@ -50,6 +51,8 @@ int orte_gpr_proxy_deliver_notify_msg(orte_gpr_notify_message_t *msg)
|
||||
|
||||
OPAL_THREAD_LOCK(&orte_gpr_proxy_globals.mutex);
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
/* we first have to check if the message is a trigger message - if so,
|
||||
* then the message is intended to be
|
||||
* sent as a single block to that trigger's callback function.
|
||||
|
@ -4,14 +4,14 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* 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$
|
||||
*
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
/** @file:
|
||||
@ -28,6 +28,7 @@
|
||||
#include "include/orte_constants.h"
|
||||
#include "dps/dps_types.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/util/trace.h"
|
||||
#include "util/proc_info.h"
|
||||
|
||||
#include "mca/ns/ns_types.h"
|
||||
@ -38,5 +39,7 @@
|
||||
|
||||
int orte_gpr_proxy_preallocate_segment(char *name, size_t num_slots)
|
||||
{
|
||||
OPAL_TRACE(1);
|
||||
|
||||
return ORTE_ERR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "orte_config.h"
|
||||
|
||||
#include "orte/include/orte_constants.h"
|
||||
#include "opal/util/trace.h"
|
||||
|
||||
#include "orte/mca/errmgr/errmgr.h"
|
||||
#include "orte/class/orte_pointer_array.h"
|
||||
@ -37,6 +38,8 @@ orte_gpr_proxy_enter_subscription(size_t cnt, orte_gpr_subscription_t **subscrip
|
||||
orte_gpr_proxy_subscriber_t *sub;
|
||||
size_t i;
|
||||
|
||||
OPAL_TRACE(2);
|
||||
|
||||
for (i=0; i < cnt; i++) {
|
||||
sub = OBJ_NEW(orte_gpr_proxy_subscriber_t);
|
||||
if (NULL == sub) {
|
||||
@ -67,6 +70,8 @@ orte_gpr_proxy_enter_trigger(size_t cnt, orte_gpr_trigger_t **trigs)
|
||||
orte_gpr_proxy_trigger_t *trig, **tptr;
|
||||
size_t i, j, k;
|
||||
|
||||
OPAL_TRACE(2);
|
||||
|
||||
for (i=0; i < cnt; i++) {
|
||||
/* If the provided trigger has a name, see if it already is on
|
||||
* the local trigger list. If so, then check to see if we
|
||||
@ -143,6 +148,8 @@ orte_gpr_proxy_remove_subscription(orte_gpr_proxy_subscriber_t *sub)
|
||||
{
|
||||
size_t index;
|
||||
|
||||
OPAL_TRACE(2);
|
||||
|
||||
if (NULL == sub) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
|
||||
return ORTE_ERR_BAD_PARAM;
|
||||
@ -160,6 +167,8 @@ orte_gpr_proxy_remove_trigger(orte_gpr_proxy_trigger_t *trig)
|
||||
{
|
||||
size_t index;
|
||||
|
||||
OPAL_TRACE(2);
|
||||
|
||||
if (NULL == trig) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
|
||||
return ORTE_ERR_BAD_PARAM;
|
||||
|
@ -3,14 +3,14 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* 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$
|
||||
*
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
/** @file:
|
||||
@ -28,6 +28,7 @@
|
||||
#include "include/orte_constants.h"
|
||||
#include "dps/dps_types.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/util/trace.h"
|
||||
#include "util/proc_info.h"
|
||||
|
||||
#include "mca/errmgr/errmgr.h"
|
||||
@ -43,10 +44,7 @@ int orte_gpr_proxy_put(size_t cnt, orte_gpr_value_t **values)
|
||||
orte_buffer_t *answer;
|
||||
int rc, ret;
|
||||
|
||||
if (orte_gpr_proxy_globals.debug) {
|
||||
opal_output(0, "[%lu,%lu,%lu] gpr_proxy_put: entered with %d values",
|
||||
ORTE_NAME_ARGS(orte_process_info.my_name), cnt);
|
||||
}
|
||||
OPAL_TRACE(1);
|
||||
|
||||
if (orte_gpr_proxy_globals.compound_cmd_mode) {
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_pack_put(orte_gpr_proxy_globals.compound_cmd, cnt, values))) {
|
||||
@ -58,12 +56,12 @@ int orte_gpr_proxy_put(size_t cnt, orte_gpr_value_t **values)
|
||||
cmd = OBJ_NEW(orte_buffer_t);
|
||||
if (NULL == cmd) { /* got a problem */
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_pack_put(cmd, cnt, values))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(cmd);
|
||||
OBJ_RELEASE(cmd);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -78,10 +76,10 @@ int orte_gpr_proxy_put(size_t cnt, orte_gpr_value_t **values)
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
|
||||
if (0 > orte_rml.recv_buffer(orte_process_info.gpr_replica, answer, ORTE_RML_TAG_GPR)) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_COMM_FAILURE);
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
}
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_unpack_put(answer, &ret))) {
|
||||
@ -95,6 +93,8 @@ int orte_gpr_proxy_put(size_t cnt, orte_gpr_value_t **values)
|
||||
int orte_gpr_proxy_put_nb(size_t cnt, orte_gpr_value_t **values,
|
||||
orte_gpr_notify_cb_fn_t cbfunc, void *user_tag)
|
||||
{
|
||||
OPAL_TRACE(1);
|
||||
|
||||
return ORTE_ERR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
@ -107,17 +107,19 @@ int orte_gpr_proxy_get(orte_gpr_addr_mode_t mode,
|
||||
orte_buffer_t *answer;
|
||||
int rc, ret;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
*values = NULL;
|
||||
*cnt = 0;
|
||||
|
||||
|
||||
/* need to protect against errors */
|
||||
if (NULL == segment) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
|
||||
return ORTE_ERR_BAD_PARAM;
|
||||
return ORTE_ERR_BAD_PARAM;
|
||||
}
|
||||
|
||||
if (orte_gpr_proxy_globals.compound_cmd_mode) {
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_pack_get(orte_gpr_proxy_globals.compound_cmd,
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_pack_get(orte_gpr_proxy_globals.compound_cmd,
|
||||
mode, segment, tokens, keys))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
}
|
||||
@ -127,17 +129,17 @@ int orte_gpr_proxy_get(orte_gpr_addr_mode_t mode,
|
||||
cmd = OBJ_NEW(orte_buffer_t);
|
||||
if (NULL == cmd) { /* got a problem */
|
||||
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_pack_get(cmd, mode, segment, tokens, keys))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (0 > orte_rml.send_buffer(orte_process_info.gpr_replica, cmd, ORTE_RML_TAG_GPR, 0)) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_COMM_FAILURE);
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
}
|
||||
|
||||
answer = OBJ_NEW(orte_buffer_t);
|
||||
@ -145,10 +147,10 @@ int orte_gpr_proxy_get(orte_gpr_addr_mode_t mode,
|
||||
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
|
||||
if (0 > orte_rml.recv_buffer(orte_process_info.gpr_replica, answer, ORTE_RML_TAG_GPR)) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_COMM_FAILURE);
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
return ORTE_ERR_COMM_FAILURE;
|
||||
}
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_base_unpack_get(answer, &ret, cnt, values))) {
|
||||
@ -165,5 +167,7 @@ int orte_gpr_proxy_get_nb(orte_gpr_addr_mode_t addr_mode,
|
||||
char *segment, char **tokens, char **keys,
|
||||
orte_gpr_notify_cb_fn_t cbfunc, void *user_tag)
|
||||
{
|
||||
OPAL_TRACE(1);
|
||||
|
||||
return ORTE_ERR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "include/orte_constants.h"
|
||||
#include "dps/dps.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/util/trace.h"
|
||||
#include "util/proc_info.h"
|
||||
|
||||
#include "mca/ns/ns_types.h"
|
||||
@ -49,6 +50,8 @@ orte_gpr_proxy_subscribe(size_t num_subs,
|
||||
int rc = ORTE_SUCCESS, ret;
|
||||
size_t i;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
/* need to protect against errors */
|
||||
if (NULL == subscriptions && NULL == trigs) { /* need at least one */
|
||||
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
|
||||
@ -186,6 +189,8 @@ int orte_gpr_proxy_unsubscribe(orte_gpr_subscription_id_t sub_number)
|
||||
size_t i, j;
|
||||
int rc, ret;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
OPAL_THREAD_LOCK(&orte_gpr_proxy_globals.mutex);
|
||||
|
||||
/* remove the specified subscription from the local tracker */
|
||||
@ -290,6 +295,8 @@ int orte_gpr_proxy_cancel_trigger(orte_gpr_trigger_id_t trig)
|
||||
size_t i, j;
|
||||
int rc, ret;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
OPAL_THREAD_LOCK(&orte_gpr_proxy_globals.mutex);
|
||||
|
||||
/* remove the specified trigger from the local tracker */
|
||||
|
@ -4,14 +4,14 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* 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$
|
||||
*
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
/** @file:
|
||||
@ -25,6 +25,8 @@
|
||||
*/
|
||||
#include "orte_config.h"
|
||||
|
||||
#include "opal/util/trace.h"
|
||||
|
||||
#include "util/proc_info.h"
|
||||
#include "mca/ns/ns_types.h"
|
||||
#include "mca/errmgr/errmgr.h"
|
||||
@ -38,6 +40,8 @@ int orte_gpr_replica_increment_value(orte_gpr_value_t *value)
|
||||
orte_gpr_replica_segment_t *seg=NULL;
|
||||
orte_gpr_replica_itag_t *itags=NULL;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
/* protect ourselves against errors */
|
||||
if (NULL == value) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
|
||||
@ -60,19 +64,19 @@ int orte_gpr_replica_increment_value(orte_gpr_value_t *value)
|
||||
OPAL_THREAD_UNLOCK(&orte_gpr_replica_globals.mutex);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_replica_increment_value_fn(value->addr_mode, seg,
|
||||
itags, value->num_tokens, value->cnt, value->keyvals))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
}
|
||||
|
||||
|
||||
/* release list of itags */
|
||||
if (NULL != itags) {
|
||||
free(itags);
|
||||
}
|
||||
|
||||
if (ORTE_SUCCESS == rc) {
|
||||
if (ORTE_SUCCESS !=
|
||||
if (ORTE_SUCCESS !=
|
||||
(rc = orte_gpr_replica_check_events())) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OPAL_THREAD_UNLOCK(&orte_gpr_replica_globals.mutex);
|
||||
@ -80,9 +84,9 @@ int orte_gpr_replica_increment_value(orte_gpr_value_t *value)
|
||||
}
|
||||
rc = orte_gpr_replica_process_callbacks();
|
||||
}
|
||||
|
||||
|
||||
OPAL_THREAD_UNLOCK(&orte_gpr_replica_globals.mutex);
|
||||
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -92,6 +96,8 @@ int orte_gpr_replica_decrement_value(orte_gpr_value_t *value)
|
||||
orte_gpr_replica_segment_t *seg=NULL;
|
||||
orte_gpr_replica_itag_t *itags=NULL;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
/* protect ourselves against errors */
|
||||
if (NULL == value) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
|
||||
@ -114,19 +120,19 @@ int orte_gpr_replica_decrement_value(orte_gpr_value_t *value)
|
||||
OPAL_THREAD_UNLOCK(&orte_gpr_replica_globals.mutex);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_replica_decrement_value_fn(value->addr_mode, seg,
|
||||
itags, value->num_tokens, value->cnt, value->keyvals))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
}
|
||||
|
||||
|
||||
/* release list of itags */
|
||||
if (NULL != itags) {
|
||||
free(itags);
|
||||
}
|
||||
|
||||
if (ORTE_SUCCESS == rc) {
|
||||
if (ORTE_SUCCESS !=
|
||||
if (ORTE_SUCCESS !=
|
||||
(rc = orte_gpr_replica_check_events())) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OPAL_THREAD_UNLOCK(&orte_gpr_replica_globals.mutex);
|
||||
@ -134,7 +140,7 @@ int orte_gpr_replica_decrement_value(orte_gpr_value_t *value)
|
||||
}
|
||||
rc = orte_gpr_replica_process_callbacks();
|
||||
}
|
||||
|
||||
|
||||
OPAL_THREAD_UNLOCK(&orte_gpr_replica_globals.mutex);
|
||||
return rc;
|
||||
}
|
||||
|
@ -3,14 +3,14 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* 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$
|
||||
*
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
/** @file:
|
||||
@ -25,6 +25,8 @@
|
||||
|
||||
#include "orte_config.h"
|
||||
|
||||
#include "opal/util/trace.h"
|
||||
|
||||
#include "mca/ns/ns.h"
|
||||
#include "mca/errmgr/errmgr.h"
|
||||
|
||||
@ -35,17 +37,19 @@
|
||||
int orte_gpr_replica_cleanup_job(orte_jobid_t jobid)
|
||||
{
|
||||
int rc;
|
||||
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
OPAL_THREAD_LOCK(&orte_gpr_replica_globals.mutex);
|
||||
|
||||
|
||||
rc = orte_gpr_replica_cleanup_job_fn(jobid);
|
||||
|
||||
|
||||
if (ORTE_SUCCESS != rc) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OPAL_THREAD_UNLOCK(&orte_gpr_replica_globals.mutex);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_replica_check_events())) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OPAL_THREAD_UNLOCK(&orte_gpr_replica_globals.mutex);
|
||||
@ -53,9 +57,9 @@ int orte_gpr_replica_cleanup_job(orte_jobid_t jobid)
|
||||
}
|
||||
|
||||
rc = orte_gpr_replica_process_callbacks();
|
||||
|
||||
|
||||
OPAL_THREAD_UNLOCK(&orte_gpr_replica_globals.mutex);
|
||||
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -63,7 +67,9 @@ int orte_gpr_replica_cleanup_job(orte_jobid_t jobid)
|
||||
int orte_gpr_replica_cleanup_proc(orte_process_name_t *proc)
|
||||
{
|
||||
int rc;
|
||||
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
OPAL_THREAD_LOCK(&orte_gpr_replica_globals.mutex);
|
||||
rc = orte_gpr_replica_cleanup_proc_fn(proc);
|
||||
|
||||
@ -72,7 +78,7 @@ int orte_gpr_replica_cleanup_proc(orte_process_name_t *proc)
|
||||
OPAL_THREAD_UNLOCK(&orte_gpr_replica_globals.mutex);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_replica_check_events())) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OPAL_THREAD_UNLOCK(&orte_gpr_replica_globals.mutex);
|
||||
@ -81,6 +87,6 @@ int orte_gpr_replica_cleanup_proc(orte_process_name_t *proc)
|
||||
|
||||
rc = orte_gpr_replica_process_callbacks();
|
||||
OPAL_THREAD_UNLOCK(&orte_gpr_replica_globals.mutex);
|
||||
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
@ -3,14 +3,14 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* 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$
|
||||
*
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
/** @file:
|
||||
@ -28,6 +28,8 @@
|
||||
#include "include/orte_constants.h"
|
||||
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/util/trace.h"
|
||||
|
||||
#include "util/proc_info.h"
|
||||
#include "mca/errmgr/errmgr.h"
|
||||
|
||||
@ -38,9 +40,11 @@ int orte_gpr_replica_delete_segment(char *segment)
|
||||
orte_gpr_replica_segment_t *seg=NULL;
|
||||
int rc;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
/* protect against errors */
|
||||
if (NULL == segment) {
|
||||
return ORTE_ERROR;
|
||||
return ORTE_ERROR;
|
||||
}
|
||||
|
||||
OPAL_THREAD_LOCK(&orte_gpr_replica_globals.mutex);
|
||||
@ -48,7 +52,7 @@ int orte_gpr_replica_delete_segment(char *segment)
|
||||
/* locate the segment */
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_replica_find_seg(&seg, false, segment))) {
|
||||
OPAL_THREAD_UNLOCK(&orte_gpr_replica_globals.mutex);
|
||||
return rc;
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = orte_gpr_replica_release_segment(&seg);
|
||||
@ -61,22 +65,26 @@ int orte_gpr_replica_delete_segment(char *segment)
|
||||
int orte_gpr_replica_delete_segment_nb(char *segment,
|
||||
orte_gpr_notify_cb_fn_t cbfunc, void *user_tag)
|
||||
{
|
||||
OPAL_TRACE(1);
|
||||
|
||||
return ORTE_ERR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int orte_gpr_replica_delete_entries(orte_gpr_addr_mode_t addr_mode,
|
||||
char *segment, char **tokens, char **keys)
|
||||
char *segment, char **tokens, char **keys)
|
||||
{
|
||||
int rc;
|
||||
orte_gpr_replica_segment_t *seg=NULL;
|
||||
orte_gpr_replica_itag_t *token_itags=NULL, *key_itags=NULL;
|
||||
size_t num_tokens = 0, num_keys = 0;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
/* protect against errors */
|
||||
if (NULL == segment) {
|
||||
return ORTE_ERROR;
|
||||
return ORTE_ERROR;
|
||||
}
|
||||
|
||||
OPAL_THREAD_LOCK(&orte_gpr_replica_globals.mutex);
|
||||
@ -106,7 +114,7 @@ int orte_gpr_replica_delete_entries(orte_gpr_addr_mode_t addr_mode,
|
||||
ORTE_ERROR_LOG(rc);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (NULL != token_itags) {
|
||||
free(token_itags);
|
||||
}
|
||||
@ -120,7 +128,7 @@ int orte_gpr_replica_delete_entries(orte_gpr_addr_mode_t addr_mode,
|
||||
ORTE_ERROR_LOG(rc);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
OPAL_THREAD_UNLOCK(&orte_gpr_replica_globals.mutex);
|
||||
|
||||
return rc;
|
||||
@ -132,6 +140,8 @@ int orte_gpr_replica_delete_entries_nb(
|
||||
char *segment, char **tokens, char **keys,
|
||||
orte_gpr_notify_cb_fn_t cbfunc, void *user_tag)
|
||||
{
|
||||
OPAL_TRACE(1);
|
||||
|
||||
return ORTE_ERR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
@ -141,15 +151,17 @@ int orte_gpr_replica_index(char *segment, size_t *cnt, char ***index)
|
||||
orte_gpr_replica_segment_t *seg=NULL;
|
||||
int rc;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
if (NULL == index || NULL == cnt) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
|
||||
return ORTE_ERR_BAD_PARAM;
|
||||
}
|
||||
|
||||
|
||||
OPAL_THREAD_LOCK(&orte_gpr_replica_globals.mutex);
|
||||
|
||||
if (NULL == segment) { /* want global level index */
|
||||
seg = NULL;
|
||||
seg = NULL;
|
||||
} else {
|
||||
/* locate the segment */
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_replica_find_seg(&seg, false, segment))) {
|
||||
@ -167,5 +179,7 @@ int orte_gpr_replica_index(char *segment, size_t *cnt, char ***index)
|
||||
int orte_gpr_replica_index_nb(char *segment,
|
||||
orte_gpr_notify_cb_fn_t cbfunc, void *user_tag)
|
||||
{
|
||||
OPAL_TRACE(1);
|
||||
|
||||
return ORTE_ERR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
@ -26,6 +26,8 @@
|
||||
#include "orte_config.h"
|
||||
|
||||
#include "include/orte_constants.h"
|
||||
#include "opal/util/trace.h"
|
||||
|
||||
#include "mca/errmgr/errmgr.h"
|
||||
|
||||
#include "mca/gpr/replica/api_layer/gpr_replica_api.h"
|
||||
@ -39,6 +41,8 @@ int orte_gpr_replica_deliver_notify_msg(orte_gpr_notify_message_t *msg)
|
||||
int rc;
|
||||
bool processed;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
/* we first have to check if the message is a trigger message - if so,
|
||||
* then the message is intended to be
|
||||
* sent as a single block to that trigger's callback function.
|
||||
|
@ -3,14 +3,14 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* 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$
|
||||
*
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
/** @file:
|
||||
@ -26,6 +26,8 @@
|
||||
#include "orte_config.h"
|
||||
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/util/trace.h"
|
||||
|
||||
#include "util/proc_info.h"
|
||||
#include "mca/ns/ns_types.h"
|
||||
#include "mca/errmgr/errmgr.h"
|
||||
@ -40,20 +42,18 @@ int orte_gpr_replica_put(size_t cnt, orte_gpr_value_t **values)
|
||||
orte_gpr_replica_segment_t *seg=NULL;
|
||||
orte_gpr_replica_itag_t *itags=NULL;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
/* protect ourselves against errors */
|
||||
if (NULL == values) {
|
||||
if (orte_gpr_replica_globals.debug) {
|
||||
opal_output(0, "[%lu,%lu,%lu] gpr replica: error in input - put rejected",
|
||||
ORTE_NAME_ARGS(orte_process_info.my_name));
|
||||
}
|
||||
return ORTE_ERROR;
|
||||
return ORTE_ERROR;
|
||||
}
|
||||
|
||||
OPAL_THREAD_LOCK(&orte_gpr_replica_globals.mutex);
|
||||
|
||||
for (i=0; i < cnt; i++) {
|
||||
val = values[i];
|
||||
|
||||
|
||||
/* first check for error - all keyvals must have a non-NULL string key */
|
||||
for (j=0; j < val->cnt; j++) {
|
||||
if (NULL == (val->keyvals[j])->key) {
|
||||
@ -62,14 +62,14 @@ int orte_gpr_replica_put(size_t cnt, orte_gpr_value_t **values)
|
||||
return ORTE_ERR_BAD_PARAM;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* find the segment */
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_replica_find_seg(&seg, true, val->segment))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OPAL_THREAD_UNLOCK(&orte_gpr_replica_globals.mutex);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/* convert tokens to array of itags */
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_replica_get_itag_list(&itags, seg,
|
||||
val->tokens, &(val->num_tokens)))) {
|
||||
@ -77,12 +77,12 @@ int orte_gpr_replica_put(size_t cnt, orte_gpr_value_t **values)
|
||||
OPAL_THREAD_UNLOCK(&orte_gpr_replica_globals.mutex);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_replica_put_fn(val->addr_mode, seg, itags, val->num_tokens,
|
||||
val->cnt, val->keyvals))) {
|
||||
val->cnt, val->keyvals))) {
|
||||
goto CLEANUP;
|
||||
}
|
||||
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_replica_check_events())) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
goto CLEANUP;
|
||||
@ -97,9 +97,9 @@ int orte_gpr_replica_put(size_t cnt, orte_gpr_value_t **values)
|
||||
CLEANUP:
|
||||
/* release list of itags */
|
||||
if (NULL != itags) {
|
||||
free(itags);
|
||||
free(itags);
|
||||
}
|
||||
|
||||
|
||||
if (ORTE_SUCCESS == rc) {
|
||||
rc = orte_gpr_replica_process_callbacks();
|
||||
}
|
||||
@ -114,6 +114,8 @@ CLEANUP:
|
||||
int orte_gpr_replica_put_nb(size_t cnt, orte_gpr_value_t **values,
|
||||
orte_gpr_notify_cb_fn_t cbfunc, void *user_tag)
|
||||
{
|
||||
OPAL_TRACE(1);
|
||||
|
||||
return ORTE_ERR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
@ -127,12 +129,14 @@ int orte_gpr_replica_get(orte_gpr_addr_mode_t addr_mode,
|
||||
size_t num_tokens=0, num_keys=0;
|
||||
int rc;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
*cnt = 0;
|
||||
*values = NULL;
|
||||
|
||||
|
||||
/* protect against errors */
|
||||
if (NULL == segment) {
|
||||
return ORTE_ERR_BAD_PARAM;
|
||||
return ORTE_ERR_BAD_PARAM;
|
||||
}
|
||||
|
||||
OPAL_THREAD_LOCK(&orte_gpr_replica_globals.mutex);
|
||||
@ -161,10 +165,10 @@ int orte_gpr_replica_get(orte_gpr_addr_mode_t addr_mode,
|
||||
cnt, values))) {
|
||||
goto CLEANUP;
|
||||
}
|
||||
|
||||
|
||||
CLEANUP:
|
||||
if (NULL != tokentags) {
|
||||
free(tokentags);
|
||||
free(tokentags);
|
||||
}
|
||||
|
||||
if (NULL != keytags) {
|
||||
@ -181,5 +185,7 @@ int orte_gpr_replica_get_nb(orte_gpr_addr_mode_t addr_mode,
|
||||
char *segment, char **tokens, char **keys,
|
||||
orte_gpr_notify_cb_fn_t cbfunc, void *user_tag)
|
||||
{
|
||||
OPAL_TRACE(1);
|
||||
|
||||
return ORTE_ERR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
@ -4,14 +4,14 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* 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$
|
||||
*
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
/** @file:
|
||||
@ -26,6 +26,8 @@
|
||||
#include "orte_config.h"
|
||||
|
||||
#include "include/orte_constants.h"
|
||||
#include "opal/util/trace.h"
|
||||
|
||||
#include "class/orte_pointer_array.h"
|
||||
|
||||
#include "gpr_replica_api.h"
|
||||
@ -35,6 +37,8 @@ int orte_gpr_replica_preallocate_segment(char *name, size_t num_slots)
|
||||
int rc;
|
||||
orte_gpr_replica_segment_t *seg=NULL;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
OPAL_THREAD_LOCK(&orte_gpr_replica_globals.mutex);
|
||||
|
||||
/* find the segment */
|
||||
@ -46,12 +50,12 @@ int orte_gpr_replica_preallocate_segment(char *name, size_t num_slots)
|
||||
if (0 < (seg->containers)->size) { /* segment already exists! */
|
||||
return ORTE_ERR_BAD_PARAM;
|
||||
}
|
||||
|
||||
|
||||
rc = orte_pointer_array_init(&(seg->containers), num_slots,
|
||||
orte_gpr_array_max_size,
|
||||
orte_gpr_array_block_size);
|
||||
|
||||
|
||||
OPAL_THREAD_UNLOCK(&orte_gpr_replica_globals.mutex);
|
||||
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
@ -25,6 +25,8 @@
|
||||
|
||||
#include "orte_config.h"
|
||||
|
||||
#include "opal/util/trace.h"
|
||||
|
||||
#include "orte/dps/dps.h"
|
||||
|
||||
#include "orte/mca/ns/ns.h"
|
||||
@ -40,6 +42,8 @@ orte_gpr_replica_subscribe(size_t num_subs,
|
||||
{
|
||||
int rc;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
/* protect against errors */
|
||||
if (NULL == subscriptions && NULL == trigs) { /* need at least one */
|
||||
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
|
||||
@ -103,6 +107,8 @@ int orte_gpr_replica_unsubscribe(orte_gpr_subscription_id_t sub_number)
|
||||
size_t i, j;
|
||||
int rc;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
OPAL_THREAD_LOCK(&orte_gpr_replica_globals.mutex);
|
||||
|
||||
if (ORTE_SUCCESS != (rc = orte_gpr_replica_remove_subscription(NULL, sub_number))) {
|
||||
@ -137,6 +143,8 @@ int orte_gpr_replica_cancel_trigger(orte_gpr_trigger_id_t trig)
|
||||
size_t i, j;
|
||||
int rc;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
OPAL_THREAD_LOCK(&orte_gpr_replica_globals.mutex);
|
||||
|
||||
rc = orte_gpr_replica_remove_trigger(NULL, trig);
|
||||
|
@ -65,7 +65,7 @@ int orte_rmgr_base_proc_stage_gate_init(orte_jobid_t job)
|
||||
orte_gpr_trigger_id_t id;
|
||||
size_t trig_level;
|
||||
|
||||
OPAL_TRACE();
|
||||
OPAL_TRACE(1);
|
||||
|
||||
/* setup the counters */
|
||||
OBJ_CONSTRUCT(&value, orte_gpr_value_t);
|
||||
@ -203,6 +203,8 @@ int orte_rmgr_base_proc_stage_gate_mgr(orte_gpr_notify_message_t *msg)
|
||||
int rc;
|
||||
orte_jobid_t job;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
/* check to see if this came from terminate. If so, we ignore it because
|
||||
* that stage gate does NOT set an xcast barrier - processes simply
|
||||
* record their state and continue processing
|
||||
@ -281,6 +283,8 @@ int orte_rmgr_base_proc_stage_gate_mgr_abort(orte_gpr_notify_message_t *msg)
|
||||
orte_jobid_t job;
|
||||
int rc;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
/* All stage gate triggers are named, so we can extract the jobid
|
||||
* directly from the trigger name
|
||||
*/
|
||||
@ -334,6 +338,8 @@ int orte_rmgr_base_proc_stage_gate_subscribe(orte_jobid_t job, orte_gpr_notify_c
|
||||
};
|
||||
size_t num_counters = sizeof(keys)/sizeof(keys[0]);
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
/* identify the segment for this job */
|
||||
if (ORTE_SUCCESS != (rc = orte_schema.get_job_segment_name(&segment, job))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user