2004-06-29 04:50:40 +00:00
|
|
|
/*
|
2004-11-22 01:38:40 +00:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
* All rights reserved.
|
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-06-29 04:50:40 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** @file:
|
|
|
|
*
|
|
|
|
* Populates global structure with process-specific information.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2004-10-22 16:06:05 +00:00
|
|
|
#include "ompi_config.h"
|
2004-10-25 14:14:20 +00:00
|
|
|
|
2004-10-20 01:03:09 +00:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
2004-06-29 04:50:40 +00:00
|
|
|
#include <sys/types.h>
|
2004-10-20 01:03:09 +00:00
|
|
|
#endif
|
2004-06-29 21:17:46 +00:00
|
|
|
#include "mca/ns/ns.h"
|
2004-06-29 04:50:40 +00:00
|
|
|
|
2004-10-25 14:14:20 +00:00
|
|
|
#ifndef _OMPI_PROC_INFO_H_
|
|
|
|
#define _OMPI_PROC_INFO_H_
|
2004-09-03 16:26:15 +00:00
|
|
|
|
2004-10-20 22:31:03 +00:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
Not as bad as this all may look. Tim and I made a significant change to the way we handle the startup of the oob, the seed, etc. We have made it backwards-compatible so that mpirun2 and singleton operations remain working. We had to adjust the name server and gpr as well, plus the process_info structure.
This also includes a checkpoint update to openmpi.c and ompid.c. I have re-enabled the ompid compile.
This latter raises an important point. The trunk compiles the programs like ompid just fine under Linux. It also does just fine for OSX under the dynamic libraries. However, we are seeing errors when compiling under OSX for the static case - the linker seems to have trouble resolving some variable names, even though linker diagnostics show the variables as being defined. Thus, a warning to Mac users that you may have to locally turn things off if you are trying to do static compiles. We ask, however, that you don't commit those changes that turn things off for everyone else - instead, let's try to figure out why the static compile is having a problem, and let everyone else continue to work.
Thanks
Ralph
This commit was SVN r2534.
2004-09-08 03:59:06 +00:00
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2004-06-29 04:50:40 +00:00
|
|
|
/**
|
|
|
|
* Process information structure
|
|
|
|
*
|
2004-08-10 16:05:22 +00:00
|
|
|
* The ompi_proc_info() function fills the pid field and obtains the
|
|
|
|
* process name, storing that information in the global structure. The
|
|
|
|
* structure also holds path names to the universe, job, and process
|
|
|
|
* session directories, and to the stdin, stdout, and stderr temp
|
|
|
|
* files - however, these are all initialized elsewhere.
|
2004-06-29 04:50:40 +00:00
|
|
|
*/
|
|
|
|
struct ompi_proc_info_t {
|
|
|
|
bool init; /**< Certifies that values have been filled.
|
|
|
|
* Certifies that the ompi_sys_info() function has been
|
|
|
|
* called at least once so fields have valid values
|
|
|
|
*/
|
|
|
|
pid_t pid; /**< Local process ID for this process */
|
2004-07-08 12:43:30 +00:00
|
|
|
bool seed; /**< Indicate whether or not this is seed daemon */
|
Not as bad as this all may look. Tim and I made a significant change to the way we handle the startup of the oob, the seed, etc. We have made it backwards-compatible so that mpirun2 and singleton operations remain working. We had to adjust the name server and gpr as well, plus the process_info structure.
This also includes a checkpoint update to openmpi.c and ompid.c. I have re-enabled the ompid compile.
This latter raises an important point. The trunk compiles the programs like ompid just fine under Linux. It also does just fine for OSX under the dynamic libraries. However, we are seeing errors when compiling under OSX for the static case - the linker seems to have trouble resolving some variable names, even though linker diagnostics show the variables as being defined. Thus, a warning to Mac users that you may have to locally turn things off if you are trying to do static compiles. We ask, however, that you don't commit those changes that turn things off for everyone else - instead, let's try to figure out why the static compile is having a problem, and let everyone else continue to work.
Thanks
Ralph
This commit was SVN r2534.
2004-09-08 03:59:06 +00:00
|
|
|
ompi_process_name_t *ns_replica; /**< Name of my name server replica (NULL=>me) */
|
|
|
|
ompi_process_name_t *gpr_replica; /**< Name of my registry replica (NULL=>me) */
|
2004-09-03 16:26:15 +00:00
|
|
|
char *my_universe; /**< Name of the universe to which this process belongs */
|
2004-08-23 21:39:22 +00:00
|
|
|
char *tmpdir_base; /**< Base directory of the session dir tree */
|
2004-08-29 16:37:02 +00:00
|
|
|
char *top_session_dir; /**< Top-most directory of the session tree */
|
|
|
|
char *universe_session_dir; /**< Location of universe temp dir.
|
2004-06-29 04:50:40 +00:00
|
|
|
* The session directory has the form
|
2004-06-29 07:02:57 +00:00
|
|
|
* <prefix><openmpi-sessions-user><universe>, where the prefix
|
2004-06-29 04:50:40 +00:00
|
|
|
* can either be provided by the user via the
|
|
|
|
* --tmpdir command-line flag, the use of one of several
|
2004-06-29 07:02:57 +00:00
|
|
|
* environmental variables, or else a default location.
|
2004-06-29 04:50:40 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
char *job_session_dir; /**< Session directory for job */
|
|
|
|
|
|
|
|
char *proc_session_dir; /**< Session directory for the process */
|
|
|
|
|
|
|
|
char *sock_stdin; /**< Path name to temp file for stdin. */
|
|
|
|
char *sock_stdout; /**< Path name to temp file for stdout. */
|
|
|
|
char *sock_stderr; /**< Path name to temp file for stderr. */
|
|
|
|
};
|
|
|
|
typedef struct ompi_proc_info_t ompi_proc_info_t;
|
|
|
|
|
2004-08-10 16:05:22 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Global process info descriptor. Initialized to almost no
|
|
|
|
* meaningful information - data is provided by calling \c
|
|
|
|
* ompi_rte_init() (which calls \c ompi_proc_info() to fill in the
|
|
|
|
* structure).
|
|
|
|
*
|
|
|
|
* The exception to this rule is the \c ompi_process_info.seed field,
|
|
|
|
* which will be initialized to \c false, but should be set to \c true
|
|
|
|
* before calling \c ompi_rte_info() if the caller is a seed daemon.
|
|
|
|
*/
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC extern ompi_proc_info_t ompi_process_info;
|
2004-06-29 04:50:40 +00:00
|
|
|
|
2004-08-10 16:05:22 +00:00
|
|
|
|
2004-06-29 04:50:40 +00:00
|
|
|
/**
|
2004-08-10 16:05:22 +00:00
|
|
|
* \internal
|
|
|
|
*
|
|
|
|
* Global structure to store a wide range of information about the
|
|
|
|
* process. ompi_proc_info populates a global variable with
|
|
|
|
* information about the process being executing. This function should
|
|
|
|
* be called only once, from ompi_rte_init().
|
2004-06-29 04:50:40 +00:00
|
|
|
*
|
|
|
|
* @param None.
|
|
|
|
*
|
|
|
|
* @retval OMPI_SUCCESS Successfully initialized the various fields.
|
|
|
|
* @retval OMPI_ERROR Failed to initialize one or more fields.
|
|
|
|
*/
|
|
|
|
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC int ompi_proc_info(void);
|
Not as bad as this all may look. Tim and I made a significant change to the way we handle the startup of the oob, the seed, etc. We have made it backwards-compatible so that mpirun2 and singleton operations remain working. We had to adjust the name server and gpr as well, plus the process_info structure.
This also includes a checkpoint update to openmpi.c and ompid.c. I have re-enabled the ompid compile.
This latter raises an important point. The trunk compiles the programs like ompid just fine under Linux. It also does just fine for OSX under the dynamic libraries. However, we are seeing errors when compiling under OSX for the static case - the linker seems to have trouble resolving some variable names, even though linker diagnostics show the variables as being defined. Thus, a warning to Mac users that you may have to locally turn things off if you are trying to do static compiles. We ask, however, that you don't commit those changes that turn things off for everyone else - instead, let's try to figure out why the static compile is having a problem, and let everyone else continue to work.
Thanks
Ralph
This commit was SVN r2534.
2004-09-08 03:59:06 +00:00
|
|
|
|
2004-10-20 22:31:03 +00:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
Not as bad as this all may look. Tim and I made a significant change to the way we handle the startup of the oob, the seed, etc. We have made it backwards-compatible so that mpirun2 and singleton operations remain working. We had to adjust the name server and gpr as well, plus the process_info structure.
This also includes a checkpoint update to openmpi.c and ompid.c. I have re-enabled the ompid compile.
This latter raises an important point. The trunk compiles the programs like ompid just fine under Linux. It also does just fine for OSX under the dynamic libraries. However, we are seeing errors when compiling under OSX for the static case - the linker seems to have trouble resolving some variable names, even though linker diagnostics show the variables as being defined. Thus, a warning to Mac users that you may have to locally turn things off if you are trying to do static compiles. We ask, however, that you don't commit those changes that turn things off for everyone else - instead, let's try to figure out why the static compile is having a problem, and let everyone else continue to work.
Thanks
Ralph
This commit was SVN r2534.
2004-09-08 03:59:06 +00:00
|
|
|
}
|
|
|
|
#endif
|
2004-10-22 16:06:05 +00:00
|
|
|
|
|
|
|
#endif
|