diff options
author | Boris Samorodov <bsam@FreeBSD.org> | 2013-11-24 20:23:02 +0000 |
---|---|---|
committer | Boris Samorodov <bsam@FreeBSD.org> | 2013-11-24 20:23:02 +0000 |
commit | 3110f294ef2a199218c9755cf0716e9d3c1ee74d (patch) | |
tree | b99e175b5bbb6e1a2969d914c3d6c3f10663c774 /sysutils/slurm-hpc/files/patch-src-plugins-select-cons_res-dist_tasks.c | |
parent | - fix include line (diff) |
SLURM is an open-source resource manager designed for *nix clusters of all
sizes. It provides three key functions. First it allocates exclusive and/or
non-exclusive access to resources (computer nodes) to users for some duration
of time so they can perform work. Second, it provides a framework for starting,
executing, and monitoring work (typically a parallel job) on a set of allocated
nodes. Finally, it arbitrates contention for resources by managing a queue of
pending work.
WWW: https://computing.llnl.gov/linux/slurm/
PR: ports/184215
Submitted by: Jason Bacon <jwbacon@tds.net>
Notes
Notes:
svn path=/head/; revision=334788
Diffstat (limited to 'sysutils/slurm-hpc/files/patch-src-plugins-select-cons_res-dist_tasks.c')
-rw-r--r-- | sysutils/slurm-hpc/files/patch-src-plugins-select-cons_res-dist_tasks.c | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/sysutils/slurm-hpc/files/patch-src-plugins-select-cons_res-dist_tasks.c b/sysutils/slurm-hpc/files/patch-src-plugins-select-cons_res-dist_tasks.c new file mode 100644 index 000000000000..c2166f12123e --- /dev/null +++ b/sysutils/slurm-hpc/files/patch-src-plugins-select-cons_res-dist_tasks.c @@ -0,0 +1,68 @@ +--- src/plugins/select/cons_res/dist_tasks.c.orig 2013-09-10 16:44:33.000000000 -0500 ++++ src/plugins/select/cons_res/dist_tasks.c 2013-11-14 10:23:02.000000000 -0600 +@@ -271,6 +271,30 @@ + return SLURM_SUCCESS; + } + ++// These were nested below, which is not legal in standard C ++ ++ /* qsort compare function for ascending int list */ ++ int _cmp_int_ascend (const void *a, const void *b) ++ { ++ return (*(int*)a - *(int*)b); ++ } ++ ++ /* qsort compare function for descending int list */ ++ int _cmp_int_descend (const void *a, const void *b) ++ { ++ return (*(int*)b - *(int*)a); ++ } ++ ++ int* sockets_cpu_cnt; ++ ++ /* qsort compare function for board combination socket ++ * list */ ++ int _cmp_sock (const void *a, const void *b) ++ { ++ return (sockets_cpu_cnt[*(int*)b] - ++ sockets_cpu_cnt[*(int*)a]); ++ } ++ + /* sync up core bitmap with new CPU count using a best-fit approach + * on the available resources on each node + * +@@ -298,7 +322,6 @@ + int elig_idx, comb_brd_idx, sock_list_idx, comb_min, board_num; + int* boards_cpu_cnt; + int* sort_brds_cpu_cnt; +- int* sockets_cpu_cnt; + int* board_combs; + int* socket_list; + int* elig_brd_combs; +@@ -316,26 +339,6 @@ + uint64_t ncomb_brd; + bool sufficient,best_fit_sufficient; + +- /* qsort compare function for ascending int list */ +- int _cmp_int_ascend (const void *a, const void *b) +- { +- return (*(int*)a - *(int*)b); +- } +- +- /* qsort compare function for descending int list */ +- int _cmp_int_descend (const void *a, const void *b) +- { +- return (*(int*)b - *(int*)a); +- } +- +- /* qsort compare function for board combination socket +- * list */ +- int _cmp_sock (const void *a, const void *b) +- { +- return (sockets_cpu_cnt[*(int*)b] - +- sockets_cpu_cnt[*(int*)a]); +- } +- + if (!job_res) + return; + |