Skip to content

Commit c29eacd

Browse files
bgoglinndenoyelle
authored andcommitted
hwloc-bind/calc.1: examples with --no-smt
Signed-off-by: Brice Goglin <[email protected]>
1 parent 1c4d21f commit c29eacd

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

utils/hwloc/hwloc-bind.1in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@ the second core of the first package:
216216

217217
$ hwloc-bind package:1.core:0 package:0.core:1 -- echo hello
218218

219+
To bind on the first PU of all cores of the first package:
220+
221+
$ hwloc-bind package:0.core:all.pu:0 -- echo hello
222+
$ hwloc-bind --no-smt package:0 -- echo hello
223+
219224
To bind memory on the first high-bandwidth memory node:
220225

221226
$ hwloc-bind --membind hbm:0 -- echo hello

utils/hwloc/hwloc-calc.1in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,14 +274,15 @@ To synthetize a set of cores into largest objects on a 2-node 2-package 2-core m
274274
To get the set of first threads of all cores:
275275

276276
$ hwloc-calc core:all.pu:0
277+
$ hwloc-calc --no-smt all
277278

278279
This can also be very useful in order to make GNU OpenMP use exactly one thread
279280
per core, and in logical core order:
280281

281282
$ export OMP_NUM_THREADS=`hwloc-calc --number-of core all`
282283
$ echo $OMP_NUM_THREADS
283284
4
284-
$ export GOMP_CPU_AFFINITY=`hwloc-calc --physical-output --intersect PU core:all.pu:0`
285+
$ export GOMP_CPU_AFFINITY=`hwloc-calc --physical-output --intersect PU --no-smt all`
285286
$ echo $GOMP_CPU_AFFINITY
286287
0,2,1,3
287288

0 commit comments

Comments
 (0)