Friday 20 April 2012

Find installed location of RPM Package

I've been trying to run HPL on a homemade HPC (in the loosest sense of the word) cluster and I was struggling with some of the dependencies.

Rather than compile from source, I had decided to use the available binaries for various packages, so I needed to find out where the libraries where actually held, with the added problem of not being fully aware of the names of what I was looking for. Enter the rpm tool and its myriad options:
Usage: rpm [-aKfgpWHqVcdilsKiv?] [-a|--all] [-f|--file] [-g|--group] [-p|--package] [-W|--ftswalk] [--pkgid] [--hdrid] [--fileid] [--specfile]   [--triggeredby] [--whatrequires] [--whatprovides] [--nomanifest] [-c|--configfiles] [-d|--docfiles] [--dump] [-l|--list] [--queryformat=QUERYFORMAT] [-s|--state] [--nofiledigest] [--nomd5] [--nofiles] [--nodeps] [--noscript] [--comfollow] [--logical] [--nochdir] [--nostat] [--physical] [--seedot] [--xdev] [--whiteout] [--addsign] [-K|--checksig] [--delsign] [--import] [--resign] [--nodigest] [--nosignature] [--initdb] [--rebuilddb] [--aid] [--allfiles] [--allmatches] [--badreloc] [-e|--erase <package>+] [--excludedocs] [--excludepath=<path>] [--fileconflicts] [--force] [-F|--freshen <packagefile>+] [-h|--hash] [--ignorearch] [--ignoreos] [--ignoresize] [-i|--install] [--justdb] [--nodeps] [--nofiledigest] [--nomd5] [--nocontexts] [--noorder] [--nosuggest] [--noscripts] [--notriggers] [--oldpackage] [--percent] [--prefix=<dir>] [--relocate=<old>=<new>] [--replacefiles] [--replacepkgs] [--test] [-U|--upgrade <packagefile>+] [--quiet] [-D|--define 'MACRO EXPR'] [-E|--eval 'EXPR'] [--macros=<FILE:...>] [--nodigest] [--nosignature] [--rcfile=<FILE:...>] [-r|--root ROOT] [--querytags] [--showrc] [--quiet] [-v|--verbose] [--version] [-?|--help] [--usage] [--scripts] [--setperms] [--setugids] [--conflicts] [--obsoletes] [--provides] [--requires] [--info] [--changelog] [--xml] [--triggers] [--last] [--dupes] [--filesbypkg] [--fileclass] [--filecolor] [--fscontext] [--fileprovide] [--filerequire] [--filecaps]
Since I knew the package name I could run rpm -qi mpich2, which provides loads of information, but crucially not where the files are located:
Name        : mpich2                       Relocations: (not relocatable)
Version     : 1.2.1                             Vendor: CentOS
Release     : 2.3.el6                       Build Date: Fri 12 Nov 2010 05:23:32 AM GMT
Install Date: Wed 18 Apr 2012 10:29:31 AM BST      Build Host: c5b2.bsys.dev.centos.org
Group       : Development/Libraries         Source RPM: mpich2-1.2.1-2.3.el6.src.rpm
Size        : 7302214                          License: MIT
Signature   : RSA/8, Sun 03 Jul 2011 05:45:52 AM BST, Key ID 0946fca2c105b9de
Packager    : CentOS BuildSystem <http://bugs.centos.org>
URL         : http://www.mcs.anl.gov/research/projects/mpich2
Summary     : A high-performance implementation of MPI
Description :
MPICH2 is a high-performance and widely portable implementation of the
MPI standard. This release has all MPI-2.1 functions and features
required by the standard with the exeption of support for the
"external32" portable I/O format.

The mpich2 binaries in this RPM packages were configured to use the default
process manager 'MPD' using the default device 'ch3'. The ch3 device
was configured with support for the nemesis channel that allows for
shared-memory and TCP/IP sockets based communication.

This build also include support for using '/usr/sbin/alternatives'
and/or the 'module environment' to select which MPI implementation to use
when multiple implementations are installed.
In order to find where the files are actually located I had to run rpm -ql mpich2, which provides the required information:
/etc/mpich2-x86_64
/etc/mpich2-x86_64/mpe_callstack_ldflags.conf
....
/usr/share/man/mpich2/man1/mpif90.1.gz

No comments:

Post a Comment