Skip to content
Snippets Groups Projects
Commit 348a30b3 authored by Danny Auble's avatar Danny Auble
Browse files

ALPS - Only set -M if node_min_mem is specified. In conjunction with

commit a9dc50d4.
parent e1c42895
No related branches found
No related tags found
No related merge requests found
...@@ -810,38 +810,40 @@ extern int do_basil_reserve(struct job_record *job_ptr) ...@@ -810,38 +810,40 @@ extern int do_basil_reserve(struct job_record *job_ptr)
node_mem = node_ptr->real_memory; node_mem = node_ptr->real_memory;
} }
if (cray_conf->sub_alloc && node_min_mem) { if (cray_conf->sub_alloc) {
int32_t tmp_mppmem; if (node_min_mem) {
int32_t tmp_mppmem;
/* 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 PBS: if
* --ntasks is specified, default to the
* number of cores per node (also the
* default for 'aprun -N'). On a
* heterogeneous system the nodes
* aren't always the same so keep
* track of the lowest mppmem and use
* it as the level for all nodes
* (mppmem is 0 when coming in).
*/
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)
tmp_mppmem = 1;
if (mppmem) /* If the job has requested memory use it (if
mppmem = MIN(mppmem, tmp_mppmem); lesser) for calculations.
else */
mppmem = tmp_mppmem; 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 PBS: if
* --ntasks is specified, default to the
* number of cores per node (also the
* default for 'aprun -N'). On a
* heterogeneous system the nodes
* aren't always the same so keep
* track of the lowest mppmem and use
* it as the level for all nodes
* (mppmem is 0 when coming in).
*/
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)
tmp_mppmem = 1;
if (mppmem)
mppmem = MIN(mppmem, tmp_mppmem);
else
mppmem = tmp_mppmem;
}
} else { } else {
node_cpus = adjust_cpus_nppcu( node_cpus = adjust_cpus_nppcu(
nppcu, threads, node_cpus); nppcu, threads, node_cpus);
...@@ -881,12 +883,12 @@ extern int do_basil_reserve(struct job_record *job_ptr) ...@@ -881,12 +883,12 @@ extern int do_basil_reserve(struct job_record *job_ptr)
* nodes (mppmem is 0 when coming in). * nodes (mppmem is 0 when coming in).
*/ */
mppmem = min_memory / largest_cpus; mppmem = min_memory / largest_cpus;
}
/* Minimum memory per processing element should be 1, /* Minimum memory per processing element should be 1,
* since 0 means give all the memory to the job. */ * since 0 means give all the memory to the job. */
if (mppmem <= 0) if (mppmem <= 0)
mppmem = 1; mppmem = 1;
}
if (cray_conf->sub_alloc) { if (cray_conf->sub_alloc) {
mppwidth = 0; mppwidth = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment