diff --git a/NEWS b/NEWS index c463eecfeea3bc47e32d60767d0d7bcd77e5c094..c3e979e5a140b471b9440cb9b3f56b558adf781e 100644 --- a/NEWS +++ b/NEWS @@ -64,6 +64,8 @@ documents those changes that are of interest to users and admins. as the hosts given. -- CRAY - If task count specified, but no tasks-per-node, then set the tasks per node in the BASIL reservation request. + -- CRAY - fix issue with --mem option not giving correct amount of memory + per cpu. * Changes in Slurm 2.5.4 ======================== diff --git a/src/plugins/select/cray/basil_interface.c b/src/plugins/select/cray/basil_interface.c index dd1d340869164b3ddae971f86f7c2faaab82892f..cd2410016c48a6b26cbd76180dd1af9f07ea2a2a 100644 --- a/src/plugins/select/cray/basil_interface.c +++ b/src/plugins/select/cray/basil_interface.c @@ -793,6 +793,12 @@ extern int do_basil_reserve(struct job_record *job_ptr) node_cpus = node_ptr->cpus; node_mem = node_ptr->real_memory; } + + /* If the job has requested memory use it (if + lesser) for calculations. + */ + tmp_mppmem = MIN(node_mem, node_min_mem); + /* * ALPS 'Processing Elements per Node' value (aprun -N), * which in slurm is --ntasks-per-node and 'mppnppn' in @@ -803,8 +809,8 @@ extern int do_basil_reserve(struct job_record *job_ptr) * mppmem and use it as the level for all * nodes (mppmem is 0 when coming in). */ - node_mem /= mppnppn ? mppnppn : node_cpus; - tmp_mppmem = node_min_mem = MIN(node_mem, node_min_mem); + tmp_mppmem /= mppnppn ? mppnppn : node_cpus; + /* Minimum memory per processing element should be 1, * since 0 means give all the memory to the job. */ if (tmp_mppmem <= 0)