syntax = "proto3"; package hpcAC; option go_package = "/hpcAC"; /******************Job Start*************************/ message job{ string job_id = 1; // @gotags: copier:"JobId" string job_name = 2; // @gotags: copier:"Name" string job_status = 3; // @gotags: copier:"JobState" string queue = 4; // @gotags: copier:"Partition" string user = 5; // @gotags: copier:"UserId" string node_used = 6; // @gotags: copier:"ExcNodes" int32 proc_num_used = 7; // @gotags: copier:"NumCpus" string job_start_time = 8; // @gotags: copier:"StartTime" string job_run_time = 9; // @gotags: copier:"JobRunTime" string job_manager_id = 10; // @gotags: copier:"JobmanagerId" string job_manager_name = 11; // @gotags: copier:"JobmanagerName" string job_manager_type = 12; // @gotags: copier:"JobmanagerType" string error_path = 13; // @gotags: copier:"ErrorPath" string output_path = 14; // @gotags: copier:"OutputPath" string work_dir = 15; // @gotags: copier:"WorkDir" string reason = 16; // @gotags: copier:"Reason" string app_type = 17; // @gotags: copier:"AppType" } message ListJobReq{ } message ListJobResp{ uint32 code = 1; // @gotags: copier:"Code" string msg = 2; // @gotags: copier:"Msg" uint32 record_count = 3; // @gotags: copier:"RecordCount" repeated job jobs = 4; // @gotags: copier:"Jobs" } /******************Job End*************************/ /******************History Job Start*************************/ message historyJob{ string acct_time = 1; // @gotags: copier:"AcctTime" string app_type = 2; // @gotags: copier:"AppType" string job_end_time = 3; // @gotags: copier:"End" string job_exec_host = 4; // @gotags: copier:"Nodes" int32 job_exit_status = 5; // @gotags: copier:"ExitCode" int64 job_id = 6; // @gotags: copier:"JobId" string job_name = 7; // @gotags: copier:"JobName" string job_queue_time = 8; // @gotags: copier:"JobQueueTime" string job_start_time = 9; // @gotags: copier:"Start" string job_state = 10; // @gotags: copier:"State" string job_walltime_used = 11; // @gotags: copier:"JobWalltimeUsed" int64 job_manager_id = 12; // @gotags: copier:"JobManagerId" int32 node_ct = 13; // @gotags: copier:"AllocNodes" string queue = 14; // @gotags: copier:"Partition" string user_name = 15; // @gotags: copier:"User" string workdir = 16; // @gotags: copier:"WorkDir" } message ListHistoryJobReq{ string startTime = 1;// @gotags: copier:"StartTime" string endTime = 2;// @gotags: copier:"EndTime" string timeType = 3;// @gotags: copier:"TimeType" int32 start = 4;// @gotags: copier:"Start" int32 limit = 5;// @gotags: copier:"Limit" int32 isQueryByQueueTime = 6;// @gotags: copier:"IsQueryByQueueTime" } message ListHistoryJobResp{ uint32 code = 1; // @gotags: copier:"Code" string msg = 2; // @gotags: copier:"Msg" uint32 record_count = 3; // @gotags: copier:"RecordCount" repeated historyJob history_jobs = 4; // @gotags: copier:"HistoryJobs" } /******************History Job End*************************/ /******************Job(Submit) Start*************************/ message SubmitJobReq{ string apptype = 1; // @gotags: copier:"Apptype" string appname = 2; // @gotags: copier:"Appname" int64 strJobManagerID = 3; // @gotags: copier:"StrJobManagerID" MapAppJobInfo mapAppJobInfo = 4; // @gotags: copier:"MapAppJobInfo" } message SubmitJobResp{ string Code = 1; // @gotags: copier:"Code" string Msg = 2; // @gotags: copier:"Msg" string Data = 3; // @gotags: copier:"Data" } message MapAppJobInfo{ string GAP_CMD_FILE = 1; // @gotags: copier:"GAP_CMD_FILE" //命令行内容 string GAP_NNODE = 2; // @gotags: copier:"GAP_NNODE" //节点个数(当指定该参数时,GAP_NODE_STRING必须为"") string GAP_NODE_STRING = 3; // @gotags: copier:"GAP_NODE_STRING" //指定节点(当指定该参数时,GAP_NNODE必须为"") string GAP_SUBMIT_TYPE = 4; // @gotags: copier:"GAP_SUBMIT_TYPE" //cmd(命令行模式) string GAP_JOB_NAME = 5; // @gotags: copier:"GAP_JOB_NAME" //作业名称 string GAP_WORK_DIR = 6; // @gotags: copier:"GAP_WORK_DIR" //工作路径 string GAP_QUEUE = 7; // @gotags: copier:"GAP_QUEUE" //队列名称 string GAP_NPROC = 8; // @gotags: copier:"GAP_NPROC" //总核心数(GAP_NPROC和GAP_PPN选其一填写) string GAP_PPN = 9; // @gotags: copier:"GAP_PPN" //CPU核心/节点(GAP_NPROC和GAP_PPN选其一填写) string GAP_NGPU = 10; // @gotags: copier:"GAP_NGPU" //GPU卡数/节点 string GAP_NDCU = 11; // @gotags: copier:"GAP_NDCU" //DCU卡数/节点 string GAP_JOB_MEM = 12; // @gotags: copier:"GAP_JOB_MEM" //每个节点内存值,单位为MB/GB string GAP_WALL_TIME = 13; // @gotags: copier:"GAP_WALL_TIME" //最大运行时长(HH:MM:ss) string GAP_EXCLUSIVE = 14; // @gotags: copier:"GAP_EXCLUSIVE" // 是否独占节点,1为独占,空为非独占 string GAP_APPNAME = 15; // @gotags: copier:"GAP_APPNAME" //BASE(基础应用),支持填写具体的应用英文名称 string GAP_MULTI_SUB = 16; // @gotags: copier:"GAP_MULTI_SUB" //作业组长度,建议为小于等于50的正整数 string GAP_STD_OUT_FILE = 17; // @gotags: copier:"GAP_STD_OUT_FILE" //工作路径/std.out.%j string GAP_STD_ERR_FILE = 18; // @gotags: copier:"GAP_STD_ERR_FILE" //工作路径/std.err.%j } /******************Job(Submit) End*************************/ // HPC Services for AC service hpcAC { //ListJob list all jobs rpc ListJob(ListJobReq) returns (ListJobResp); //ListHistoryJob list all history jobs rpc ListHistoryJob(ListHistoryJobReq) returns (ListHistoryJobResp); //Submit job rpc SubmitJob(SubmitJobReq) returns (SubmitJobResp); }