2015-03-06 06:50:44 +03:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
2004-12-22 01:16:09 +03:00
|
|
|
/*
|
2007-03-17 02:11:45 +03:00
|
|
|
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
2005-11-05 22:57:48 +03:00
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2015-06-24 06:59:57 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2004-12-22 01:16:09 +03:00
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2009-01-11 05:30:00 +03:00
|
|
|
* Copyright (c) 2007-2008 Cisco Systems, Inc. All rights reserved.
|
2015-03-06 06:50:44 +03:00
|
|
|
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
|
|
|
|
* reserved.
|
2018-01-25 19:53:43 +03:00
|
|
|
* Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
|
2004-12-22 01:16:09 +03:00
|
|
|
* $COPYRIGHT$
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2004-12-22 01:16:09 +03:00
|
|
|
* Additional copyrights may follow
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2004-12-22 01:16:09 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*
|
|
|
|
* I/O Forwarding Service
|
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 04:00:49 +04:00
|
|
|
* The I/O forwarding service (IOF) is used to connect stdin, stdout, and
|
|
|
|
* stderr file descriptor streams from MPI processes to the user
|
|
|
|
*
|
|
|
|
* The design is fairly simple: when a proc is spawned, the IOF establishes
|
|
|
|
* connections between its stdin, stdout, and stderr to a
|
|
|
|
* corresponding IOF stream. In addition, the IOF designates a separate
|
|
|
|
* stream for passing OMPI/ORTE internal diagnostic/help output to mpirun.
|
|
|
|
* This is done specifically to separate such output from the user's
|
|
|
|
* stdout/err - basically, it allows us to present it to the user in
|
|
|
|
* a separate format for easier recognition. Data read from a source
|
|
|
|
* on any stream (e.g., printed to stdout by the proc) is relayed
|
|
|
|
* by the local daemon to the other end of the stream - i.e., stdin
|
|
|
|
* is relayed to the local proc, while stdout/err is relayed to mpirun.
|
|
|
|
* Thus, the eventual result is to connect ALL streams to/from
|
|
|
|
* the application process and mpirun.
|
|
|
|
*
|
|
|
|
* Note: By default, data read from stdin is forwarded -only- to rank=0.
|
|
|
|
* Stdin for all other procs is tied to "/dev/null".
|
|
|
|
*
|
|
|
|
* External tools can "pull" copies of stdout/err and
|
|
|
|
* the diagnostic stream from mpirun for any process. In this case,
|
|
|
|
* mpirun will send a copy of the output to the "pulling" process. Note that external tools
|
|
|
|
* cannot "push" something into stdin unless the user specifically directed
|
|
|
|
* that stdin remain open, nor under any conditions "pull" a copy of the
|
|
|
|
* stdin being sent to rank=0.
|
|
|
|
*
|
|
|
|
* Tools can exploit either of two mechanisms for this purpose:
|
|
|
|
*
|
|
|
|
* (a) call orte_init themselves and utilize the ORTE tool comm
|
|
|
|
* library to access the IOF. This also provides access to
|
|
|
|
* other tool library functions - e.g., to order that a job
|
|
|
|
* be spawned; or
|
|
|
|
*
|
|
|
|
* (b) fork/exec the "orte-iof" tool and let it serve as the interface
|
|
|
|
* to mpirun. This lets the tool avoid calling orte_init, and means
|
|
|
|
* the tool will not have to compile against the ORTE/OMPI libraries.
|
|
|
|
* However, the orte-iof tool is limited solely to interfacing
|
|
|
|
* stdio and cannot be used for other functions included in
|
|
|
|
* the tool comm library
|
|
|
|
*
|
|
|
|
* Thus, mpirun acts as a "switchyard" for IO, taking input from stdin
|
|
|
|
* and passing it to rank=0 of the job, and taking stdout/err/diag from all
|
|
|
|
* ranks and passing it to its own stdout/err/diag plus any "pull"
|
|
|
|
* requestors.
|
|
|
|
*
|
|
|
|
* Streams are identified by ORTE process name (to include wildcards,
|
2007-04-03 22:17:35 +04:00
|
|
|
* such as "all processes in ORTE job X") and tag. There are
|
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 04:00:49 +04:00
|
|
|
* currently only 4 allowed predefined tags:
|
2007-04-03 22:17:35 +04:00
|
|
|
*
|
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 04:00:49 +04:00
|
|
|
* - ORTE_IOF_STDIN (value 0)
|
|
|
|
* - ORTE_IOF_STDOUT (value 1)
|
|
|
|
* - ORTE_IOF_STDERR (value 2)
|
|
|
|
* - ORTE_IOF_INTERNAL (value 3): for "internal" messages
|
2008-06-09 18:53:58 +04:00
|
|
|
* from the infrastructure, just to differentiate them from user job
|
|
|
|
* stdout/stderr
|
2007-04-03 22:17:35 +04:00
|
|
|
*
|
|
|
|
* Note that since streams are identified by ORTE process name, the
|
|
|
|
* caller has no idea whether the stream is on the local node or a
|
|
|
|
* remote node -- it's just a stream.
|
|
|
|
*
|
|
|
|
* IOF components are selected on a "one of many" basis, meaning that
|
|
|
|
* only one IOF component will be selected for a given process.
|
|
|
|
* Details for the various components are given in their source code
|
|
|
|
* bases.
|
|
|
|
*
|
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 04:00:49 +04:00
|
|
|
* Each IOF component must support the following API:
|
2007-04-03 22:17:35 +04:00
|
|
|
*
|
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 04:00:49 +04:00
|
|
|
* push: Tie a local file descriptor (*not* a stream!) to the stdin
|
|
|
|
* of the specified process. If the user has not specified that stdin
|
|
|
|
* of the specified process is to remain open, this will return an error.
|
2007-04-03 22:17:35 +04:00
|
|
|
*
|
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 04:00:49 +04:00
|
|
|
* pull: Tie a local file descriptor (*not* a stream!) to a stream.
|
|
|
|
* Subsequent input that appears via the stream will
|
|
|
|
* automatically be sent to the target file descriptor until the
|
|
|
|
* stream is "closed" or an EOF is received on the local file descriptor.
|
|
|
|
* Valid source values include ORTE_IOF_STDOUT, ORTE_IOF_STDERR, and
|
|
|
|
* ORTE_IOF_INTERNAL
|
2007-04-03 22:17:35 +04:00
|
|
|
*
|
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 04:00:49 +04:00
|
|
|
* close: Closes a stream, flushing any pending data down it and
|
|
|
|
* terminating any "push/pull" connections against it. Unclear yet
|
|
|
|
* if this needs to be blocking, or can be done non-blocking.
|
2007-04-03 22:17:35 +04:00
|
|
|
*
|
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 04:00:49 +04:00
|
|
|
* flush: Block until all pending data on all open streams has been
|
|
|
|
* written down local file descriptors and/or completed sending across
|
|
|
|
* the OOB to remote process targets.
|
2007-06-09 02:59:31 +04:00
|
|
|
*
|
2004-12-22 01:16:09 +03:00
|
|
|
*/
|
2007-04-03 22:17:35 +04:00
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
#ifndef ORTE_IOF_H
|
|
|
|
#define ORTE_IOF_H
|
2004-12-22 01:16:09 +03:00
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
#include "orte_config.h"
|
2008-02-28 04:57:57 +03:00
|
|
|
#include "orte/types.h"
|
|
|
|
|
2015-03-06 06:50:44 +03:00
|
|
|
#include "orte/mca/mca.h"
|
2004-12-22 01:16:09 +03:00
|
|
|
|
2012-05-03 01:00:22 +04:00
|
|
|
#include "orte/runtime/orte_globals.h"
|
2008-02-28 04:57:57 +03:00
|
|
|
|
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 04:00:49 +04:00
|
|
|
#include "iof_types.h"
|
|
|
|
|
2007-06-09 02:59:31 +04:00
|
|
|
BEGIN_C_DECLS
|
2004-12-22 01:16:09 +03:00
|
|
|
|
2014-10-23 19:15:00 +04:00
|
|
|
/* define a macro for requesting a proxy PULL of IO on
|
2014-10-23 21:21:21 +04:00
|
|
|
* behalf of a tool that had the HNP spawn a job. First
|
|
|
|
* argument is the orte_job_t of the spawned job, second
|
|
|
|
* is a pointer to the name of the requesting tool */
|
2017-09-15 16:50:58 +03:00
|
|
|
#define ORTE_IOF_PROXY_PULL(a, b) \
|
|
|
|
do { \
|
|
|
|
opal_buffer_t *buf; \
|
|
|
|
orte_iof_tag_t tag; \
|
|
|
|
orte_process_name_t nm; \
|
|
|
|
\
|
|
|
|
buf = OBJ_NEW(opal_buffer_t); \
|
|
|
|
\
|
|
|
|
/* setup the tag to pull from HNP */ \
|
|
|
|
tag = ORTE_IOF_STDOUTALL | ORTE_IOF_PULL | ORTE_IOF_EXCLUSIVE; \
|
|
|
|
opal_dss.pack(buf, &tag, 1, ORTE_IOF_TAG); \
|
|
|
|
/* pack the name of the source we want to pull */ \
|
|
|
|
nm.jobid = (a)->jobid; \
|
|
|
|
nm.vpid = ORTE_VPID_WILDCARD; \
|
|
|
|
opal_dss.pack(buf, &nm, 1, ORTE_NAME); \
|
|
|
|
/* pack the name of the tool */ \
|
|
|
|
opal_dss.pack(buf, (b), 1, ORTE_NAME); \
|
|
|
|
\
|
|
|
|
/* send the buffer to the HNP */ \
|
|
|
|
orte_rml.send_buffer_nb(orte_mgmt_conduit, \
|
|
|
|
ORTE_PROC_MY_HNP, buf, \
|
|
|
|
ORTE_RML_TAG_IOF_HNP, \
|
|
|
|
orte_rml_send_callback, NULL); \
|
2014-10-23 19:15:00 +04:00
|
|
|
} while(0);
|
|
|
|
|
2010-04-16 22:51:27 +04:00
|
|
|
/* Initialize the selected module */
|
|
|
|
typedef int (*orte_iof_base_init_fn_t)(void);
|
|
|
|
|
2007-06-09 02:59:31 +04:00
|
|
|
/**
|
|
|
|
* Explicitly push data from the specified input file descriptor to
|
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 04:00:49 +04:00
|
|
|
* the stdin of the indicated peer(s). The provided peer name can
|
|
|
|
* include wildcard values.
|
2007-06-09 02:59:31 +04:00
|
|
|
*
|
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 04:00:49 +04:00
|
|
|
* @param peer Name of target peer(s)
|
|
|
|
* @param fd Local file descriptor for input.
|
2005-01-18 19:43:47 +03:00
|
|
|
*/
|
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 04:00:49 +04:00
|
|
|
typedef int (*orte_iof_base_push_fn_t)(const orte_process_name_t* peer,
|
|
|
|
orte_iof_tag_t src_tag, int fd);
|
2005-01-18 19:43:47 +03:00
|
|
|
|
2007-06-09 02:59:31 +04:00
|
|
|
/**
|
|
|
|
* Explicitly pull data from the specified set of SOURCE peers and
|
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 04:00:49 +04:00
|
|
|
* dump to the indicated output file descriptor. Any fragments that
|
|
|
|
* arrive on the stream will automatically be written down the fd.
|
2007-06-09 02:59:31 +04:00
|
|
|
*
|
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 04:00:49 +04:00
|
|
|
* @param peer Name used to qualify set of origin peers.
|
|
|
|
* @param source_tag Indicates the output streams to be forwarded
|
|
|
|
* @param fd Local file descriptor for output.
|
2007-06-09 02:59:31 +04:00
|
|
|
*/
|
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 04:00:49 +04:00
|
|
|
typedef int (*orte_iof_base_pull_fn_t)(const orte_process_name_t* peer,
|
|
|
|
orte_iof_tag_t source_tag,
|
|
|
|
int fd);
|
2007-06-09 02:59:31 +04:00
|
|
|
|
|
|
|
/**
|
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 04:00:49 +04:00
|
|
|
* Close the specified iof stream(s) from the indicated peer(s)
|
2007-06-09 02:59:31 +04:00
|
|
|
*/
|
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 04:00:49 +04:00
|
|
|
typedef int (*orte_iof_base_close_fn_t)(const orte_process_name_t* peer,
|
|
|
|
orte_iof_tag_t source_tag);
|
2005-01-18 19:43:47 +03:00
|
|
|
|
2017-01-05 20:46:05 +03:00
|
|
|
/**
|
|
|
|
* Output something via the IOF subsystem
|
|
|
|
*/
|
|
|
|
typedef int (*orte_iof_base_output_fn_t)(const orte_process_name_t* peer,
|
|
|
|
orte_iof_tag_t source_tag,
|
|
|
|
const char *msg);
|
|
|
|
|
2012-05-03 01:00:22 +04:00
|
|
|
/* Flag that a job is complete */
|
|
|
|
typedef void (*orte_iof_base_complete_fn_t)(const orte_job_t *jdata);
|
|
|
|
|
2010-04-16 22:51:27 +04:00
|
|
|
/* finalize the selected module */
|
|
|
|
typedef int (*orte_iof_base_finalize_fn_t)(void);
|
|
|
|
|
2007-06-09 02:59:31 +04:00
|
|
|
/**
|
|
|
|
* FT Event Notification
|
|
|
|
*/
|
|
|
|
typedef int (*orte_iof_base_ft_event_fn_t)(int state);
|
2006-02-04 00:01:11 +03:00
|
|
|
|
2004-12-22 01:16:09 +03:00
|
|
|
/**
|
|
|
|
* IOF module.
|
|
|
|
*/
|
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 04:00:49 +04:00
|
|
|
struct orte_iof_base_module_2_0_0_t {
|
2010-04-16 22:51:27 +04:00
|
|
|
orte_iof_base_init_fn_t init;
|
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 04:00:49 +04:00
|
|
|
orte_iof_base_push_fn_t push;
|
|
|
|
orte_iof_base_pull_fn_t pull;
|
|
|
|
orte_iof_base_close_fn_t close;
|
2017-01-05 20:46:05 +03:00
|
|
|
orte_iof_base_output_fn_t output;
|
2012-05-03 01:00:22 +04:00
|
|
|
orte_iof_base_complete_fn_t complete;
|
2010-04-16 22:51:27 +04:00
|
|
|
orte_iof_base_finalize_fn_t finalize;
|
2007-03-17 02:11:45 +03:00
|
|
|
orte_iof_base_ft_event_fn_t ft_event;
|
2004-12-22 01:16:09 +03:00
|
|
|
};
|
|
|
|
|
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 04:00:49 +04:00
|
|
|
typedef struct orte_iof_base_module_2_0_0_t orte_iof_base_module_2_0_0_t;
|
|
|
|
typedef orte_iof_base_module_2_0_0_t orte_iof_base_module_t;
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_DECLSPEC extern orte_iof_base_module_t orte_iof;
|
2004-12-22 01:16:09 +03:00
|
|
|
|
2008-07-29 02:40:57 +04:00
|
|
|
struct orte_iof_base_component_2_0_0_t {
|
2004-12-22 01:16:09 +03:00
|
|
|
mca_base_component_t iof_version;
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_base_component_data_t iof_data;
|
2004-12-22 01:16:09 +03:00
|
|
|
};
|
2008-07-29 02:40:57 +04:00
|
|
|
typedef struct orte_iof_base_component_2_0_0_t orte_iof_base_component_2_0_0_t;
|
|
|
|
typedef struct orte_iof_base_component_2_0_0_t orte_iof_base_component_t;
|
2007-06-09 02:59:31 +04:00
|
|
|
|
|
|
|
END_C_DECLS
|
|
|
|
|
2004-12-22 01:16:09 +03:00
|
|
|
/*
|
2008-07-29 02:40:57 +04:00
|
|
|
* Macro for use in components that are of type iof
|
2004-12-22 01:16:09 +03:00
|
|
|
*/
|
2008-07-29 02:40:57 +04:00
|
|
|
#define ORTE_IOF_BASE_VERSION_2_0_0 \
|
2015-03-06 06:50:44 +03:00
|
|
|
ORTE_MCA_BASE_VERSION_2_1_0("iof", 2, 0, 0)
|
2004-12-22 01:16:09 +03:00
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
#endif /* ORTE_IOF_H */
|