On 2023-12-27 09:51, Alastair McKinstry wrote:
On 27/12/2023 08:45, Drew Parsons wrote:
...
I guess the problem must be the common files from openmpi-common in
/usr/share/openmpi/. They're not actually arch-independent. Do
mpif90.openmpi and the other components actively read them at runtime?
..
This appears to be it. I've been building on arm64 recently (a VM on a
mac) and don't see this.
There appears to be a mechanism for including ${includedir} and
${libdir} and evaluating the wrapper-data files at runtime. My hacking
on these files in d/rules is causing the errors. I'll work on a better
solution.
I can see at the lowest level the location is pkgdatadir at l.110 (and
elsewhere) in ompi/tools/wrappers/Makefile.am
Not clear if hacking it at that point will interfere with the orterun
binary finding them.
If not, then it could in principle be replaced with something like
$(pkglibdir)/$(datadir) (i.e. in a share subdir under the openmpi
libdir). Might call it "pkglibdatadir".
The default value for pkgdatadir is set as $(datadir)/@PACKAGE@, l.129
in toplevel Makefile.in
datadir is the autotool default ${prefix}/share (i.e. /usr/share),
https://www.gnu.org/software/automake/manual/html_node/Standard-Directory-Variables.html
If orterun can be trained to look for the wrapper txt files in
pkglibdatadir (presumably as well as pkgdatadir, not instead of), then
setting and using "pkglibdatadir" instead of pkgdatadir in
ompi/tools/wrappers/Makefile.am "might" be simple and reliable.
Reliability depends on whether any other component uses these wrapper
txt files.