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 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/slurmd/common/slurmstepd_init.c b/src/slurmd/common/slurmstepd_init.c index 4aa8deb..e33b7b2 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); -- 1.7.1