reformat code and job array
This commit is contained in:
parent
a665ccd4fe
commit
9ff857db9f
64 changed files with 1497 additions and 2476 deletions
|
|
@ -2,8 +2,12 @@
|
|||
|
||||
#define _CONFIG_H_
|
||||
|
||||
#define BUG_EMAIL "rshen@shenrs.eu"
|
||||
#define DEFAULT_WORKDIR "/tmp/xce"
|
||||
#include <stdint.h>
|
||||
|
||||
typedef uint64_t jobid_t;
|
||||
|
||||
#define BUG_EMAIL "rshen@shenrs.eu"
|
||||
#define DEFAULT_WORKDIR "/tmp/xce"
|
||||
|
||||
#define XCE_MAXNAME_LEN (64)
|
||||
#define XCE_MAXHOSTNAME_LEN (256) /* hostname suggest to 256 */
|
||||
|
|
@ -19,4 +23,34 @@
|
|||
#define XCE_MAXCMD_LEN (4096)
|
||||
#define XCE_MAX_ERRMSG_LEN (4096)
|
||||
|
||||
#define N_JOBID_BITS (sizeof(jobid_t) * 8)
|
||||
|
||||
#define N_CLUSTER_ID_BITS (6)
|
||||
#define CLUSTER_ID_SHIFT (N_JOBID_BITS - N_CLUSTER_ID_BITS)
|
||||
|
||||
#define N_APISERVER_ID_BITS (4)
|
||||
#define APISERVER_ID_SHIFT (CLUSTER_ID_SHIFT - N_APISERVER_ID_BITS)
|
||||
|
||||
#define N_TIMESTAMP_BITS (32)
|
||||
#define TIMESTAMP_SHIFT (APISERVER_ID_SHIFT - N_TIMESTAMP_BITS)
|
||||
|
||||
#define N_TAG_BITS (2)
|
||||
#define TAG_SHIFT (TIMESTAMP_SHIFT - N_TAG_BITS)
|
||||
|
||||
#define N_ARRAY_IDX_BITS (15)
|
||||
|
||||
#define TAG_JOB_ARRAY (0x01)
|
||||
|
||||
#define N_SEQENCE_BITS \
|
||||
(N_JOBID_BITS - N_CLUSTER_ID_BITS - N_APISERVER_ID_BITS - N_TIMESTAMP_BITS \
|
||||
- N_TAG_BITS)
|
||||
|
||||
#define SEQUENCE_HIGH_SHIFT (N_ARRAY_IDX_BITS)
|
||||
|
||||
#define UMAX_BITS(w) ((((uint64_t)0x01) << (int)w) - 1)
|
||||
|
||||
#define MAX_CLUSTER_ID (UMAX_BITS(N_CLUSTER_ID_BITS))
|
||||
#define MAX_APISERVER_ID (UMAX_BITS(N_APISERVER_ID_BITS))
|
||||
#define MAX_ARRAY_IDX (UMAX_BITS(N_ARRAY_IDX_BITS))
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue