1
1
openmpi/orte/mca/iof/hnp/iof_svc_sub.h
Ralph Castain 6e5d844c36 Roll in the revamped IOF subsystem. Per the devel mailing list email, this is a complete rewrite of the iof framework designed to simplify the code for maintainability, and to support features we had planned to do, but were too difficult to implement in the old code. Specifically, the new code:
1. completely and cleanly separates responsibilities between the HNP, orted, and tool components.

2. removes all wireup messaging during launch and shutdown.

3. maintains flow control for stdin to avoid large-scale consumption of memory by orteds when large input files are forwarded. This is done using an xon/xoff protocol.

4. enables specification of stdin recipients on the mpirun cmd line. Allowed options include rank, "all", or "none". Default is rank 0.

5. creates a new MPI_Info key "ompi_stdin_target" that supports the above options for child jobs. Default is "none".

6. adds a new tool "orte-iof" that can connect to a running mpirun and display the output. Cmd line options allow selection of any combination of stdout, stderr, and stddiag. Default is stdout.

7. adds a new mpirun and orte-iof cmd line option "tag-output" that will tag each line of output with process name and stream ident. For example, "[1,0]<stdout>this is output"

This is not intended for the 1.3 release as it is a major change requiring considerable soak time.

This commit was SVN r19767.
2008-10-18 00:00:49 +00:00

147 строки
3.6 KiB
C

/*
* Copyright (c) 2004-2005 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$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#ifndef MCA_IOF_SVC_SUBSCRIPT_H
#define MCA_IOF_SVC_SUBSCRIPT_H
/**
* A subscription routes data from a specified set
* of source endpoints to one or more destination
* endpoints.
*/
#include "orte_config.h"
#include "orte/types.h"
#include "opal/class/opal_hash_table.h"
#include "iof_svc_pub.h"
BEGIN_C_DECLS
struct orte_iof_svc_fwd_t {
opal_list_item_t super;
orte_iof_svc_pub_t* fwd_pub;
opal_hash_table_t fwd_seq_hash;
};
typedef struct orte_iof_svc_fwd_t orte_iof_svc_fwd_t;
OBJ_CLASS_DECLARATION(orte_iof_svc_fwd_t);
struct orte_iof_svc_sub_t {
opal_list_item_t super;
orte_process_name_t origin_name;
orte_ns_cmp_bitmask_t origin_mask;
orte_iof_base_tag_t origin_tag;
orte_process_name_t target_name;
orte_ns_cmp_bitmask_t target_mask;
orte_iof_base_tag_t target_tag;
orte_iof_base_endpoint_t* sub_endpoint;
opal_list_t sub_forward;
bool has_been_acked;
uint32_t last_ack_forwarded;
};
typedef struct orte_iof_svc_sub_t orte_iof_svc_sub_t;
OBJ_CLASS_DECLARATION(orte_iof_svc_sub_t);
/**
* Lookup an existing subscription.
*/
orte_iof_svc_sub_t* orte_iof_svc_sub_lookup(
const orte_process_name_t* origin
);
/**
* Create a subscription
*/
int orte_iof_svc_sub_create(
const orte_process_name_t *origin_name,
orte_ns_cmp_bitmask_t origin_mask,
orte_iof_base_tag_t origin_tag,
const orte_process_name_t *target_name,
orte_ns_cmp_bitmask_t target_mask,
orte_iof_base_tag_t target_tag);
/**
* Receive an ACK from a single endpoint on a subscription
*/
void orte_iof_svc_sub_ack(
const orte_process_name_t* peer,
orte_iof_base_msg_header_t* hdr,
bool do_close);
/**
* Cleanup/remove a subscription
*/
int orte_iof_svc_sub_delete(
const orte_process_name_t *origin_name,
orte_ns_cmp_bitmask_t origin_mask,
orte_iof_base_tag_t origin_tag,
const orte_process_name_t *target_name,
orte_ns_cmp_bitmask_t target_mask,
orte_iof_base_tag_t target_tag);
int orte_iof_svc_sub_delete_all(
const orte_process_name_t *target_name);
/**
* Forward message to any endpoints that
* match the subscription.
*/
int orte_iof_svc_sub_forward(
orte_iof_svc_sub_t* sub,
const orte_process_name_t* src,
orte_iof_base_msg_header_t* hdr,
const unsigned char* data,
bool *forward);
/**
* Check to see if the published endpoint matches
* the subscription.
*/
bool orte_iof_svc_fwd_match(
orte_iof_svc_sub_t* sub,
orte_iof_svc_pub_t* pub);
/**
* Create or remove a forwarding entry on the
* current subscription.
*/
int orte_iof_svc_fwd_create(
orte_iof_svc_sub_t* sub,
orte_iof_svc_pub_t* pub);
int orte_iof_svc_fwd_delete(
orte_iof_svc_sub_t* sub,
orte_iof_svc_pub_t* pub);
END_C_DECLS
#endif