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.
Этот коммит содержится в:
родитель
6daa499427
Коммит
372e937d17
@ -12,20 +12,21 @@
|
||||
#include "include/constants.h"
|
||||
#include "util/sys_info.h"
|
||||
|
||||
ompi_sys_info_t ompi_system_info = {false,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL};
|
||||
ompi_sys_info_t ompi_system_info = {
|
||||
/* .init = */ false,
|
||||
/* .sysname = */ NULL,
|
||||
/* .nodename = */ NULL,
|
||||
/* .release = */ NULL,
|
||||
/* .version = */ NULL,
|
||||
/* .machine = */ NULL,
|
||||
/* .path_sep = */ NULL,
|
||||
/* .user = */ NULL,
|
||||
/* .session_dir = */ NULL,
|
||||
/* .enviro = */ NULL,
|
||||
/* .suffix = */ NULL,
|
||||
/* .sock_stdin = */ NULL,
|
||||
/* .sock_stdout = */ NULL,
|
||||
/* .sock_stderr = */ NULL};
|
||||
|
||||
|
||||
void ompi_sys_info(void)
|
||||
|
@ -37,24 +37,32 @@
|
||||
#include <sys/utsname.h>
|
||||
|
||||
struct ompi_sys_info_t {
|
||||
bool init; /* Certifies that values have been filled */
|
||||
char *sysname; /* Name of OS */
|
||||
char *nodename; /* Name of this network node */
|
||||
char *release; /* Release level */
|
||||
char *version; /* Version level */
|
||||
char *machine; /* Hardware type */
|
||||
/* --------- above line = fields in utsname structure -------- */
|
||||
char *path_sep; /* path separation char, saved as string */
|
||||
char *user; /* user id on this system */
|
||||
char *session_dir; /* location of user writable temp dir for storing session info */
|
||||
char *enviro; /* computing environment employed on this system */
|
||||
char *suffix; /* automatic suffix added to file names, if system does this */
|
||||
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 */
|
||||
bool init; /** Certifies that values have been filled */
|
||||
char *sysname; /** Name of OS */
|
||||
char *nodename; /** Name of this network node */
|
||||
char *release; /** Release level */
|
||||
char *version; /** Version level */
|
||||
char *machine; /** Hardware type */
|
||||
/** ---------- above line = fields in utsname structure ---------
|
||||
* Following fields are added to support Open MPI-specific needs
|
||||
*/
|
||||
char *path_sep; /** path separation char, saved as string */
|
||||
char *user; /** user id on this system */
|
||||
char *session_dir; /** location of user writable temp dir for storing session info */
|
||||
char *enviro; /** computing environment employed on this system */
|
||||
char *suffix; /** automatic suffix added to file names, if system does this */
|
||||
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;
|
||||
|
||||
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);
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user