1
1

Updated versions of sys_info.c/h to provide backward compatibility with C89 and revise include path on constants to work on some computers (still not sure why, but it seems necessary).

This commit was SVN r1161.
Этот коммит содержится в:
Ralph Castain 2004-05-26 19:11:55 +00:00
родитель 6daa499427
Коммит 372e937d17
2 изменённых файлов: 38 добавлений и 29 удалений

Просмотреть файл

@ -12,20 +12,21 @@
#include "include/constants.h" #include "include/constants.h"
#include "util/sys_info.h" #include "util/sys_info.h"
ompi_sys_info_t ompi_system_info = {false, ompi_sys_info_t ompi_system_info = {
NULL, /* .init = */ false,
NULL, /* .sysname = */ NULL,
NULL, /* .nodename = */ NULL,
NULL, /* .release = */ NULL,
NULL, /* .version = */ NULL,
NULL, /* .machine = */ NULL,
NULL, /* .path_sep = */ NULL,
NULL, /* .user = */ NULL,
NULL, /* .session_dir = */ NULL,
NULL, /* .enviro = */ NULL,
NULL, /* .suffix = */ NULL,
NULL, /* .sock_stdin = */ NULL,
NULL}; /* .sock_stdout = */ NULL,
/* .sock_stderr = */ NULL};
void ompi_sys_info(void) void ompi_sys_info(void)

Просмотреть файл

@ -37,24 +37,32 @@
#include <sys/utsname.h> #include <sys/utsname.h>
struct ompi_sys_info_t { struct ompi_sys_info_t {
bool init; /* Certifies that values have been filled */ bool init; /** Certifies that values have been filled */
char *sysname; /* Name of OS */ char *sysname; /** Name of OS */
char *nodename; /* Name of this network node */ char *nodename; /** Name of this network node */
char *release; /* Release level */ char *release; /** Release level */
char *version; /* Version level */ char *version; /** Version level */
char *machine; /* Hardware type */ char *machine; /** Hardware type */
/* --------- above line = fields in utsname structure -------- */ /** ---------- above line = fields in utsname structure ---------
char *path_sep; /* path separation char, saved as string */ * Following fields are added to support Open MPI-specific needs
char *user; /* user id on this system */ */
char *session_dir; /* location of user writable temp dir for storing session info */ char *path_sep; /** path separation char, saved as string */
char *enviro; /* computing environment employed on this system */ char *user; /** user id on this system */
char *suffix; /* automatic suffix added to file names, if system does this */ char *session_dir; /** location of user writable temp dir for storing session info */
char *sock_stdin; /* path name to temp file for stdin */ char *enviro; /** computing environment employed on this system */
char *sock_stdout; /* path name to temp file for stdout */ char *suffix; /** automatic suffix added to file names, if system does this */
char *sock_stderr; /* path name to temp file for stderr */ 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_sys_info_t ompi_sys_info_t; typedef struct ompi_sys_info_t ompi_sys_info_t;
extern ompi_sys_info_t ompi_system_info; extern ompi_sys_info_t ompi_system_info;
/**
* Discover and record a wide range of information about the system upon which
* this code is executing.
*
* @retval None
void ompi_sys_info(void); void ompi_sys_info(void);