6060#include " msg_qmaster.h"
6161
6262#define ACTFILE_FPRINTF_FORMAT \
63- " %s%c%s%c%s%c%s%c%s%c" sge_u32 " %c%s%c" sge_u32 " %c" sge_u64 " %c" sge_u64 " %c" sge_u64 " %c" sge_u32 " %c" sge_u32 " %c" \
63+ " %s%c%s%c%s%c%s%c%s%c" sge_u32 " %c%s%c" sge_u32 " %c" sge_u64 " %c" sge_u64 " %c" sge_u64 " %c" sge_u32 " %c%d %c" \
6464sge_u32 " %c%f%c%f%c%f%c" sge_u32 " %c" sge_u32 " %c" sge_u32 " %c" sge_u32 " %c" sge_u32 " %c" sge_u32 " %c" sge_u32 " %c%f%c" \
6565sge_u32 " %c" sge_u32 " %c" sge_u32 " %c" sge_u32 " %c" sge_u32 " %c" sge_u32 " %c%s%c%s%c%s%c%d%c" sge_u32 " %c%f%c%f%c%f%c%s%c%f%c%s%c%f%c" sge_u32 " %c" sge_u64 " " \
6666" \n "
@@ -74,7 +74,7 @@ sge_u32 "%c" sge_u32 "%c" sge_u32 "%c" sge_u32 "%c" sge_u32 "%c" sge_u32 "%c%s%c
7474*
7575* SYNOPSIS
7676* static uint32_t
77- * reporting_get_ulong_usage(const lList *usage_list, lList *reported_list,
77+ * reporting_get_ulong_usage(const lList *usage_list, lList *reported_list,
7878* const char *name, const char *rname, uint32_t def)
7979*
8080* FUNCTION
@@ -84,10 +84,10 @@ sge_u32 "%c" sge_u32 "%c" sge_u32 "%c" sge_u32 "%c" sge_u32 "%c" sge_u32 "%c%s%c
8484* If no usage information is available for the given attribute, a default
8585* value will be returned.
8686*
87- * name and rname may differ, as already reported usage is taken from job
87+ * name and rname may differ, as already reported usage is taken from job
8888* online usage, e.g. attr USAGE_ATTR_CPU, whereas the final usage
8989* is reported in the attr USAGE_ATTR_CPU_ACCT. When we report final usage,
90- * we take the usage given by USAGE_ATTR_CPU_ACCT, but have to subtract
90+ * we take the usage given by USAGE_ATTR_CPU_ACCT, but have to subtract
9191* already reported usage coming from online usage USAGE_ATTR_CPU.
9292*
9393* INPUTS
@@ -102,7 +102,7 @@ sge_u32 "%c" sge_u32 "%c" sge_u32 "%c" sge_u32 "%c" sge_u32 "%c" sge_u32 "%c%s%c
102102* static uint32_t - the usage
103103*
104104* NOTES
105- * MT-NOTE: reporting_get_ulong_usage() is MT safe
105+ * MT-NOTE: reporting_get_ulong_usage() is MT safe
106106*
107107* SEE ALSO
108108* sgeobj/usage/usage_list_get_ulong_usage()
@@ -122,7 +122,7 @@ reporting_get_ulong_usage(const lList *usage_list, lList *reported_list,
122122 /* after this action, we'll have reported the total usage */
123123 usage_list_set_ulong_usage (reported_list, rname, usage);
124124
125- /* in this intermediate accounting record, we'll report the usage
125+ /* in this intermediate accounting record, we'll report the usage
126126 * consumed since the last intermediate accounting record.
127127 */
128128 usage -= reported;
@@ -152,10 +152,10 @@ reporting_get_ulong_usage(const lList *usage_list, lList *reported_list,
152152* If reported_usage is nullptr, no usage will be booked as already reported,
153153* e.g. for maximum values.
154154*
155- * name and rname may differ, as already reported usage is taken from job
155+ * name and rname may differ, as already reported usage is taken from job
156156* online usage, e.g. attr USAGE_ATTR_CPU, whereas the final usage
157157* is reported in the attr USAGE_ATTR_CPU_ACCT. When we report final usage,
158- * we take the usage given by USAGE_ATTR_CPU_ACCT, but have to subtract
158+ * we take the usage given by USAGE_ATTR_CPU_ACCT, but have to subtract
159159* already reported usage coming from online usage USAGE_ATTR_CPU.
160160*
161161* INPUTS
@@ -172,7 +172,7 @@ reporting_get_ulong_usage(const lList *usage_list, lList *reported_list,
172172* static uint32_t - the usage
173173*
174174* NOTES
175- * MT-NOTE: reporting_get_ulong_usage_sum() is MT safe
175+ * MT-NOTE: reporting_get_ulong_usage_sum() is MT safe
176176*
177177* SEE ALSO
178178* sge_rusage/reporting_get_ulong_usage()
@@ -208,8 +208,8 @@ reporting_get_ulong_usage_sum(const lList *usage_list, lList *reported_list, boo
208208*
209209* SYNOPSIS
210210* static double
211- * reporting_get_double_usage(const lList *usage_list, lList *reported_list,
212- * const char *name, const char *rname, double def)
211+ * reporting_get_double_usage(const lList *usage_list, lList *reported_list,
212+ * const char *name, const char *rname, double def)
213213*
214214* FUNCTION
215215* Return the usage information of a certain attribute (e.g. cpu, mem, ...).
@@ -218,10 +218,10 @@ reporting_get_ulong_usage_sum(const lList *usage_list, lList *reported_list, boo
218218* If no usage information is available for the given attribute, a default
219219* value will be returned.
220220*
221- * name and rname may differ, as already reported usage is taken from job
221+ * name and rname may differ, as already reported usage is taken from job
222222* online usage, e.g. attr USAGE_ATTR_CPU, whereas the final usage
223223* is reported in the attr USAGE_ATTR_CPU_ACCT. When we report final usage,
224- * we take the usage given by USAGE_ATTR_CPU_ACCT, but have to subtract
224+ * we take the usage given by USAGE_ATTR_CPU_ACCT, but have to subtract
225225* already reported usage coming from online usage USAGE_ATTR_CPU.
226226*
227227* INPUTS
@@ -236,7 +236,7 @@ reporting_get_ulong_usage_sum(const lList *usage_list, lList *reported_list, boo
236236* static double - the usage
237237*
238238* NOTES
239- * MT-NOTE: reporting_get_double_usage() is MT safe
239+ * MT-NOTE: reporting_get_double_usage() is MT safe
240240*
241241* SEE ALSO
242242* sgeobj/usage/usage_list_get_double_usage()
@@ -256,7 +256,7 @@ reporting_get_double_usage(const lList *usage_list, lList *reported_list, const
256256 /* after this action, we'll have reported the total usage */
257257 usage_list_set_double_usage (reported_list, rname, usage);
258258
259- /* in this intermediate accounting record, we'll report the usage
259+ /* in this intermediate accounting record, we'll report the usage
260260 * consumed since the last intermediate accounting record.
261261 */
262262 usage -= reported;
@@ -286,10 +286,10 @@ reporting_get_double_usage(const lList *usage_list, lList *reported_list, const
286286* If reported_usage is nullptr, no usage will be booked as already reported,
287287* e.g. for maximum values.
288288*
289- * name and rname may differ, as already reported usage is taken from job
289+ * name and rname may differ, as already reported usage is taken from job
290290* online usage, e.g. attr USAGE_ATTR_CPU, whereas the final usage
291291* is reported in the attr USAGE_ATTR_CPU_ACCT. When we report final usage,
292- * we take the usage given by USAGE_ATTR_CPU_ACCT, but have to subtract
292+ * we take the usage given by USAGE_ATTR_CPU_ACCT, but have to subtract
293293* already reported usage coming from online usage USAGE_ATTR_CPU.
294294*
295295* INPUTS
@@ -306,7 +306,7 @@ reporting_get_double_usage(const lList *usage_list, lList *reported_list, const
306306* static double - the usage
307307*
308308* NOTES
309- * MT-NOTE: reporting_get_double_usage_sum() is MT safe
309+ * MT-NOTE: reporting_get_double_usage_sum() is MT safe
310310*
311311* SEE ALSO
312312* sge_rusage/reporting_get_double_usage()
@@ -374,7 +374,7 @@ sge_write_rusage(dstring *buffer, rapidjson::Writer<rapidjson::StringBuffer> *wr
374374 uint64_t now = sge_get_gmt64 ();
375375 uint32_t ar_id = 0 ;
376376 lListElem *ar = nullptr ;
377- uint32_t exit_status = 0 ;
377+ int exit_status = 0 ;
378378 bool do_accounting_summary = false ;
379379 const lList *master_pe_list = *ocs::DataStore::get_master_list (SGE_TYPE_PE);
380380 const lList *master_ar_list = *ocs::DataStore::get_master_list (SGE_TYPE_AR);
@@ -389,7 +389,7 @@ sge_write_rusage(dstring *buffer, rapidjson::Writer<rapidjson::StringBuffer> *wr
389389 DRETURN (false );
390390 }
391391
392- /*
392+ /*
393393 * Figure out if it is a parallel job,
394394 * and if we shall write individual accounting entries or a summary.
395395 */
@@ -429,7 +429,7 @@ sge_write_rusage(dstring *buffer, rapidjson::Writer<rapidjson::StringBuffer> *wr
429429 }
430430
431431 /*
432- * For intermediate records, we store the reported usage in
432+ * For intermediate records, we store the reported usage in
433433 * ja_task or pe_task reported_list.
434434 */
435435 if (intermediate) {
@@ -439,7 +439,7 @@ sge_write_rusage(dstring *buffer, rapidjson::Writer<rapidjson::StringBuffer> *wr
439439 reported_list = lGetOrCreateList (ja_task, JAT_reported_usage_list, " reported_usage" , UA_Type);
440440 }
441441
442- /*
442+ /*
443443 * The LAST_INTERMEDIATE timestamp of the previous intermediate
444444 * record is the start_time of the current interval.
445445 */
@@ -470,13 +470,13 @@ sge_write_rusage(dstring *buffer, rapidjson::Writer<rapidjson::StringBuffer> *wr
470470
471471 if (intermediate) {
472472 /*
473- * for the job, we don't have the submission time in the job report
474- * before job exit
473+ * for the job, we don't have the submission time in the job report
474+ * before job exit
475475 */
476476 if (job != nullptr && pe_task == nullptr ) {
477477 submission_time = lGetUlong64 (job, JB_submission_time);
478478 }
479- /*
479+ /*
480480 * For the first intermediate record, the start_time is the ja_task start time.
481481 * For consequent intermediate records, we already set the start_time to the
482482 * previous intermediate record's end time.
@@ -500,10 +500,10 @@ sge_write_rusage(dstring *buffer, rapidjson::Writer<rapidjson::StringBuffer> *wr
500500 * In this case set exit_status to -1, meaning in ARCo: Job still running.
501501 * See CR 6621482.
502502 */
503- exit_status = usage_list_get_ulong_usage (usage_list, " exit_status" , -1 );
503+ exit_status = usage_list_get_int_usage (usage_list, " exit_status" , -1 );
504504 } else {
505505 start_time = usage_list_get_ulong64_usage (usage_list, " start_time" , 0 );
506- exit_status = usage_list_get_ulong_usage (usage_list, " exit_status" , 0 );
506+ exit_status = usage_list_get_int_usage (usage_list, " exit_status" , 0 );
507507 }
508508
509509 ar_id = lGetUlong (job, JB_ar);
0 commit comments