Skip to content

Installation issue: hpcx_mpi/package.py does not set spec property libs #2908

@rickgrubin

Description

@rickgrubin

Steps to reproduce the issue

Package hpcx-mpi does not set property mpi_spec.libs. Using py-mpi4py as an example:

$ spack spec -l py-mpi4py %[email protected]
 -   vwgm2ef  [email protected] build_system=python_pip arch=linux-rocky9-zen4 %c,[email protected]
 -   fbl56cg      ^[email protected] build_system=generic arch=linux-rocky9-zen4 
[e]  riltp4w      ^[email protected] build_system=autotools arch=linux-rocky9-zen4 
[e]  rmzkvwd      ^[email protected]~amd+envmods~nvidia build_system=generic arch=linux-rocky9-zen4 
[e]  5qageij      ^[email protected]~classic-names+envmods~external-libfabric~generic-names~ilp64 build_system=generic arch=linux-rocky9-zen4 
[e]  gksnswy      ^[email protected] build_system=generic arch=linux-rocky9-zen4 
 -   dk366it      ^[email protected] build_system=python_pip arch=linux-rocky9-zen4 %c,[email protected]
 -   n6hcxsx      ^[email protected] build_system=generic arch=linux-rocky9-zen4 
 -   spapxky      ^[email protected] build_system=generic arch=linux-rocky9-zen4 
 -   c2xusrv      ^[email protected] build_system=generic arch=linux-rocky9-zen4 
 -   eeiae6j      ^[email protected]+bz2~crypt+ctypes+dbm~debug+libxml2+lzma~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3~ssl~tkinter+uuid+zlib build_system=generic patches:=13fa8bf,b0615b2,ebdca64,f2fd060 arch=linux-rocky9-zen4 %c,[email protected]
 -   mf7qgp5          ^[email protected]~debug~pic+shared build_system=generic arch=linux-rocky9-zen4 %[email protected]
 -   cszumlk              ^[email protected] build_system=autotools arch=linux-rocky9-zen4 %[email protected]
 -   iqbfpbl          ^[email protected]~libbsd build_system=autotools arch=linux-rocky9-zen4 %c,[email protected]
 -   rtbn2lq          ^[email protected] build_system=autotools arch=linux-rocky9-zen4 %[email protected]
 -   3zll3kj          ^[email protected]+bzip2+curses+git~libunistring+libxml2+pic+shared+tar+xz build_system=autotools arch=linux-rocky9-zen4 %c,[email protected]
 -   yol2fg7              ^[email protected] build_system=autotools libs:=shared,static arch=linux-rocky9-zen4 %[email protected]
 -   5mtj5ti              ^[email protected]~http+pic~python+shared build_system=autotools arch=linux-rocky9-zen4 %[email protected]
 -   j64qx3p              ^[email protected] build_system=autotools zip=pigz arch=linux-rocky9-zen4 %[email protected]
 -   xaqcrcy                  ^[email protected] build_system=makefile arch=linux-rocky9-zen4 %[email protected]
 -   fm4eeyz                  ^[email protected]+pic+programs build_system=makefile compression:=none libs:=shared,static arch=linux-rocky9-zen4 %c,[email protected]
 -   hlz6psw          ^[email protected]~guile build_system=generic arch=linux-rocky9-zen4 %[email protected]
[e]  hnozacw              ^[email protected]~binutils+bootstrap~graphite~mold~nvptx~piclibs~profiled~strip build_system=autotools build_type=RelWithDebInfo languages:='c,c++,fortran' arch=linux-rocky9-zen4 
[e]  67f6tf5              ^[email protected] build_system=generic arch=linux-rocky9-zen4 
 -   oiunrip          ^[email protected] build_system=autotools arch=linux-rocky9-zen4 %c,[email protected]
 -   bahahd3          ^[email protected]~symlinks+termlib abi=none build_system=autotools patches:=7a351bc arch=linux-rocky9-zen4 %c,[email protected]
 -   wkbnuc2          ^[email protected]+internal_glib build_system=autotools arch=linux-rocky9-zen4 %[email protected]
 -   ejztrif          ^[email protected] build_system=autotools patches:=1ea4349,24f587b,3d9885e,5911a5b,622ba38,6c8adf8,758e2ec,79572ee,a177edc,bbf97f1,c7b45ff,e0013d9,e065038 arch=linux-rocky9-zen4 %[email protected]
 -   vxx4oeu          ^[email protected]+column_metadata+dynamic_extensions+fts~functions+rtree build_system=autotools arch=linux-rocky9-zen4 %[email protected]
 -   7fk55rd          ^[email protected] build_system=autotools arch=linux-rocky9-zen4 %[email protected]
 -   ij6nkbd          ^[email protected]~pic build_system=autotools libs:=shared,static arch=linux-rocky9-zen4 %[email protected]
 -   3ntfatx          ^[email protected]+optimize+pic+shared build_system=makefile arch=linux-rocky9-zen4 %c,[email protected]
