On 2020-06-01 10:48, Satish Balay wrote:
This is likely a dependency of a dependency.

In rpm world - you can do something like:

[root@sb ~]# repoquery --whatrequires SuperLU.x86_64
Last metadata expiration check: 0:07:55 ago on Sun 31 May 2020 09:38:39 PM CDT.
SuperLU-devel-0:5.2.1-8.fc32.x86_64
SuperLU-doc-0:5.2.1-8.fc32.x86_64
armadillo-0:9.860.1-1.fc32.x86_64
armadillo-0:9.880.1-1.fc32.x86_64
freefem++-0:4.4.2-2.fc32.x86_64
freefem++-0:4.6-1.fc32.x86_64
hypre-0:2.18.1-2.fc32.x86_64
mld2p4-serial-0:2.2.1-5.fc32.x86_64
octave-iso2mesh-0:1.9.1-5.fc32.x86_64
petsc-0:3.12.3-2.fc32.x86_64

I don't know what the equivalent in deb world is.

So I would manually check on some of the petsc dependencies

apt install libblas-dev

apt install libsuitesparse-dev

etc..

cc: Drew, perhaps has a better answer.

Satish



On Sun, 31 May 2020, Jeff Hammond wrote:

I understand a lot of these but how does PETSc depend on OpenCoarrays?

Obviously, I do not fault the PETSc developers for this, because I know they are not using coarray Fortran, but maybe somebody on this list knows
who is creating the Ubuntu packages for PETSc.

If there is a simple way to understand this using Apt, please share. I ran apt-rdepend but do not see any reference to the coarrays stuff, so I don't
know how it is getting included here.

Jeff

$ sudo apt-get install petsc-dev
[sudo] password for jrhammon:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  ksh libaec-dev libaec0 libamd2 libblas-dev libbtf1 *libcaf-openmpi-3
*libcamd2
libccolamd2 libcholmod3 *libcoarrays-openmpi-dev* libcolamd2

tl;dr: "apt-cache rdepends", "apt-rdepends -r"

Needed library dependencies get embedded in the shared libraries and can be read with objdump, $objdump -p /usr/lib/petscdir/petsc3.12/x86_64-linux-gnu-real/lib/libpetsc_real.so.3.12.4

But you're asking at package level for the reverse dependencies of a package, which other packages depend on a given package. There are a couple of tools for that.

apt-cache from the apt package is short and simple, using the rdepends action

$ apt-cache rdepends libcoarrays-openmpi-dev libcamd2 libcaf-openmpi-3
libcoarrays-openmpi-dev
Reverse Depends:
  libopenmpi-dev
libcamd2
Reverse Depends:
  libsuitesparse-dev
  libcholmod3
libcaf-openmpi-3
Reverse Depends:
  libcoarrays-openmpi-dev

"apt-cache show <pkg>" prints the description for the package, including its Dependencies. Handy for double-checking that rdepends is giving you reverse-dependencies, not dependencies (it's easy to forget if you're looking forwards or backwards).

apt-rdepends (in the apt-rdepends package) gives the whole chain right to the end, possibly Too Much Information. Despite the name, "apt-rdepends libcamd2" actually gives forward dependencies (what libcamd2 depends on) (in apt-rdepends it's r for recursive, not reverse). To find the chain of reverse dependencies in the opposite direction, use "apt-rdepends -r libcamd2".

"apt-rdepend -b" generates the list of build-dependencies that the package needs to build it (sadly "apt-rdepends -b -r" does not work, so it's less straightforward to know which other packages use it as a Reverse-Dependency)

apt-rdepends and apt-cache might miss some references (e.g. Suggests rather than Depends). This search from Rebecca Palmer can be useful for those cases pkg=libcamd2; grep-dctrl -w -F Pre-Depends,Depends,Recommends,Suggests -s Source "$pkg" /var/lib/apt/lists/*_debian_dists_unstable_main_binary-amd64_Packages ; grep-dctrl -w -s Package "$pkg" /var/lib/apt/lists/*_debian_dists_unstable_main_source_Sources

"apt-rdepends -r" libcamd2 tells us the chain is petsc - libcholmod3 - libcamd2
libcaf-openmpi-3 is needed by libcoarrays-openmpi-dev
libcoarrays-openmpi-dev is not a dependency for any package. It might be a build dependency for something, or possibly it's simply not used yet. Just an OpenMPI tool available for use.

In short, libcholmod3 from suitesparse uses libcamd2.

Reply via email to