File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -328,6 +328,40 @@ Then, when running CMake **for the first time** use the following command:
328
328
` ` ` bash
329
329
CC=clang CXX=clang++ cmake ..
330
330
` ` `
331
+
332
+ # # Launch a process on a particular CPU/CORE/PU
333
+
334
+ [hwloc tools](https://www.open-mpi.org/projects/hwloc/) allow to study computer and computer cluster topology.
335
+
336
+ To install ` hwloc` on ubuntu, run the following ` apt` command:
337
+
338
+ ` ` ` bash
339
+ sudo apt install hwloc
340
+ ` ` `
341
+
342
+ You can show your computer architecture topology with:
343
+
344
+ ` ` ` bash
345
+ lstopo
346
+ ` ` `
347
+
348
+ Also, you can run a process on a particular CPU/CORE/PU with the following command:
349
+
350
+ ` ` ` bash
351
+ # Run my_exe on processing unit 0
352
+ hwloc-bind pu:0 -- my_exe
353
+ # Run my_exe on core 2
354
+ hwloc-bind pu:2 -- my_exe
355
+ ` ` `
356
+
357
+ You can then watch where processes are running with:
358
+
359
+ ` ` ` bash
360
+ lstopo --ps
361
+ ` ` `
362
+
363
+ To go deeper, a [tutorial](https://www.open-mpi.org/projects/hwloc/tutorials/20120702-POA-hwloc-tutorial.html) is available.
364
+
331
365
# # Get stack size
332
366
333
367
The stack of a program is limited in memory space available. One way to get this value is to run in your favorite terminal:
@@ -341,3 +375,4 @@ More information on the current configuration can be obtained via:
341
375
` ` ` bash
342
376
ulimit -a
343
377
` ` `
378
+
You can’t perform that action at this time.
0 commit comments