scheduling using real slots number
This commit is contained in:
parent
8db4458375
commit
780e9fb313
22 changed files with 980 additions and 105 deletions
|
|
@ -10,14 +10,36 @@
|
|||
#include "xce/types.h"
|
||||
#include "zarray.h"
|
||||
|
||||
/* FIXME: improve later */
|
||||
typedef void* host_selection_t;
|
||||
|
||||
typedef enum {
|
||||
RESREQ_OP_SIMPLE
|
||||
= 0, /* simple just a list of resources and require values */
|
||||
RESREQ_OP_AFFINITY, /* with affinity allocation */
|
||||
RESREQ_OP_GPU, /* with GPU allocation */
|
||||
RESREQ_OP_PARALL, /* parall job nhosts, ptile and other constraints */
|
||||
RESREQ_OP_AND, /* success for all */
|
||||
RESREQ_OP_OR /* success for any */
|
||||
} resreq_op_t;
|
||||
|
||||
/* simple resource allocation just have numeric resource values */
|
||||
typedef struct {
|
||||
host_selection_t* select;
|
||||
int nres;
|
||||
uint32_t* resources;
|
||||
float* amount;
|
||||
} rank_req_t;
|
||||
host_selection_t* selection;
|
||||
int nres_shared;
|
||||
int* idxs_shared;
|
||||
float* vals_shared;
|
||||
int nres_host;
|
||||
int* idxs_host;
|
||||
float* vals_host;
|
||||
} resreq_simple_t;
|
||||
|
||||
typedef struct {
|
||||
resreq_op_t op;
|
||||
union {
|
||||
resreq_simple_t simple;
|
||||
} u;
|
||||
} resreq_t;
|
||||
|
||||
typedef struct {
|
||||
char* name;
|
||||
|
|
@ -48,10 +70,11 @@ typedef struct {
|
|||
xce_sched_queue_t* queue;
|
||||
xce_sched_user_t* user;
|
||||
xce_sched_project_t* project;
|
||||
void* allocator;
|
||||
resreq_t* resreq;
|
||||
uint32_t mintasks;
|
||||
uint32_t maxtasks;
|
||||
xce_job_alloc_t* allocs;
|
||||
xce_job_account_t* accounts;
|
||||
} xce_sched_job_t;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue