job submit and support run in worker

This commit is contained in:
Rongsong Shen 2025-11-28 17:24:31 +08:00
parent 3630e38a07
commit e497dd1b69
18 changed files with 502 additions and 236 deletions

View file

@ -5,6 +5,7 @@
#include "config.h"
#include <stdint.h>
#include <sys/resource.h>
#include <time.h>
#include "xlist.h"
@ -229,16 +230,16 @@ typedef struct {
} xce_launch_t;
typedef struct {
char* exechome;
char* execcwd;
char* execuser;
char* cmdline;
char* exdata;
char* launch_type;
char* q_pre_exec;
char* q_post_exec;
char* job_pre_exec;
char* job_post_exec;
char* exechome;
char* execcwd;
char* execuser;
char* cmdline;
char* exdata;
char* launch_type;
char* q_pre_exec;
char* q_post_exec;
char* job_pre_exec;
char* job_post_exec;
} job_startinfo_t;
typedef struct {
@ -284,15 +285,22 @@ typedef struct {
} xce_job_dispatch_t;
typedef struct {
char* queue;
char* user;
char* cmdline;
char* resreq;
char* exdata;
char* pre_exec;
char* post_exec;
uint32_t mintasks;
uint32_t maxtasks;
char* queue;
char* user;
uint32_t mintasks;
uint32_t maxtasks;
job_startinfo_t* start_info;
char* job_name;
char* project_name;
char* user_group;
char* job_description;
char* resreq;
} job_submit_data_t;
typedef struct {
uint64_t jobid;
uint64_t array_size;
job_submit_data_t* submit;
} xce_job_submit_t;
typedef struct {
@ -383,25 +391,14 @@ typedef struct {
typedef struct {
uint64_t jobid;
uint64_t array_base_id;
int array_idx;
char* queue;
char* user;
job_submit_data_t* submit;
int64_t idx;
time_t sub_time;
time_t queue_time;
time_t start_time;
time_t finish_time;
uint32_t mintasks;
uint32_t maxtasks;
job_pidinfo_t* pidinfo;
job_startinfo_t* start_info;
unsigned int state;
char* job_name;
char* project_name;
char* user_group;
char* job_description;
char* resreq;
xce_job_alloc_t* allocs;
int run_time;
xce_job_runusage_t* run_usage;