How To Install hwloc on CentOS 7

In this tutorial we learn how to install hwloc on CentOS 7. hwloc is Portable Hardware Locality - portable abstraction of hierarchical

Introduction

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

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 7. In this tutorial we discuss both methods but you only need to choose one of method to install hwloc.

Install hwloc on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install hwloc

Install hwloc on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

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

sudo dnf -y install hwloc

How To Uninstall hwloc on CentOS 7

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

sudo dnf remove hwloc

References

Summary

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