Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make memory types in acct_gather uint64_t to handle systems with more…

… than

4TB of memory on them.
  • Loading branch information...
commit 98988535b646062b34c6aba81ea21db9be7a37fe 1 parent 0500ea4
@dannyauble dannyauble authored
View
2  NEWS
@@ -29,6 +29,8 @@ documents those changes that are of interest to users and admins.
work for now).
-- Add SchedulerParameters options of preempt_reorder_count and
preempt_strict_order.
+ -- Make memory types in acct_gather uint64_t to handle systems with more than
+ 4TB of memory on them.
* Changes in Slurm 14.03.0pre6
==============================
View
12 slurm/slurm.h.in
@@ -471,15 +471,15 @@ enum jobacct_data_type {
JOBACCT_DATA_PIPE, /* data-> file descriptor */
JOBACCT_DATA_RUSAGE, /* data-> rusage set user_cpu_sec,
* user_cpu_usec, sys_cpu_sec, sys_cpu_usec */
- JOBACCT_DATA_MAX_VSIZE, /* data-> uint32_t vsize */
+ JOBACCT_DATA_MAX_VSIZE, /* data-> uint64_t vsize */
JOBACCT_DATA_MAX_VSIZE_ID, /* data-> jobacct_id_t vsize */
- JOBACCT_DATA_TOT_VSIZE, /* data-> uint32_t vsize */
- JOBACCT_DATA_MAX_RSS, /* data-> uint32_t psize */
+ JOBACCT_DATA_TOT_VSIZE, /* data-> uint64_t vsize */
+ JOBACCT_DATA_MAX_RSS, /* data-> uint64_t psize */
JOBACCT_DATA_MAX_RSS_ID, /* data-> jobacct_id_t psize */
- JOBACCT_DATA_TOT_RSS, /* data-> uint32_t psize */
- JOBACCT_DATA_MAX_PAGES, /* data-> uint32_t psize */
+ JOBACCT_DATA_TOT_RSS, /* data-> uint64_t psize */
+ JOBACCT_DATA_MAX_PAGES, /* data-> uint64_t psize */
JOBACCT_DATA_MAX_PAGES_ID, /* data-> jobacct_id_t psize */
- JOBACCT_DATA_TOT_PAGES, /* data-> uint32_t psize */
+ JOBACCT_DATA_TOT_PAGES, /* data-> uint64_t psize */
JOBACCT_DATA_MIN_CPU, /* data-> uint32_t psize */
JOBACCT_DATA_MIN_CPU_ID, /* data-> jobacct_id_t psize */
JOBACCT_DATA_TOT_CPU, /* data-> uint32_t psize */
View
6 slurm/slurmdb.h
@@ -324,15 +324,15 @@ typedef struct {
uint32_t disk_write_max_nodeid; /* contains node number max was on */
uint32_t disk_write_max_taskid;/* contains task number max was on */
double pages_ave;
- uint32_t pages_max;
+ uint64_t pages_max;
uint32_t pages_max_nodeid; /* contains which node number it was on */
uint32_t pages_max_taskid; /* contains which task number it was on */
double rss_ave;
- uint32_t rss_max;
+ uint64_t rss_max;
uint32_t rss_max_nodeid; /* contains which node number it was on */
uint32_t rss_max_taskid; /* contains which task number it was on */
double vsize_ave;
- uint32_t vsize_max;
+ uint64_t vsize_max;
uint32_t vsize_max_nodeid; /* contains which node number it was on */
uint32_t vsize_max_taskid; /* contains which task number it was on */
} slurmdb_stats_t;
View
101 src/common/slurm_jobacct_gather.c
@@ -115,8 +115,8 @@ static bool plugin_polling = true;
static uint32_t jobacct_job_id = 0;
static uint32_t jobacct_step_id = 0;
-static uint32_t jobacct_mem_limit = 0;
-static uint32_t jobacct_vmem_limit = 0;
+static uint64_t jobacct_mem_limit = 0;
+static uint64_t jobacct_vmem_limit = 0;
/* _acct_kill_step() issue RPC to kill a slurm job step */
static void _acct_kill_step(void)
@@ -542,17 +542,18 @@ extern int jobacct_gather_set_mem_limit(uint32_t job_id, uint32_t step_id,
}
extern void jobacct_gather_handle_mem_limit(
- uint32_t total_job_mem, uint32_t total_job_vsize)
+ uint64_t total_job_mem, uint64_t total_job_vsize)
{
if (!plugin_polling)
return;
if (jobacct_mem_limit) {
if (jobacct_step_id == NO_VAL) {
- debug("Job %u memory used:%u limit:%u KB",
+ debug("Job %u memory used:%"PRIu64" limit:%"PRIu64" KB",
jobacct_job_id, total_job_mem, jobacct_mem_limit);
} else {
- debug("Step %u.%u memory used:%u limit:%u KB",
+ debug("Step %u.%u memory used:%"PRIu64" "
+ "limit:%"PRIu64" KB",
jobacct_job_id, jobacct_step_id,
total_job_mem, jobacct_mem_limit);
}
@@ -560,11 +561,13 @@ extern void jobacct_gather_handle_mem_limit(
if (jobacct_job_id && jobacct_mem_limit &&
(total_job_mem > jobacct_mem_limit)) {
if (jobacct_step_id == NO_VAL) {
- error("Job %u exceeded memory limit (%u > %u), being "
+ error("Job %u exceeded memory limit "
+ "(%"PRIu64" > %"PRIu64"), being "
"killed", jobacct_job_id, total_job_mem,
jobacct_mem_limit);
} else {
- error("Step %u.%u exceeded memory limit (%u > %u), "
+ error("Step %u.%u exceeded memory limit "
+ "(%"PRIu64" > %"PRIu64"), "
"being killed", jobacct_job_id, jobacct_step_id,
total_job_mem, jobacct_mem_limit);
}
@@ -573,11 +576,13 @@ extern void jobacct_gather_handle_mem_limit(
(total_job_vsize > jobacct_vmem_limit)) {
if (jobacct_step_id == NO_VAL) {
error("Job %u exceeded virtual memory limit "
- "(%u > %u), being killed", jobacct_job_id,
+ "(%"PRIu64" > %"PRIu64"), being killed",
+ jobacct_job_id,
total_job_vsize, jobacct_vmem_limit);
} else {
error("Step %u.%u exceeded virtual memory limit "
- "(%u > %u), being killed", jobacct_job_id,
+ "(%"PRIu64" > %"PRIu64"), being killed",
+ jobacct_job_id,
jobacct_step_id, total_job_vsize,
jobacct_vmem_limit);
}
@@ -646,6 +651,7 @@ extern int jobacctinfo_setinfo(jobacctinfo_t *jobacct,
int *fd = (int *)data;
struct rusage *rusage = (struct rusage *)data;
uint32_t *uint32 = (uint32_t *) data;
+ uint64_t *uint64 = (uint64_t *) data;
double *dub = (double *) data;
jobacct_id_t *jobacct_id = (jobacct_id_t *) data;
struct jobacctinfo *send = (struct jobacctinfo *) data;
@@ -750,31 +756,31 @@ extern int jobacctinfo_setinfo(jobacctinfo_t *jobacct,
jobacct->sys_cpu_usec = rusage->ru_stime.tv_usec;
break;
case JOBACCT_DATA_MAX_RSS:
- jobacct->max_rss = *uint32;
+ jobacct->max_rss = *uint64;
break;
case JOBACCT_DATA_MAX_RSS_ID:
jobacct->max_rss_id = *jobacct_id;
break;
case JOBACCT_DATA_TOT_RSS:
- jobacct->tot_rss = *uint32;
+ jobacct->tot_rss = *uint64;
break;
case JOBACCT_DATA_MAX_VSIZE:
- jobacct->max_vsize = *uint32;
+ jobacct->max_vsize = *uint64;
break;
case JOBACCT_DATA_MAX_VSIZE_ID:
jobacct->max_vsize_id = *jobacct_id;
break;
case JOBACCT_DATA_TOT_VSIZE:
- jobacct->tot_vsize = *uint32;
+ jobacct->tot_vsize = *uint64;
break;
case JOBACCT_DATA_MAX_PAGES:
- jobacct->max_pages = *uint32;
+ jobacct->max_pages = *uint64;
break;
case JOBACCT_DATA_MAX_PAGES_ID:
jobacct->max_pages_id = *jobacct_id;
break;
case JOBACCT_DATA_TOT_PAGES:
- jobacct->tot_pages = *uint32;
+ jobacct->tot_pages = *uint64;
break;
case JOBACCT_DATA_MIN_CPU:
jobacct->min_cpu = *uint32;
@@ -825,6 +831,7 @@ extern int jobacctinfo_getinfo(
int rc = SLURM_SUCCESS;
int *fd = (int *)data;
uint32_t *uint32 = (uint32_t *) data;
+ uint64_t *uint64 = (uint64_t *) data;
double *dub = (double *) data;
jobacct_id_t *jobacct_id = (jobacct_id_t *) data;
struct rusage *rusage = (struct rusage *)data;
@@ -931,31 +938,31 @@ extern int jobacctinfo_getinfo(
rusage->ru_stime.tv_usec = jobacct->sys_cpu_usec;
break;
case JOBACCT_DATA_MAX_RSS:
- *uint32 = jobacct->max_rss;
+ *uint64 = jobacct->max_rss;
break;
case JOBACCT_DATA_MAX_RSS_ID:
*jobacct_id = jobacct->max_rss_id;
break;
case JOBACCT_DATA_TOT_RSS:
- *uint32 = jobacct->tot_rss;
+ *uint64 = jobacct->tot_rss;
break;
case JOBACCT_DATA_MAX_VSIZE:
- *uint32 = jobacct->max_vsize;
+ *uint64 = jobacct->max_vsize;
break;
case JOBACCT_DATA_MAX_VSIZE_ID:
*jobacct_id = jobacct->max_vsize_id;
break;
case JOBACCT_DATA_TOT_VSIZE:
- *uint32 = jobacct->tot_vsize;
+ *uint64 = jobacct->tot_vsize;
break;
case JOBACCT_DATA_MAX_PAGES:
- *uint32 = jobacct->max_pages;
+ *uint64 = jobacct->max_pages;
break;
case JOBACCT_DATA_MAX_PAGES_ID:
*jobacct_id = jobacct->max_pages_id;
break;
case JOBACCT_DATA_TOT_PAGES:
- *uint32 = jobacct->tot_pages;
+ *uint64 = jobacct->tot_pages;
break;
case JOBACCT_DATA_MIN_CPU:
*uint32 = jobacct->min_cpu;
@@ -1027,7 +1034,9 @@ extern void jobacctinfo_pack(jobacctinfo_t *jobacct,
}
pack8((uint8_t) 1, buffer);
if (!jobacct) {
- for (i = 0; i < 14; i++)
+ for (i = 0; i < 6; i++)
+ pack64(0, buffer);
+ for (i = 0; i < 8; i++)
pack32((uint32_t) 0, buffer);
for (i = 0; i < 4; i++)
packdouble((double) 0, buffer);
@@ -1040,12 +1049,12 @@ extern void jobacctinfo_pack(jobacctinfo_t *jobacct,
pack32((uint32_t)jobacct->user_cpu_usec, buffer);
pack32((uint32_t)jobacct->sys_cpu_sec, buffer);
pack32((uint32_t)jobacct->sys_cpu_usec, buffer);
- pack32((uint32_t)jobacct->max_vsize, buffer);
- pack32((uint32_t)jobacct->tot_vsize, buffer);
- pack32((uint32_t)jobacct->max_rss, buffer);
- pack32((uint32_t)jobacct->tot_rss, buffer);
- pack32((uint32_t)jobacct->max_pages, buffer);
- pack32((uint32_t)jobacct->tot_pages, buffer);
+ pack64(jobacct->max_vsize, buffer);
+ pack64(jobacct->tot_vsize, buffer);
+ pack64(jobacct->max_rss, buffer);
+ pack64(jobacct->tot_rss, buffer);
+ pack64(jobacct->max_pages, buffer);
+ pack64(jobacct->tot_pages, buffer);
pack32((uint32_t)jobacct->min_cpu, buffer);
pack32((uint32_t)jobacct->tot_cpu, buffer);
pack32((uint32_t)jobacct->act_cpufreq, buffer);
@@ -1179,12 +1188,12 @@ extern int jobacctinfo_unpack(jobacctinfo_t **jobacct,
(*jobacct)->sys_cpu_sec = uint32_tmp;
safe_unpack32(&uint32_tmp, buffer);
(*jobacct)->sys_cpu_usec = uint32_tmp;
- safe_unpack32(&(*jobacct)->max_vsize, buffer);
- safe_unpack32(&(*jobacct)->tot_vsize, buffer);
- safe_unpack32(&(*jobacct)->max_rss, buffer);
- safe_unpack32(&(*jobacct)->tot_rss, buffer);
- safe_unpack32(&(*jobacct)->max_pages, buffer);
- safe_unpack32(&(*jobacct)->tot_pages, buffer);
+ safe_unpack64(&(*jobacct)->max_vsize, buffer);
+ safe_unpack64(&(*jobacct)->tot_vsize, buffer);
+ safe_unpack64(&(*jobacct)->max_rss, buffer);
+ safe_unpack64(&(*jobacct)->tot_rss, buffer);
+ safe_unpack64(&(*jobacct)->max_pages, buffer);
+ safe_unpack64(&(*jobacct)->tot_pages, buffer);
safe_unpack32(&(*jobacct)->min_cpu, buffer);
safe_unpack32(&(*jobacct)->tot_cpu, buffer);
safe_unpack32(&(*jobacct)->act_cpufreq, buffer);
@@ -1226,12 +1235,12 @@ extern int jobacctinfo_unpack(jobacctinfo_t **jobacct,
(*jobacct)->sys_cpu_sec = uint32_tmp;
safe_unpack32(&uint32_tmp, buffer);
(*jobacct)->sys_cpu_usec = uint32_tmp;
- safe_unpack32(&(*jobacct)->max_vsize, buffer);
- safe_unpack32(&(*jobacct)->tot_vsize, buffer);
- safe_unpack32(&(*jobacct)->max_rss, buffer);
- safe_unpack32(&(*jobacct)->tot_rss, buffer);
- safe_unpack32(&(*jobacct)->max_pages, buffer);
- safe_unpack32(&(*jobacct)->tot_pages, buffer);
+ safe_unpack32((uint32_t *)&(*jobacct)->max_vsize, buffer);
+ safe_unpack32((uint32_t *)&(*jobacct)->tot_vsize, buffer);
+ safe_unpack32((uint32_t *)&(*jobacct)->max_rss, buffer);
+ safe_unpack32((uint32_t *)&(*jobacct)->tot_rss, buffer);
+ safe_unpack32((uint32_t *)&(*jobacct)->max_pages, buffer);
+ safe_unpack32((uint32_t *)&(*jobacct)->tot_pages, buffer);
safe_unpack32(&(*jobacct)->min_cpu, buffer);
safe_unpack32(&(*jobacct)->tot_cpu, buffer);
safe_unpack32(&(*jobacct)->act_cpufreq, buffer);
@@ -1273,12 +1282,12 @@ extern int jobacctinfo_unpack(jobacctinfo_t **jobacct,
(*jobacct)->sys_cpu_sec = uint32_tmp;
safe_unpack32(&uint32_tmp, buffer);
(*jobacct)->sys_cpu_usec = uint32_tmp;
- safe_unpack32(&(*jobacct)->max_vsize, buffer);
- safe_unpack32(&(*jobacct)->tot_vsize, buffer);
- safe_unpack32(&(*jobacct)->max_rss, buffer);
- safe_unpack32(&(*jobacct)->tot_rss, buffer);
- safe_unpack32(&(*jobacct)->max_pages, buffer);
- safe_unpack32(&(*jobacct)->tot_pages, buffer);
+ safe_unpack32((uint32_t *)&(*jobacct)->max_vsize, buffer);
+ safe_unpack32((uint32_t *)&(*jobacct)->tot_vsize, buffer);
+ safe_unpack32((uint32_t *)&(*jobacct)->max_rss, buffer);
+ safe_unpack32((uint32_t *)&(*jobacct)->tot_rss, buffer);
+ safe_unpack32((uint32_t *)&(*jobacct)->max_pages, buffer);
+ safe_unpack32((uint32_t *)&(*jobacct)->tot_pages, buffer);
safe_unpack32(&(*jobacct)->min_cpu, buffer);
safe_unpack32(&(*jobacct)->tot_cpu, buffer);
safe_unpack32(&(*jobacct)->act_cpufreq, buffer);
View
14 src/common/slurm_jobacct_gather.h
@@ -101,17 +101,17 @@ struct jobacctinfo {
uint32_t sys_cpu_usec;
uint32_t user_cpu_sec;
uint32_t user_cpu_usec;
- uint32_t max_vsize; /* max size of virtual memory */
+ uint64_t max_vsize; /* max size of virtual memory */
jobacct_id_t max_vsize_id; /* contains which task number it was on */
- uint32_t tot_vsize; /* total virtual memory
+ uint64_t tot_vsize; /* total virtual memory
(used to figure out ave later) */
- uint32_t max_rss; /* max Resident Set Size */
+ uint64_t max_rss; /* max Resident Set Size */
jobacct_id_t max_rss_id; /* contains which task it was on */
- uint32_t tot_rss; /* total rss
+ uint64_t tot_rss; /* total rss
(used to figure out ave later) */
- uint32_t max_pages; /* max pages */
+ uint64_t max_pages; /* max pages */
jobacct_id_t max_pages_id; /* contains which task it was on */
- uint32_t tot_pages; /* total pages
+ uint64_t tot_pages; /* total pages
(used to figure out ave later) */
uint32_t min_cpu; /* min cpu time */
jobacct_id_t min_cpu_id; /* contains which task it was on */
@@ -155,7 +155,7 @@ extern int jobacct_gather_set_proctrack_container_id(uint64_t id);
extern int jobacct_gather_set_mem_limit(uint32_t job_id, uint32_t step_id,
uint32_t mem_limit);
extern void jobacct_gather_handle_mem_limit(
- uint32_t total_job_mem, uint32_t total_job_vsize);
+ uint64_t total_job_mem, uint64_t total_job_vsize);
extern jobacctinfo_t *jobacctinfo_create(jobacct_id_t *jobacct_id);
extern void jobacctinfo_destroy(void *object);
View
113 src/common/slurmdb_pack.c
@@ -48,7 +48,51 @@ static void _pack_slurmdb_stats(slurmdb_stats_t *stats,
{
int i=0;
- if (rpc_version >= SLURMDBD_2_6_VERSION) {
+ if (rpc_version >= SLURM_14_03_PROTOCOL_VERSION) {
+ if (!stats) {
+ for (i=0; i<3; i++)
+ pack64(0, buffer);
+
+ pack32(0, buffer);
+
+ for (i=0; i<10; i++)
+ packdouble(0, buffer);
+
+ for (i=0; i<12; i++) {
+ pack32(0, buffer);
+ }
+ return;
+ }
+
+ pack64(stats->vsize_max, buffer);
+ pack64(stats->rss_max, buffer);
+ pack64(stats->pages_max, buffer);
+ pack32(stats->cpu_min, buffer);
+
+ packdouble(stats->vsize_ave, buffer);
+ packdouble(stats->rss_ave, buffer);
+ packdouble(stats->pages_ave, buffer);
+ packdouble(stats->cpu_ave, buffer);
+ packdouble(stats->act_cpufreq, buffer);
+ packdouble(stats->consumed_energy, buffer);
+ packdouble(stats->disk_read_max, buffer);
+ packdouble(stats->disk_read_ave, buffer);
+ packdouble(stats->disk_write_max, buffer);
+ packdouble(stats->disk_write_ave, buffer);
+
+ pack32(stats->vsize_max_nodeid, buffer);
+ pack32(stats->vsize_max_taskid, buffer);
+ pack32(stats->rss_max_nodeid, buffer);
+ pack32(stats->rss_max_taskid, buffer);
+ pack32(stats->pages_max_nodeid, buffer);
+ pack32(stats->pages_max_taskid, buffer);
+ pack32(stats->cpu_min_nodeid, buffer);
+ pack32(stats->cpu_min_taskid, buffer);
+ pack32(stats->disk_read_max_nodeid, buffer);
+ pack32(stats->disk_read_max_taskid, buffer);
+ pack32(stats->disk_write_max_nodeid, buffer);
+ pack32(stats->disk_write_max_taskid, buffer);
+ } else if (rpc_version >= SLURMDBD_2_6_VERSION) {
if (!stats) {
for (i=0; i<4; i++)
pack32((uint32_t) 0, buffer);
@@ -62,9 +106,9 @@ static void _pack_slurmdb_stats(slurmdb_stats_t *stats,
return;
}
- pack32(stats->vsize_max, buffer);
- pack32(stats->rss_max, buffer);
- pack32(stats->pages_max, buffer);
+ pack32((uint32_t)stats->vsize_max, buffer);
+ pack32((uint32_t)stats->rss_max, buffer);
+ pack32((uint32_t)stats->pages_max, buffer);
pack32(stats->cpu_min, buffer);
packdouble(stats->vsize_ave, buffer);
@@ -105,9 +149,9 @@ static void _pack_slurmdb_stats(slurmdb_stats_t *stats,
return;
}
- pack32(stats->vsize_max, buffer);
- pack32(stats->rss_max, buffer);
- pack32(stats->pages_max, buffer);
+ pack32((uint32_t)stats->vsize_max, buffer);
+ pack32((uint32_t)stats->rss_max, buffer);
+ pack32((uint32_t)stats->pages_max, buffer);
pack32(stats->cpu_min, buffer);
packdouble(stats->vsize_ave, buffer);
@@ -140,9 +184,9 @@ static void _pack_slurmdb_stats(slurmdb_stats_t *stats,
return;
}
- pack32(stats->vsize_max, buffer);
- pack32(stats->rss_max, buffer);
- pack32(stats->pages_max, buffer);
+ pack32((uint32_t)stats->vsize_max, buffer);
+ pack32((uint32_t)stats->rss_max, buffer);
+ pack32((uint32_t)stats->pages_max, buffer);
pack32(stats->cpu_min, buffer);
packdouble(stats->vsize_ave, buffer);
@@ -166,10 +210,39 @@ static int _unpack_slurmdb_stats(slurmdb_stats_t *stats,
{
uint16_t tmp_uint16;
- if (rpc_version >= SLURMDBD_2_6_VERSION) {
- safe_unpack32(&stats->vsize_max, buffer);
- safe_unpack32(&stats->rss_max, buffer);
- safe_unpack32(&stats->pages_max, buffer);
+ if (rpc_version >= SLURM_14_03_PROTOCOL_VERSION) {
+ safe_unpack64(&stats->vsize_max, buffer);
+ safe_unpack64(&stats->rss_max, buffer);
+ safe_unpack64(&stats->pages_max, buffer);
+ safe_unpack32(&stats->cpu_min, buffer);
+
+ safe_unpackdouble(&stats->vsize_ave, buffer);
+ safe_unpackdouble(&stats->rss_ave, buffer);
+ safe_unpackdouble(&stats->pages_ave, buffer);
+ safe_unpackdouble(&stats->cpu_ave, buffer);
+ safe_unpackdouble(&stats->act_cpufreq, buffer);
+ safe_unpackdouble(&stats->consumed_energy, buffer);
+ safe_unpackdouble(&stats->disk_read_max, buffer);
+ safe_unpackdouble(&stats->disk_read_ave, buffer);
+ safe_unpackdouble(&stats->disk_write_max, buffer);
+ safe_unpackdouble(&stats->disk_write_ave, buffer);
+
+ safe_unpack32(&stats->vsize_max_nodeid, buffer);
+ safe_unpack32(&stats->vsize_max_taskid, buffer);
+ safe_unpack32(&stats->rss_max_nodeid, buffer);
+ safe_unpack32(&stats->rss_max_taskid, buffer);
+ safe_unpack32(&stats->pages_max_nodeid, buffer);
+ safe_unpack32(&stats->pages_max_taskid, buffer);
+ safe_unpack32(&stats->cpu_min_nodeid, buffer);
+ safe_unpack32(&stats->cpu_min_taskid, buffer);
+ safe_unpack32(&stats->disk_read_max_nodeid, buffer);
+ safe_unpack32(&stats->disk_read_max_taskid, buffer);
+ safe_unpack32(&stats->disk_write_max_nodeid, buffer);
+ safe_unpack32(&stats->disk_write_max_taskid, buffer);
+ } else if (rpc_version >= SLURMDBD_2_6_VERSION) {
+ safe_unpack32((uint32_t *)&stats->vsize_max, buffer);
+ safe_unpack32((uint32_t *)&stats->rss_max, buffer);
+ safe_unpack32((uint32_t *)&stats->pages_max, buffer);
safe_unpack32(&stats->cpu_min, buffer);
safe_unpackdouble(&stats->vsize_ave, buffer);
@@ -196,9 +269,9 @@ static int _unpack_slurmdb_stats(slurmdb_stats_t *stats,
safe_unpack32(&stats->disk_write_max_nodeid, buffer);
safe_unpack32(&stats->disk_write_max_taskid, buffer);
} else if (rpc_version >= SLURMDBD_2_5_VERSION) {
- safe_unpack32(&stats->vsize_max, buffer);
- safe_unpack32(&stats->rss_max, buffer);
- safe_unpack32(&stats->pages_max, buffer);
+ safe_unpack32((uint32_t *)&stats->vsize_max, buffer);
+ safe_unpack32((uint32_t *)&stats->rss_max, buffer);
+ safe_unpack32((uint32_t *)&stats->pages_max, buffer);
safe_unpack32(&stats->cpu_min, buffer);
safe_unpackdouble(&stats->vsize_ave, buffer);
@@ -221,9 +294,9 @@ static int _unpack_slurmdb_stats(slurmdb_stats_t *stats,
safe_unpack16(&tmp_uint16, buffer);
stats->cpu_min_taskid = tmp_uint16;
} else if (rpc_version >= SLURMDBD_VERSION_MIN) {
- safe_unpack32(&stats->vsize_max, buffer);
- safe_unpack32(&stats->rss_max, buffer);
- safe_unpack32(&stats->pages_max, buffer);
+ safe_unpack32((uint32_t *)&stats->vsize_max, buffer);
+ safe_unpack32((uint32_t *)&stats->rss_max, buffer);
+ safe_unpack32((uint32_t *)&stats->pages_max, buffer);
safe_unpack32(&stats->cpu_min, buffer);
safe_unpackdouble(&stats->vsize_ave, buffer);
View
6 src/plugins/accounting_storage/mysql/as_mysql_job.c
@@ -1084,11 +1084,11 @@ extern int as_mysql_step_complete(mysql_conn_t *mysql_conn,
"max_disk_read_node=%u, ave_disk_read=%f, "
"max_disk_write=%f, max_disk_write_task=%u, "
"max_disk_write_node=%u, ave_disk_write=%f, "
- "max_vsize=%u, max_vsize_task=%u, "
+ "max_vsize=%"PRIu64", max_vsize_task=%u, "
"max_vsize_node=%u, ave_vsize=%f, "
- "max_rss=%u, max_rss_task=%u, "
+ "max_rss=%"PRIu64", max_rss_task=%u, "
"max_rss_node=%u, ave_rss=%f, "
- "max_pages=%u, max_pages_task=%u, "
+ "max_pages=%"PRIu64", max_pages_task=%u, "
"max_pages_node=%u, ave_pages=%f, "
"min_cpu=%u, min_cpu_task=%u, "
"min_cpu_node=%u, ave_cpu=%f, "
View
16 src/plugins/jobacct_gather/common/common_jag.c
@@ -255,7 +255,7 @@ static int _get_process_data_line(int in, jag_prec_t *prec) {
prec->pages = majflt;
prec->usec = utime;
prec->ssec = stime;
- prec->vsize = vsize / 1024; /* convert from bytes to KB */
+ prec->vsize = vsize / 1024; /* convert from bytes to KB */
prec->rss = rss * my_pagesize;/* convert from pages to KB */
prec->last_cpu = last_cpu;
return 1;
@@ -546,7 +546,7 @@ extern void jag_common_init(long in_hertz)
}
}
- my_pagesize = getpagesize()/1024;
+ my_pagesize = getpagesize() / 1024;
}
extern void jag_common_fini(void)
@@ -569,10 +569,10 @@ extern void print_jag_prec(jag_prec_t *prec)
info("disk read\t%f", prec->disk_read);
info("disk_write\t%f", prec->disk_write);
info("pages\t%d", prec->pages);
- info("rss \t%d", prec->rss);
+ info("rss \t%"PRIu64"", prec->rss);
info("ssec \t%d", prec->ssec);
info("usec \t%d", prec->usec);
- info("vsize\t%d", prec->vsize);
+ info("vsize\t%"PRIu64"", prec->vsize);
}
extern void jag_common_poll_data(
@@ -581,7 +581,7 @@ extern void jag_common_poll_data(
{
/* Update the data */
List prec_list = NULL;
- uint32_t total_job_mem = 0, total_job_vsize = 0;
+ uint64_t total_job_mem = 0, total_job_vsize = 0;
ListIterator itr;
ListIterator itr2;
jag_prec_t *prec = NULL;
@@ -653,7 +653,8 @@ extern void jag_common_poll_data(
MAX(jobacct->min_cpu, cpu_calc);
jobacct->last_total_cputime = jobacct->tot_cpu;
jobacct->tot_cpu = cpu_calc;
- debug2("%d mem size %u %u time %u(%u+%u)",
+ debug2("%d mem size %"PRIu64" %"PRIu64" "
+ "time %u(%u+%u)",
jobacct->pid, jobacct->max_rss,
jobacct->max_vsize, jobacct->tot_cpu,
prec->usec, prec->ssec);
@@ -666,7 +667,8 @@ extern void jag_common_poll_data(
jobacct->act_cpufreq =
_update_weighted_freq(jobacct, sbuf);
debug2("Task average frequency = %u "
- "pid %d mem size %u %u time %u(%u+%u)",
+ "pid %d mem size %"PRIu64" %"PRIu64" "
+ "time %u(%u+%u)",
jobacct->act_cpufreq,
jobacct->pid, jobacct->max_rss,
jobacct->max_vsize, jobacct->tot_cpu,
View
4 src/plugins/jobacct_gather/common/common_jag.h
@@ -51,10 +51,10 @@ typedef struct jag_prec { /* process record */
int pages; /* pages */
pid_t pid;
pid_t ppid;
- int rss; /* rss */
+ uint64_t rss; /* rss */
int ssec; /* system cpu time */
int usec; /* user cpu time */
- int vsize; /* virtual size */
+ uint64_t vsize; /* virtual size */
} jag_prec_t;
typedef struct jag_callbacks {
View
26 src/sacct/print.c
@@ -831,17 +831,17 @@ void print_fields(type_t type, void *object)
switch(type) {
case JOB:
if (!job->track_steps)
- tmp_int = job->stats.pages_max;
+ tmp_uint64 = job->stats.pages_max;
break;
case JOBSTEP:
- tmp_int = step->stats.pages_max;
+ tmp_uint64 = step->stats.pages_max;
break;
case JOBCOMP:
default:
break;
}
- if (tmp_int != NO_VAL)
- convert_num_unit((float)tmp_int,
+ if (tmp_uint64 != (uint64_t)NO_VAL)
+ convert_num_unit((double)tmp_uint64,
outbuf, sizeof(outbuf),
UNIT_KILO);
@@ -897,17 +897,17 @@ void print_fields(type_t type, void *object)
switch(type) {
case JOB:
if (!job->track_steps)
- tmp_int = job->stats.rss_max;
+ tmp_uint64 = job->stats.rss_max;
break;
case JOBSTEP:
- tmp_int = step->stats.rss_max;
+ tmp_uint64 = step->stats.rss_max;
break;
case JOBCOMP:
default:
break;
}
- if (tmp_int != NO_VAL)
- convert_num_unit((float)tmp_int,
+ if (tmp_uint64 != (uint64_t)NO_VAL)
+ convert_num_unit((double)tmp_uint64,
outbuf, sizeof(outbuf),
UNIT_KILO);
@@ -962,18 +962,18 @@ void print_fields(type_t type, void *object)
switch(type) {
case JOB:
if (!job->track_steps)
- tmp_int = job->stats.vsize_max;
+ tmp_uint64 = job->stats.vsize_max;
break;
case JOBSTEP:
- tmp_int = step->stats.vsize_max;
+ tmp_uint64 = step->stats.vsize_max;
break;
case JOBCOMP:
default:
- tmp_int = NO_VAL;
+ tmp_uint64 = (uint64_t)NO_VAL;
break;
}
- if (tmp_int != NO_VAL)
- convert_num_unit((float)tmp_int,
+ if (tmp_uint64 != (uint64_t)NO_VAL)
+ convert_num_unit((double)tmp_uint64,
outbuf, sizeof(outbuf),
UNIT_KILO);
View
4 src/slurmd/slurmd/req.c
@@ -1950,7 +1950,7 @@ _enforce_job_mem_limit(void)
step_loc_t *stepd;
int fd, i, job_inx, job_cnt;
uint16_t vsize_factor;
- uint32_t step_rss, step_vsize;
+ uint64_t step_rss, step_vsize;
job_step_id_msg_t acct_req;
job_step_stat_t *resp = NULL;
struct job_mem_info {
@@ -2042,7 +2042,7 @@ _enforce_job_mem_limit(void)
stepd->stepd_info->
protocol_version);
#if _LIMIT_INFO
- info("Step:%u.%u RSS:%u KB VSIZE:%u KB",
+ info("Step:%u.%u RSS:%"PRIu64" KB VSIZE:%"PRIu64" KB",
stepd->jobid, stepd->stepid,
step_rss, step_vsize);
#endif
Please sign in to comment.
Something went wrong with that request. Please try again.