...


$ spack install --verbose --fail-fast --show-log-on-error --no-check-signature py-mpi4py %[email protected]

Error message

Error message
[...]
==> No binary for py-mpi4py-4.0.1-yz2axgmf3svvd5gq7qcmrmseip6cplb4 found: installing from source
==> Using cached archive: /scratch4/NCEPDEV/nems/Richard.Grubin/spack-stack/cache/source_cache/_source-cache/archive/f3/f3174b245775d556f4fddb32519a2066ef0592edc810c5b5a59238f9a0a40c89.tar.gz
==> No patches needed for py-mpi4py
==> py-mpi4py: Executing phase: 'install'
[...]
==> [2025-12-29-21:07:34.788299] Find complete: ['/apps/hpcx-v2.18.1-gcc-mlnx_ofed-redhat9-cuda12-x86_64/ompi-mt-oneapi2025/include'] ['*.h', '*.hpp', '*.hxx', '*.hh', '*.H', '*.txx', '*.tcc', '*.icc', '*.mod', '*.inc']
==> [2025-12-29-21:07:34.790453] Find (max depth = None): ['/apps/hpcx-v2.18.1-gcc-mlnx_ofed-redhat9-cuda12-x86_64/ompi-mt-oneapi2025/lib'] ['libhpcx?mpi.so']
==> [2025-12-29-21:07:34.790647] Find complete: ['/apps/hpcx-v2.18.1-gcc-mlnx_ofed-redhat9-cuda12-x86_64/ompi-mt-oneapi2025/lib'] ['libhpcx?mpi.so']
==> [2025-12-29-21:07:34.790686] Find (max depth = None): ['/apps/hpcx-v2.18.1-gcc-mlnx_ofed-redhat9-cuda12-x86_64/ompi-mt-oneapi2025'] ['libhpcx?mpi.so']
==> [2025-12-29-21:07:34.815791] Find complete: ['/apps/hpcx-v2.18.1-gcc-mlnx_ofed-redhat9-cuda12-x86_64/ompi-mt-oneapi2025'] ['libhpcx?mpi.so']
==> [2025-12-29-21:07:34.815868] Find (max depth = None): ['/apps/hpcx-v2.18.1-gcc-mlnx_ofed-redhat9-cuda12-x86_64/ompi-mt-oneapi2025/lib'] ['libhpcx?mpi.a']
==> [2025-12-29-21:07:34.816052] Find complete: ['/apps/hpcx-v2.18.1-gcc-mlnx_ofed-redhat9-cuda12-x86_64/ompi-mt-oneapi2025/lib'] ['libhpcx?mpi.a']
==> [2025-12-29-21:07:34.816085] Find (max depth = None): ['/apps/hpcx-v2.18.1-gcc-mlnx_ofed-redhat9-cuda12-x86_64/ompi-mt-oneapi2025'] ['libhpcx?mpi.a']
==> [2025-12-29-21:07:34.839537] Find complete: ['/apps/hpcx-v2.18.1-gcc-mlnx_ofed-redhat9-cuda12-x86_64/ompi-mt-oneapi2025'] ['libhpcx?mpi.a']
==> Error: NoLibrariesError: Unable to recursively locate hpcx-mpi libraries in /apps/hpcx-v2.18.1-gcc-mlnx_ofed-redhat9-cuda12-x86_64/ompi-oneapi2025

/scratch4/NCEPDEV/nems/Richard.Grubin/spack-stack/repos/builtin/repos/spack_repo/builtin/packages/py_mpi4py/package.py:67, in create_mpi_config_file:
     64    """
     65    mpi_spec = self.spec["mpi"]
     66    include_dirs = mpi_spec.headers.directories
 >>  67    library_dirs = mpi_spec.libs.directories
     68    with open(cfg_fn, "w") as cfg:
     69      cfg.write("[mpi]\n")
     70      cfg.write("mpi_dir       = {}\n".format(mpi_spec.prefix))

Information on your system

* **Spack:** 1.0.1 (https://github.com/spack/spack/commit/553caf208c8d5983bf86d6eb7c63fcb546095b7d)
* **Builtin repo:** /scratch4/NCEPDEV/nems/Richard.Grubin/spack-stack/repos/builtin/repos/spack_repo/builtin (58a2d58)
* **Python:** 3.9.18
* **Platform:** linux-rocky9-zen4

Additional information

spack-build-env.txt
spack-build-out.txt

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have run spack maintainers <name-of-the-package> and @mentioned any maintainers
  • I have uploaded the build log and environment files
  • I have searched the issues of this repo and believe this is not a duplicate

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions