How To Install hwloc on CentOS 8

hwloc is Portable Hardware Locality - portable abstraction of hierarchical architectures

Introduction

In this tutorial we learn how to install hwloc on CentOS 8.

What is hwloc

The Portable Hardware Locality (hwloc) software package provides a portable abstraction (across OS, versions, architectures, …) of the hierarchical topology of modern architectures, including NUMA memory nodes, shared caches, processor sockets, processor cores and processing units (logical processors or “threads”). It also gathers various system attributes such as cache and memory information. It primarily aims at helping applications with gathering information about modern computing hardware so as to exploit it accordingly and efficiently. hwloc may display the topology in multiple convenient formats. It also offers a powerful programming interface (C API) to gather information about the hardware, bind processes, and much more.

We can use yum or dnf to install hwloc on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install hwloc.

Install hwloc on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install hwloc using dnf by running the following command:

sudo dnf -y install hwloc

Install hwloc on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install hwloc using yum by running the following command:

sudo yum -y install hwloc

How To Uninstall hwloc on CentOS 8

To uninstall only the hwloc package we can use the following command:

sudo dnf remove hwloc

hwloc Package Contents on CentOS 8

/etc/bash_completion.d/hwloc-completion.bash
/usr/bin/hwloc-annotate
/usr/bin/hwloc-bind
/usr/bin/hwloc-calc
/usr/bin/hwloc-compress-dir
/usr/bin/hwloc-diff
/usr/bin/hwloc-distrib
/usr/bin/hwloc-gather-cpuid
/usr/bin/hwloc-gather-topology
/usr/bin/hwloc-info
/usr/bin/hwloc-ls
/usr/bin/hwloc-patch
/usr/bin/hwloc-ps
/usr/bin/lstopo-no-graphics
/usr/lib/.build-id
/usr/lib/.build-id/00
/usr/lib/.build-id/00/b3b3fdc7188fd0ed3391aa2d212d2643386e90
/usr/lib/.build-id/01
/usr/lib/.build-id/01/3f0d5c97fadcd12638fc454f24714774b54571
/usr/lib/.build-id/02
/usr/lib/.build-id/02/f9849a41dd22ca95721c401105cdd0b73cf352
/usr/lib/.build-id/24
/usr/lib/.build-id/24/6d281453b32dc7d3d13ca791fe2e78ecbf8460
/usr/lib/.build-id/2b
/usr/lib/.build-id/2b/621f63f10f63f1ed42daace17d5dccf312fb21
/usr/lib/.build-id/2d
/usr/lib/.build-id/2d/8356556533b15a3b5c7bfccc0af9a969d09d60
/usr/lib/.build-id/3f
/usr/lib/.build-id/3f/4e9d558ef1c55c3e55822c72116f9b8be26617
/usr/lib/.build-id/3f/adb62092829918cdbdd8feff5a454efc771053
/usr/lib/.build-id/5f
/usr/lib/.build-id/5f/177dc4de032e7ab799e3f3c5c6e251674e39a3
/usr/lib/.build-id/9a
/usr/lib/.build-id/9a/2115242f4bfb2f4e3b210c8ee82fdcbd062905
/usr/lib/.build-id/a5
/usr/lib/.build-id/a5/e890d296750d49945c3208931b2b37700af221
/usr/lib/systemd/system/hwloc-dump-hwdata.service
/usr/sbin/hwloc-dump-hwdata
/usr/share/man/man1/hwloc-annotate.1.gz
/usr/share/man/man1/hwloc-bind.1.gz
/usr/share/man/man1/hwloc-calc.1.gz
/usr/share/man/man1/hwloc-compress-dir.1.gz
/usr/share/man/man1/hwloc-diff.1.gz
/usr/share/man/man1/hwloc-distrib.1.gz
/usr/share/man/man1/hwloc-dump-hwdata.1.gz
/usr/share/man/man1/hwloc-gather-cpuid.1.gz
/usr/share/man/man1/hwloc-gather-topology.1.gz
/usr/share/man/man1/hwloc-info.1.gz
/usr/share/man/man1/hwloc-ls.1.gz
/usr/share/man/man1/hwloc-patch.1.gz
/usr/share/man/man1/hwloc-ps.1.gz
/usr/share/man/man1/lstopo-no-graphics.1.gz

References

Summary

In this tutorial we learn how to install hwloc on CentOS 8 using yum and dnf.