Installing `hwloc-nox`, but `hwloc-nox` executable cannot be called / found

Asked by Amy Powell

I am installing `hwloc-nox` (and its dependencies, `libhwloc-common`, `libhwloc-dev`, `libhwloc15`) via apt-get in a container that uses an ubuntu-jammy base image with CUDA (specifically, ` nvcr.io/nvidia/cuda:12.2.2-devel-ubuntu22.04`, see details here: https://catalog.ngc.nvidia.com/orgs/nvidia/containers/cuda/tags).

I have scripts with dependencies on the `hwloc-nox` executable. These scripts fail is the executable is not available:

**ERROR**

```
line 3: hwloc-nox: command not found
```

Despite installing `hwloc-nox`, I cannot find or call the executable anywhere.

In my running container, here's what I see:

**ATTEMPTING TO CALL `hwloc-nox` EXECUTABLE
```
root@be739d0bdfab:/exawind-entry/spack-manager# hwloc-
hwloc-annotate hwloc-calc hwloc-diff hwloc-dump-hwdata hwloc-gather-topology hwloc-ls hwloc-ps
hwloc-bind hwloc-compress-dir hwloc-distrib hwloc-gather-cpuid hwloc-info hwloc-patch

```

**SEARCHING FOR `hwloc-nox` EXECUTABLE

```
root@be739d0bdfab:/exawind-entry/spack-manager# find /usr -name hwloc
/usr/include/hwloc
/usr/include/x86_64-linux-gnu/hwloc
/usr/share/hwloc
/usr/share/bash-completion/completions/hwloc
/usr/lib/x86_64-linux-gnu/hwloc

...

root@be739d0bdfab:/exawind-entry/spack-manager# ls -l /usr/share/doc/hwloc-nox/
total 4
lrwxrwxrwx 1 root root 33 Jun 16 2022 changelog.Debian.gz -> ../libhwloc15/changelog.Debian.gz

```

**EVIDENCE OF HWLOC INSTALL**
```
root@be739d0bdfab:/exawind-entry/spack-manager# spack external find --all
==> The following specs have been detected on this system and added to /exawind-entry/spack-manager/.spack/packages.yaml
autoconf@2.71 binutils@2.38 cuda@12.2.91 file@5.41 gcc@11.4.0 hwloc@2.7.0 nccl@2.18.5 openssl@3.0.2 sed@4.8 zip@3.0
automake@1.16.5 bzip2@1.0.8 curl@7.81.0 findutils@4.8.0 git@2.34.1 libtool@2.4.6 ncurses@6.3.20211021 perl@5.34.0 tar@1.34
bash@5.1.16 coreutils@8.32 diffutils@3.8 flex@2.6.4 gmake@4.3 m4@1.4.18 openssh@8.9p1 python@3.10.12 xz@5.2.5
```

**EVIDENCE OF POSSIBLE CONFLICT w/ `hwloc`**
```
root@be739d0bdfab:/exawind-entry/spack-manager# dpkg-query -s hwloc-nox
Package: hwloc-nox
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 604
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Multi-Arch: foreign
Source: hwloc
Version: 2.7.0-2ubuntu1
Depends: libc6 (>= 2.34), libhwloc15 (>= 2.7.0), libtinfo6 (>= 6)
Conflicts: hwloc
Description: Hierarchical view of the machine - non-X version of utilities
 Hardware Locality (hwloc) provides a portable abstraction (across OS, versions,
 architectures, ...) of the hierarchical topology of modern architectures. It
 primarily aims at helping high-performance computing applications with
 gathering information about the hardware so as to exploit it accordingly and
 efficiently.
 .
 hwloc provides a hierarchical view of the machine, NUMA memory nodes,
 sockets, shared caches, cores and simultaneous multithreading. It also gathers
 various attributes such as cache and memory information.
 .
 hwloc supports old kernels not having sysfs topology information,
 with knowledge of cpusets, offline cpus, and Kerrighed support
 .
 This package contains utilities to show the topology of the machine (lstopo
 and hwloc-ls, without X support), manipulate cpu masks (hwloc-calc), and bind
 processes (hwloc-bind).
Original-Maintainer: Samuel Thibault <email address hidden>
Homepage: https://www.open-mpi.org/projects/hwloc/

```

**EVIDENCE THAT APT-GET ATTEMPTED TO INSTALL `hwloc-nox`**
```
The following NEW packages will be installed:
  alsa-topology-conf alsa-ucm-conf autoconf automake autotools-dev clangd
  clangd-14 curl dbus distro-info-data emacs-bin-common emacs-common emacs-el
  emacs-nox emacsen-common file flex gcc-11-doc gcc-11-multilib gcc-doc
  gcc-multilib gfortran gfortran-11 gfortran-11-doc gfortran-11-multilib
  gfortran-doc gfortran-multilib git git-doc git-man hwloc-nox

```

Would you please step me through what I need to do to get an `hwloc-nox` executable properly installed (via apt-get)?

After installing `hwloc-nox` with apt-get, I would expect to be able to easily call and find the executable of the same name.

Best,

AJP

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu hwloc Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

hwloc-nox is a package, not an executable file.
Where did you get the information that you should try executing hwloc-nox?
What do you assume that the hwloc-nox executable would do?

The executable files in the hwloc-nox package are those listed in your output above.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

You use the commands below, as Manfred says, its just a package name

/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
/usr/bin/lstopo-no-graphics

Source:
https://packages.ubuntu.com/focal/amd64/hwloc-nox/filelist

Can you help with this problem?

Provide an answer of your own, or ask Amy Powell for more information if necessary.

To post a message you must log in.