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
|
||||
|
@ -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,15 +44,12 @@ 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;
|
||||
@ -64,7 +62,7 @@ int orte_gpr_proxy_increment_value(orte_gpr_value_t *value)
|
||||
}
|
||||
|
||||
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,7 +70,7 @@ 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);
|
||||
|
||||
@ -104,10 +102,7 @@ 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(
|
||||
|
@ -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)) {
|
||||
@ -98,6 +101,8 @@ 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);
|
||||
|
@ -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)) {
|
||||
@ -78,7 +81,7 @@ int orte_gpr_proxy_delete_segment(char *segment)
|
||||
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))) {
|
||||
@ -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,20 +131,20 @@ 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);
|
||||
|
||||
@ -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))) {
|
||||
@ -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,6 +189,8 @@ 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;
|
||||
@ -193,28 +200,28 @@ int orte_gpr_proxy_index(char *segment, size_t *cnt, char ***index)
|
||||
*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);
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
@ -81,7 +79,7 @@ int orte_gpr_proxy_put(size_t cnt, orte_gpr_value_t **values)
|
||||
|
||||
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);
|
||||
@ -148,7 +150,7 @@ int orte_gpr_proxy_get(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);
|
||||
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 */
|
||||
|
@ -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);
|
||||
@ -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);
|
||||
|
@ -25,6 +25,8 @@
|
||||
|
||||
#include "orte_config.h"
|
||||
|
||||
#include "opal/util/trace.h"
|
||||
|
||||
#include "mca/ns/ns.h"
|
||||
#include "mca/errmgr/errmgr.h"
|
||||
|
||||
@ -36,6 +38,8 @@ 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);
|
||||
@ -64,6 +68,8 @@ 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);
|
||||
|
||||
|
@ -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);
|
||||
@ -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,6 +151,8 @@ 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;
|
||||
@ -149,7 +161,7 @@ int orte_gpr_replica_index(char *segment, size_t *cnt, char ***index)
|
||||
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.
|
||||
|
@ -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,13 +42,11 @@ 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);
|
||||
@ -79,7 +79,7 @@ int orte_gpr_replica_put(size_t cnt, orte_gpr_value_t **values)
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ 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) {
|
||||
@ -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);
|
||||
@ -164,7 +168,7 @@ int orte_gpr_replica_get(orte_gpr_addr_mode_t addr_mode,
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -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 */
|
||||
|
@ -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