From c345da89f20a2f52fe9d65f6d8478f59bbb04adc Mon Sep 17 00:00:00 2001
From: Pierre Neyron <pierre.neyron@imag.fr>
Date: Mon, 16 Mar 2020 13:02:18 +0100
Subject: [PATCH] [gen] oar-properties: add new scheme for pyxis

On pyxis: all cpuset ids (of all threads) a grouped by CPUs:
CPU0: 0-127
CPU1: 128-255

Among a CPU, threads are given in round robin:
CPU0: 0,32,64,96 -> 31,63,95,127
CPU1: 128,160,192,224 -> 159,191,223,255

So looking at the first thread of each core, this give 2 groups:
CPU0: 0-31
CPU1: 128-159
Thus a gap between the 2.

So the new formula to give the first thread id of each core is the
following:
row[:cpuset] = cpu_num * cpu_thread_count + core_num
---
 lib/refrepo/gen/oar-properties.rb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/refrepo/gen/oar-properties.rb b/lib/refrepo/gen/oar-properties.rb
index 84d78cbc4c..f83861004c 100644
--- a/lib/refrepo/gen/oar-properties.rb
+++ b/lib/refrepo/gen/oar-properties.rb
@@ -1389,6 +1389,8 @@ def extract_clusters_description(clusters, site_name, options, data_hierarchy, s
           ############################################
           if core_numbering == 'contiguous'
             row[:cpuset] = cpu_num * cpu_core_count + core_num
+          elsif core_numbering == 'contiguous-including-threads'
+            row[:cpuset] = cpu_num * cpu_thread_count + core_num
           elsif core_numbering == 'round-robin'
             row[:cpuset] = cpu_num + core_num * cpu_count
           else
-- 
GitLab