Surrender to the tyranny of C++ and give up on enum for node states, as nice as that would be, in favor of retaining memory footprint constraints.
This commit was SVN r31149.
Этот коммит содержится в:
родитель
20fe3804b0
Коммит
d17f811ff5
@ -187,7 +187,7 @@ typedef int32_t orte_job_state_t;
|
||||
|
||||
|
||||
/**
|
||||
* Node State, corresponding to the ORTE_NODE_STATE_* #defines,
|
||||
* Node State, corresponding to the ORTE_NODE_STATE_* #defines,
|
||||
* below. These are #defines instead of an enum because the thought
|
||||
* is that we may have lots and lots of entries of these in the
|
||||
* registry and by making this an int8_t, it's only 1 byte, whereas an
|
||||
@ -197,18 +197,14 @@ typedef int32_t orte_job_state_t;
|
||||
typedef int8_t orte_node_state_t;
|
||||
#define ORTE_NODE_STATE_T OPAL_INT8
|
||||
|
||||
/* use an enum to define the values, though, so the debugger
|
||||
* can report the name of the value
|
||||
*/
|
||||
enum orte_node_state_t {
|
||||
ORTE_NODE_STATE_UNDEF, // Node is undefined
|
||||
ORTE_NODE_STATE_UNKNOWN, // Node is defined but in an unknown state
|
||||
ORTE_NODE_STATE_DOWN, // Node is down
|
||||
ORTE_NODE_STATE_UP, // Node is up / available for use
|
||||
ORTE_NODE_STATE_REBOOT, // Node is rebooting
|
||||
ORTE_NODE_STATE_DO_NOT_USE, // Node is up, but not available for use for the next mapping
|
||||
ORTE_NODE_STATE_NOT_INCLUDED // Node is up, but not part of the node pool for jobs
|
||||
};
|
||||
#define ORTE_NODE_STATE_UNDEF 0 // Node is undefined
|
||||
#define ORTE_NODE_STATE_UNKNOWN 1 // Node is defined but in an unknown state
|
||||
#define ORTE_NODE_STATE_DOWN 2 // Node is down
|
||||
#define ORTE_NODE_STATE_UP 3 // Node is up / available for use
|
||||
#define ORTE_NODE_STATE_REBOOT 4 // Node is rebooting
|
||||
#define ORTE_NODE_STATE_DO_NOT_USE 5 // Node is up, but not available for use for the next mapping
|
||||
#define ORTE_NODE_STATE_NOT_INCLUDED 6 // Node is up, but not part of the node pool for jobs
|
||||
|
||||
|
||||
/* Define a boundary so that external developers
|
||||
* have a starting point for defining their own
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user