2008-02-28 04:57:57 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2004-2008 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$
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** @file:
|
|
|
|
*
|
|
|
|
* Populates global structure with system-specific information.
|
|
|
|
*
|
|
|
|
* Notes: add limits.h, compute size of integer and other types via sizeof(type)*CHAR_BIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ORTE_NAME_FNS_H_
|
|
|
|
#define _ORTE_NAME_FNS_H_
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
|
|
|
#include "orte/types.h"
|
|
|
|
|
|
|
|
#include "opal/class/opal_list.h"
|
|
|
|
|
|
|
|
BEGIN_C_DECLS
|
|
|
|
|
|
|
|
typedef uint8_t orte_ns_cmp_bitmask_t; /**< Bit mask for comparing process names */
|
|
|
|
#define ORTE_NS_CMP_NONE 0x00
|
|
|
|
#define ORTE_NS_CMP_JOBID 0x02
|
|
|
|
#define ORTE_NS_CMP_VPID 0x04
|
2009-03-13 01:17:42 +03:00
|
|
|
#define ORTE_NS_CMP_ALL 0xff
|
2008-02-28 04:57:57 +03:00
|
|
|
|
|
|
|
/* useful define to print name args in output messages */
|
|
|
|
ORTE_DECLSPEC char* orte_util_print_name_args(const orte_process_name_t *name);
|
2009-03-06 00:50:47 +03:00
|
|
|
#define ORTE_NAME_PRINT(n) \
|
|
|
|
orte_util_print_name_args(n)
|
2008-02-28 04:57:57 +03:00
|
|
|
|
|
|
|
ORTE_DECLSPEC char* orte_util_print_jobids(const orte_jobid_t job);
|
2009-03-06 00:50:47 +03:00
|
|
|
#define ORTE_JOBID_PRINT(n) \
|
|
|
|
orte_util_print_jobids(n)
|
2008-02-28 04:57:57 +03:00
|
|
|
|
|
|
|
ORTE_DECLSPEC char* orte_util_print_vpids(const orte_vpid_t vpid);
|
2009-03-06 00:50:47 +03:00
|
|
|
#define ORTE_VPID_PRINT(n) \
|
|
|
|
orte_util_print_vpids(n)
|
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
|
|
|
ORTE_DECLSPEC char* orte_util_print_job_family(const orte_jobid_t job);
|
2009-03-06 00:50:47 +03:00
|
|
|
#define ORTE_JOB_FAMILY_PRINT(n) \
|
|
|
|
orte_util_print_job_family(n)
|
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_DECLSPEC char* orte_util_print_local_jobid(const orte_jobid_t job);
|
2009-03-06 00:50:47 +03:00
|
|
|
#define ORTE_LOCAL_JOBID_PRINT(n) \
|
|
|
|
orte_util_print_local_jobid(n)
|
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
|
|
|
|
2008-02-28 04:57:57 +03:00
|
|
|
|
|
|
|
/* a macro for identifying the job family - i.e., for
|
|
|
|
* extracting the mpirun-specific id field of the jobid
|
|
|
|
*/
|
|
|
|
#define ORTE_JOB_FAMILY(n) \
|
2008-04-30 23:49:53 +04:00
|
|
|
(((n) >> 16) & 0x0000ffff)
|
|
|
|
|
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
|
|
|
/* a macro for discovering the HNP name of a proc given its jobid */
|
|
|
|
#define ORTE_HNP_NAME_FROM_JOB(n, job) \
|
|
|
|
do { \
|
|
|
|
(n)->jobid = (job) & 0xffff0000; \
|
|
|
|
(n)->vpid = 0; \
|
|
|
|
} while(0);
|
2008-02-28 04:57:57 +03:00
|
|
|
|
2008-07-29 22:58:35 +04:00
|
|
|
/* a macro for extracting the local jobid from the jobid - i.e.,
|
|
|
|
* the non-mpirun-specific id field of the jobid
|
|
|
|
*/
|
|
|
|
#define ORTE_LOCAL_JOBID(n) \
|
|
|
|
( (n) & 0x0000ffff)
|
|
|
|
|
2008-12-21 02:27:25 +03:00
|
|
|
#define ORTE_CONSTRUCT_LOCAL_JOBID(local, job) \
|
|
|
|
( ((local) & 0xffff0000) | ((job) & 0x0000ffff) )
|
|
|
|
|
Repair the MPI-2 dynamic operations. This includes:
1. repair of the linear and direct routed modules
2. repair of the ompi/pubsub/orte module to correctly init routes to the ompi-server, and correctly handle failure to correctly parse the provided ompi-server URI
3. modification of orterun to accept both "file" and "FILE" for designating where the ompi-server URI is to be found - purely a convenience feature
4. resolution of a message ordering problem during the connect/accept handshake that allowed the "send-first" proc to attempt to send to the "recv-first" proc before the HNP had actually updated its routes.
Let this be a further reminder to all - message ordering is NOT guaranteed in the OOB
5. Repair the ompi/dpm/orte module to correctly init routes during connect/accept.
Reminder to all: messages sent to procs in another job family (i.e., started by a different mpirun) are ALWAYS routed through the respective HNPs. As per the comments in orte/routed, this is REQUIRED to maintain connect/accept (where only the root proc on each side is capable of init'ing the routes), allow communication between mpirun's using different routing modules, and to minimize connections on tools such as ompi-server. It is all taken care of "under the covers" by the OOB to ensure that a route back to the sender is maintained, even when the different mpirun's are using different routed modules.
6. corrections in the orte/odls to ensure proper identification of daemons participating in a dynamic launch
7. corrections in build/nidmap to support update of an existing nidmap during dynamic launch
8. corrected implementation of the update_arch function in the ESS, along with consolidation of a number of ESS operations into base functions for easier maintenance. The ability to support info from multiple jobs was added, although we don't currently do so - this will come later to support further fault recovery strategies
9. minor updates to several functions to remove unnecessary and/or no longer used variables and envar's, add some debugging output, etc.
10. addition of a new macro ORTE_PROC_IS_DAEMON that resolves to true if the provided proc is a daemon
There is still more cleanup to be done for efficiency, but this at least works.
Tested on single-node Mac, multi-node SLURM via odin. Tests included connect/accept, publish/lookup/unpublish, comm_spawn, comm_spawn_multiple, and singleton comm_spawn.
Fixes ticket #1256
This commit was SVN r18804.
2008-07-03 21:53:37 +04:00
|
|
|
/* a macro for identifying that a proc is a daemon */
|
|
|
|
#define ORTE_PROC_IS_DAEMON(n) \
|
|
|
|
!((n) & 0x0000ffff)
|
|
|
|
|
2008-02-28 04:57:57 +03:00
|
|
|
/* List of names for general use */
|
|
|
|
struct orte_namelist_t {
|
|
|
|
opal_list_item_t item; /**< Allows this item to be placed on a list */
|
|
|
|
orte_process_name_t name; /**< Name of a process */
|
|
|
|
};
|
|
|
|
typedef struct orte_namelist_t orte_namelist_t;
|
|
|
|
|
|
|
|
ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_namelist_t);
|
|
|
|
|
|
|
|
ORTE_DECLSPEC int orte_util_convert_jobid_to_string(char **jobid_string, const orte_jobid_t jobid);
|
|
|
|
ORTE_DECLSPEC int orte_util_convert_string_to_jobid(orte_jobid_t *jobid, const char* jobidstring);
|
|
|
|
ORTE_DECLSPEC int orte_util_convert_vpid_to_string(char **vpid_string, const orte_vpid_t vpid);
|
|
|
|
ORTE_DECLSPEC int orte_util_convert_string_to_vpid(orte_vpid_t *vpid, const char* vpidstring);
|
|
|
|
ORTE_DECLSPEC int orte_util_convert_string_to_process_name(orte_process_name_t *name,
|
|
|
|
const char* name_string);
|
|
|
|
ORTE_DECLSPEC int orte_util_convert_process_name_to_string(char** name_string,
|
|
|
|
const orte_process_name_t *name);
|
|
|
|
ORTE_DECLSPEC int orte_util_create_process_name(orte_process_name_t **name,
|
|
|
|
orte_jobid_t job,
|
|
|
|
orte_vpid_t vpid);
|
|
|
|
ORTE_DECLSPEC int orte_util_compare_name_fields(orte_ns_cmp_bitmask_t fields,
|
|
|
|
const orte_process_name_t* name1,
|
|
|
|
const orte_process_name_t* name2);
|
2008-03-06 01:44:35 +03:00
|
|
|
/** This funtion returns a guaranteed unique hash value for the passed process name */
|
|
|
|
ORTE_DECLSPEC uint64_t orte_util_hash_name(const orte_process_name_t * name);
|
2008-02-28 04:57:57 +03:00
|
|
|
|
|
|
|
END_C_DECLS
|
|
|
|
#endif
|