28 #ifndef _ORTE_NAME_FNS_H_
29 #define _ORTE_NAME_FNS_H_
31 #include "orte_config.h"
44 #define ORTE_NS_CMP_NONE 0x00
45 #define ORTE_NS_CMP_JOBID 0x02
46 #define ORTE_NS_CMP_VPID 0x04
47 #define ORTE_NS_CMP_EPOCH 0x08
48 #define ORTE_NS_CMP_ALL 0x0f
49 #define ORTE_NS_CMP_WILD 0x10
53 #define ORTE_NAME_PRINT(n) \
54 orte_util_print_name_args(n)
56 ORTE_DECLSPEC
char* orte_util_print_jobids(
const orte_jobid_t job);
57 #define ORTE_JOBID_PRINT(n) \
58 orte_util_print_jobids(n)
60 ORTE_DECLSPEC
char* orte_util_print_vpids(
const orte_vpid_t vpid);
61 #define ORTE_VPID_PRINT(n) \
62 orte_util_print_vpids(n)
65 ORTE_DECLSPEC
char* orte_util_print_epoch(
const orte_epoch_t epoch);
66 #define ORTE_EPOCH_PRINT(n) \
67 orte_util_print_epoch(n)
69 #define ORTE_EPOCH_PRINT(n) ""
72 ORTE_DECLSPEC
char* orte_util_print_job_family(
const orte_jobid_t job);
73 #define ORTE_JOB_FAMILY_PRINT(n) \
74 orte_util_print_job_family(n)
76 ORTE_DECLSPEC
char* orte_util_print_local_jobid(
const orte_jobid_t job);
77 #define ORTE_LOCAL_JOBID_PRINT(n) \
78 orte_util_print_local_jobid(n)
80 ORTE_DECLSPEC
char *orte_pretty_print_timing(int64_t secs, int64_t usecs);
85 #define ORTE_JOB_FAMILY(n) \
86 (((n) >> 16) & 0x0000ffff)
89 #define ORTE_HNP_NAME_FROM_JOB(n, job) \
91 (n)->jobid = (job) & 0xffff0000; \
98 #define ORTE_LOCAL_JOBID(n) \
101 #define ORTE_CONSTRUCT_JOB_FAMILY(n) \
102 ( ((n) << 16) & 0xffff0000)
104 #define ORTE_CONSTRUCT_LOCAL_JOBID(local, job) \
105 ( ((local) & 0xffff0000) | ((job) & 0x0000ffff) )
108 #define ORTE_JOBID_IS_DAEMON(n) \
112 #if ORTE_ENABLE_EPOCH
113 #define ORTE_EPOCH_GET(n) \
116 #define ORTE_EPOCH_GET(n) 0
120 #if ORTE_ENABLE_EPOCH
121 #define ORTE_EPOCH_SET(n,m) \
124 #define ORTE_EPOCH_SET(n,m) \
138 ORTE_DECLSPEC
int orte_util_convert_jobid_to_string(
char **jobid_string,
const orte_jobid_t jobid);
140 ORTE_DECLSPEC
int orte_util_convert_vpid_to_string(
char **vpid_string,
const orte_vpid_t vpid);
142 #if ORTE_ENABLE_EPOCH
143 ORTE_DECLSPEC
int orte_util_convert_epoch_to_string(
char **epoch_string,
const orte_epoch_t epoch);
144 ORTE_DECLSPEC
int orte_util_convert_string_to_epoch(orte_vpid_t *epoch,
const char* epochstring);
147 const char* name_string);
148 ORTE_DECLSPEC
int orte_util_convert_process_name_to_string(
char** name_string,
150 #if ORTE_ENABLE_EPOCH
166 const char* sysinfo_string);
167 ORTE_DECLSPEC
int orte_util_convert_sysinfo_to_string(
char** sysinfo_string,
168 const char *cpu_model,
const char *cpu_type);
uint32_t orte_jobid_t
Set the allowed range for ids in each space.
Definition: types.h:76
orte_process_name_t name
Name of a process.
Definition: name_fns.h:132
opal_list_item_t item
Allows this item to be placed on a list.
Definition: name_fns.h:131
BEGIN_C_DECLS typedef uint8_t orte_ns_cmp_bitmask_t
Bit mask for comparing process names.
Definition: name_fns.h:43
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
Definition: opal_list.h:98
ORTE_DECLSPEC int orte_util_convert_string_to_jobid(orte_jobid_t *jobid, const char *jobidstring)
Definition: name_fns.c:343
ORTE_DECLSPEC int orte_util_convert_string_to_process_name(orte_process_name_t *name, const char *name_string)
Definition: name_fns.c:465
ORTE_DECLSPEC uint64_t orte_util_hash_name(const orte_process_name_t *name)
This funtion returns a guaranteed unique hash value for the passed process name.
Definition: name_fns.c:705
ORTE_DECLSPEC int orte_util_convert_string_to_vpid(orte_vpid_t *vpid, const char *vpidstring)
Definition: name_fns.c:391
ORTE_DECLSPEC int orte_util_convert_string_to_sysinfo(char **cpu_type, char **cpu_model, const char *sysinfo_string)
Definition: name_fns.c:718
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236
Definition: name_fns.h:130