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

BGQ - make sure we calculate the ntasks per node correctly given a node

and task count that isn't an even cut.
parent fd352f07
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,7 @@
#endif
#include <string.h> /* strcpy, strncasecmp */
#include <math.h>
#ifdef HAVE_STRINGS_H
# include <strings.h>
......@@ -1670,7 +1671,12 @@ static void _opt_args(int argc, char **argv)
opt.max_nodes = opt.min_nodes = node_cnt = opt.ntasks;
if (!opt.ntasks_per_node || (opt.ntasks_per_node == NO_VAL)) {
opt.ntasks_per_node = opt.ntasks / node_cnt;
/* We always want the next larger number if
there is a fraction so we try to stay in
the allocation requested.
*/
opt.ntasks_per_node = ceil((double)opt.ntasks
/ (double)node_cnt);
figured = true;
}
......
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