From 4cf2f340f89880260941aa947e549359c8773106 Mon Sep 17 00:00:00 2001 From: "Mark A. Grondona" <mgrondona@llnl.gov> Date: Fri, 30 Sep 2011 10:16:25 -0700 Subject: [PATCH] Propagate real_memory_size to slurmstepd at job start Add conf->real_memory_size to the list of slurmd_conf_t members that are propagated to slurmstepd during a job step launch. This makes the amount of RAM available on the system (as determined by slurmd) available for use in slurmstepd plugins or slurmstepd itself, without having to recalculate its value. --- src/slurmd/common/slurmstepd_init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/slurmd/common/slurmstepd_init.c b/src/slurmd/common/slurmstepd_init.c index 4aa8debc824..e33b7b28ca4 100644 --- a/src/slurmd/common/slurmstepd_init.c +++ b/src/slurmd/common/slurmstepd_init.c @@ -45,6 +45,7 @@ extern void pack_slurmd_conf_lite(slurmd_conf_t *conf, Buf buffer) pack16(conf->sockets, buffer); pack16(conf->cores, buffer); pack16(conf->threads, buffer); + pack32(conf->real_memory_size, buffer); packstr(conf->spooldir, buffer); packstr(conf->node_name, buffer); packstr(conf->logfile, buffer); @@ -70,6 +71,7 @@ extern int unpack_slurmd_conf_lite_no_alloc(slurmd_conf_t *conf, Buf buffer) safe_unpack16(&conf->sockets, buffer); safe_unpack16(&conf->cores, buffer); safe_unpack16(&conf->threads, buffer); + safe_unpack32(&conf->real_memory_size, buffer); safe_unpackstr_xmalloc(&conf->spooldir, &uint32_tmp, buffer); safe_unpackstr_xmalloc(&conf->node_name, &uint32_tmp, buffer); safe_unpackstr_xmalloc(&conf->logfile, &uint32_tmp, buffer); -- GitLab