Openmpi package missing executables?

I just ran a

sudo yum install openmpi

and it appeared to work without a hitch, but when I do the following I get a message saying the desired executable isn’t in my path

which mpicc

so, not knowing where the package decided to put everything, I pulled this trick out of my bag

sudo du -ahc / > /dev/shm/file.db

then I grep the file for any instance of mpicc and it’s just not present on the system at all aside from a packaged man file

Am I compiling from source if I need mpicc?

I just used the rpm -ql to list what the package provided and grepped by bin to filter the list a bit.

[root@rocky ian]# rpm -ql openmpi | grep -i bin
/usr/lib64/openmpi/bin
/usr/lib64/openmpi/bin/aggregate_profile.pl
/usr/lib64/openmpi/bin/mpiexec
/usr/lib64/openmpi/bin/mpijavac.pl
/usr/lib64/openmpi/bin/mpirun
/usr/lib64/openmpi/bin/ompi-clean
/usr/lib64/openmpi/bin/ompi-server
/usr/lib64/openmpi/bin/ompi_info
/usr/lib64/openmpi/bin/orte-clean
/usr/lib64/openmpi/bin/orte-info
/usr/lib64/openmpi/bin/orte-server
/usr/lib64/openmpi/bin/orted
/usr/lib64/openmpi/bin/orterun
/usr/lib64/openmpi/bin/oshCC
/usr/lib64/openmpi/bin/oshc++
/usr/lib64/openmpi/bin/oshcc
/usr/lib64/openmpi/bin/oshcxx
/usr/lib64/openmpi/bin/oshfort
/usr/lib64/openmpi/bin/oshmem_info
/usr/lib64/openmpi/bin/oshrun
/usr/lib64/openmpi/bin/profile2mat.pl
/usr/lib64/openmpi/bin/shmemCC
/usr/lib64/openmpi/bin/shmemc++
/usr/lib64/openmpi/bin/shmemcc
/usr/lib64/openmpi/bin/shmemcxx
/usr/lib64/openmpi/bin/shmemfort
/usr/lib64/openmpi/bin/shmemrun
/usr/lib64/openmpi/lib/openmpi/mca_rmaps_round_robin.so
/usr/lib64/openmpi/lib/openmpi/mca_routed_binomial.so

As I don’t use this package I haven’t attempted to run any of the bin files found, but hope that helps.

1 Like

Ahh that is a more sane way to inspect the package, so thank you for that.

Unless my eyes deceive me, I’m not seeing mpicc though. That’s something for whomever maintains the package though…

Not a big deal, I can compile it myself, once I get these compilers cooperating.

1 Like

DNF can tell you what package provides a specific binary that you don’t have installed on your system. The typical invocation looks something like this…

[tcooper@localhost ~]$ dnf whatprovides "*/openmpi/bin/mpicc"
Last metadata expiration check: 0:02:12 ago on Tue 13 Jul 2021 10:03:00 PM PDT.
openmpi-devel-4.0.5-3.el8.i686 : Development files for openmpi
Repo        : appstream
Matched from:
Filename    : /usr/lib/openmpi/bin/mpicc

openmpi-devel-4.0.5-3.el8.x86_64 : Development files for openmpi
Repo        : appstream
Matched from:
Filename    : /usr/lib64/openmpi/bin/mpicc

DNF can also provide more information about a specific package without installing it like this…

[tcooper@localhost ~]$ dnf info openmpi-devel-4.0.5-3.el8.x86_64
Last metadata expiration check: 0:06:21 ago on Tue 13 Jul 2021 10:03:00 PM PDT.
Available Packages
Name         : openmpi-devel
Version      : 4.0.5
Release      : 3.el8
Architecture : x86_64
Size         : 1.2 M
Source       : openmpi-4.0.5-3.el8.src.rpm
Repository   : appstream
Summary      : Development files for openmpi
URL          : http://www.open-mpi.org/
License      : BSD and MIT and Romio
Description  : Contains development headers and libraries for openmpi.

So… if you have the AppStream repository enabled you should be able to install the openmpi-devel package to get mpicc binary (wrapper) for openmpi. This will also pull in any additional dependencies you don’t have already installed. For example…

[tcooper@localhost ~]$ sudo dnf install openmpi openmpi-devel
Last metadata expiration check: 0:13:21 ago on Tue 13 Jul 2021 09:59:09 PM PDT.
Dependencies resolved.
============================================================================================================
 Package                     Arch        Version                                       Repository      Size
============================================================================================================
Installing:
 openmpi                     x86_64      4.0.5-3.el8                                   appstream      2.8 M
 openmpi-devel               x86_64      4.0.5-3.el8                                   appstream      1.2 M
Installing dependencies:
 binutils                    x86_64      2.30-93.el8                                   baseos         5.8 M
 cpp                         x86_64      8.4.1-1.el8                                   appstream       10 M
 environment-modules         x86_64      4.5.2-1.el8                                   baseos         420 k
 gcc                         x86_64      8.4.1-1.el8                                   appstream       23 M

...<snip>...

 tcl                         x86_64      1:8.6.8-2.el8                                 baseos         1.1 M
 torque-libs                 x86_64      4.2.10-25.el8                                 appstream      141 k
 ucx                         x86_64      1.9.0-1.el8                                   appstream      524 k
Installing weak dependencies:
 perl-IO-Socket-IP           noarch      0.39-5.el8                                    appstream       46 k
 perl-IO-Socket-SSL          noarch      2.066-4.module+el8.4.0+512+d4f0fc54           appstream      297 k
 perl-Mozilla-CA             noarch      20160104-7.module+el8.4.0+529+e3b3e624        appstream       14 k
Enabling module streams:
 perl                                    5.26
 perl-IO-Socket-SSL                      2.066
 perl-libwww-perl                        6.34

Transaction Summary
============================================================================================================
Install  74 Packages

Total download size: 84 M
Installed size: 219 M
Is this ok [y/N]: y
Is this ok [y/N]: y
Downloading Packages:
(1/74): cpp-8.4.1-1.el8.x86_64.rpm                                          5.5 MB/s |  10 MB     00:01
(2/74): gcc-gfortran-8.4.1-1.el8.x86_64.rpm                                 5.8 MB/s |  12 MB     00:01
(3/74): isl-0.16.1-6.el8.x86_64.rpm                                         4.8 MB/s | 834 kB     00:00

...<snip>...

  tcl-1:8.6.8-2.el8.x86_64
  torque-libs-4.2.10-25.el8.x86_64
  ucx-1.9.0-1.el8.x86_64

Complete!

And now you should have the mpicc binary. For example…

[tcooper@localhost ~]$ /usr/lib64/openmpi/bin/mpicc --version
gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Hopefully this example will help you find the packages providing any other binaries you need.

2 Likes

sorry to open an old thread but if anyone else is looking for this, you just need to use the module command, eg:

module load mpi