pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: pkgsrc/parallel/slurm



On Fri, Dec 06, 2013 at 06:05:31AM +0000, Aleksej Saushev wrote:
> Module Name:  pkgsrc
> Committed By: asau
> Date:         Fri Dec  6 06:05:31 UTC 2013
> 
> Modified Files:
>       pkgsrc/parallel/slurm: Makefile PLIST distinfo
>       pkgsrc/parallel/slurm/patches: patch-doc_html_Makefile.am
>           patch-doc_html_Makefile.in patch-doc_man_man1_Makefile.am
>           patch-doc_man_man1_Makefile.in patch-doc_man_man5_Makefile.am
>           patch-doc_man_man5_Makefile.in patch-doc_man_man8_Makefile.am
>           patch-doc_man_man8_Makefile.in
> Added Files:
>       pkgsrc/parallel/slurm/patches: patch-src_common_net.c
>           patch-src_common_slurm__jobacct__gather.c
>           patch-src_common_xcgroup.c patch-src_common_xcgroup.h
>           
> patch-src_plugins_acct__gather__filesystem_lustre_acct__gather__filesystem__lustre.c
>           patch-src_slurmctld_reservation.c
>           patch-src_slurmd_common_setproctitle.c
>           patch-src_slurmd_slurmstepd_task.c
>           patch-src_srun_libsrun_debugger.c patch-src_srun_libsrun_launch.c
> 
> Log Message:
> Update to SLURM 2.6.4
> Based on work of Jason Bacon published in WIP.

It would be nice to not get new code using nasty functions ^W^W nested
functions. Attached patch avoids that, but I am not sure if the
_block_sync_core_bitmap should be thread safe or not. Depending on that,
_cmp_sock needs to use TLS/pthread_specific...

Joerg
Index: parallel/slurm/distinfo
==================================================================
--- parallel/slurm/distinfo
+++ parallel/slurm/distinfo
@@ -14,10 +14,11 @@
 SHA1 (patch-src_common_net.c) = 6a53ef7ef94afa1e48d929c635e900c9999e381b
 SHA1 (patch-src_common_slurm__jobacct__gather.c) = 
abcb7c117c3efa95509d047ff7243fc98cfc00b7
 SHA1 (patch-src_common_xcgroup.c) = fd49ee490fc663635b0b5a3ce54ede7e6166b897
 SHA1 (patch-src_common_xcgroup.h) = 78e9021a725692c8a980556c000c4501c8009a75
 SHA1 
(patch-src_plugins_acct__gather__filesystem_lustre_acct__gather__filesystem__lustre.c)
 = 3544b07d4266476b2038a39a91166a6a1c802e18
+SHA1 (patch-src_plugins_select_cons__res_dist__tasks.c) = 
ca7bc0e92655d6f68ebc2d6e996de178283f7e9b
 SHA1 (patch-src_slurmctld_reservation.c) = 
c02eb31c2b9dee32e1b68bb9ecf63acd34a987ca
 SHA1 (patch-src_slurmd_common_setproctitle.c) = 
1ac0cccd1f889a8a3e3d998bdb6392cfbca932e5
 SHA1 (patch-src_slurmd_slurmstepd_task.c) = 
b7afd7c2ed58b8423490e1117d6e82d7b0f3294b
 SHA1 (patch-src_srun_libsrun_debugger.c) = 
1d10d883c2f9931af3166980c70730ab9fa1df96
 SHA1 (patch-src_srun_libsrun_launch.c) = 
ff3cbfced383206f86f33c3a511334b95da9edc7

ADDED    parallel/slurm/patches/patch-src_plugins_select_cons__res_dist__tasks.c
Index: parallel/slurm/patches/patch-src_plugins_select_cons__res_dist__tasks.c
==================================================================
--- parallel/slurm/patches/patch-src_plugins_select_cons__res_dist__tasks.c
+++ parallel/slurm/patches/patch-src_plugins_select_cons__res_dist__tasks.c
@@ -0,0 +1,69 @@
+$NetBSD$
+
+--- src/plugins/select/cons_res/dist_tasks.c.orig      2013-12-08 
20:34:20.000000000 +0000
++++ src/plugins/select/cons_res/dist_tasks.c
+@@ -286,6 +286,29 @@ static int _compute_plane_dist(struct jo
+  * The CPU array contains the distribution of CPUs, which can include
+  * virtual CPUs (hyperthreads)
+  */
++
++/* 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 */
++static int* my_sockets_cpu_cnt;
++
++int _cmp_sock (const void *a, const void *b)
++{
++       return (my_sockets_cpu_cnt[*(int*)b] -
++                       my_sockets_cpu_cnt[*(int*)a]);
++}
++
+ static void _block_sync_core_bitmap(struct job_record *job_ptr,
+                                   const uint16_t cr_type)
+ {
+@@ -316,26 +339,6 @@ static void _block_sync_core_bitmap(stru
+       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;
+ 
+@@ -501,6 +504,7 @@ static void _block_sync_core_bitmap(stru
+                       }
+                       /* Sort this socket list in descending order of
+                        * available core count */
++                      my_sockets_cpu_cnt = sockets_cpu_cnt;
+                       qsort(&socket_list[elig_idx*sock_per_comb],
+                               sock_per_comb, sizeof (int), _cmp_sock);
+                       /* Determine minimum number of sockets required for



Home | Main Index | Thread Index | Old Index