conda-forge / mpi4py-feedstock

A conda-smithy repository for mpi4py.
BSD 3-Clause "New" or "Revised" License
4 stars 20 forks source link

OpenMPI 5 is not supported #72

Closed LourensVeen closed 3 months ago

LourensVeen commented 3 months ago

Solution to issue cannot be found in the documentation.

Issue

I'm trying to build some packages that use MPI, and I'm getting dependency errors. I've traced it down at least in part to mpi4py not being compatible with openmpi version 5 or up:

conda install 'openmpi >=4,<5.0a0' mpi4py works, but conda install 'openmpi >=5' mpi4py doesn't. The error isn't very helpful, but here it is:

$ conda install 'openmpi >=5' mpi4py
Channels:
 - conda-forge
 - defaults
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - nothing provides openmpi 3.0.* needed by mpi4py-3.0.0-openmpi_1

Could not solve for environment specs
The following packages are incompatible
├─ mpi4py is installable with the potential options
│  ├─ mpi4py [2.0.0|3.0.0|...|3.1.6] would require
│  │  └─ mpich [ |3.2.* |...|>=4.2.0,<5.0a0 ], which requires
│  │     └─ mpi 1.0 mpich, which can be installed;
│  ├─ mpi4py 3.0.0 would require
│  │  └─ openmpi 3.0.* , which does not exist (perhaps a missing channel);
│  ├─ mpi4py [3.0.0|3.0.1] would require
│  │  └─ openmpi >=3.1,<3.2.0a0 , which can be installed;
│  ├─ mpi4py [3.0.2|3.0.3] would require
│  │  └─ openmpi >=4.0,<5.0.0a0 , which can be installed;
│  ├─ mpi4py [3.0.3|3.1.0|3.1.1|3.1.2|3.1.3] would require
│  │  └─ openmpi >=4.1,<4.2.0a0 , which can be installed;
│  ├─ mpi4py 3.1.3 would require
│  │  └─ openmpi >=4.1.3,<5.0a0 , which can be installed;
│  ├─ mpi4py [3.1.3|3.1.4] would require
│  │  └─ openmpi >=4.1.4,<5.0a0 , which can be installed;
│  ├─ mpi4py 3.1.4 would require
│  │  └─ openmpi >=4.1.5,<5.0a0 , which can be installed;
│  ├─ mpi4py [3.1.5|3.1.6] would require
│  │  └─ openmpi >=4.1.6,<5.0a0 , which can be installed;
│  ├─ mpi4py [3.1.5|3.1.6] would require
│  │  └─ impi_rt [>=2021.11.0,<2021.11.1.0a0 |>=2021.12.0,<2021.12.1.0a0 ], which requires
│  │     └─ mpi 1.0 impi, which can be installed;
│  └─ mpi4py [3.0.3|3.1.4] would require
│     └─ openmpi >=4.0,<4.1.0a0 , which can be installed;
└─ openmpi >=5  is not installable because it requires
   └─ mpi 1.0 openmpi, which conflicts with any installable versions previously reported.

conda install 'openmpi >=5' does work, OpenMPI 5 was released at the end of last year.

I'm still trying to figure out why conda is insisting on using OpenMPI 5, as I'm not specifying that anywhere, but perhaps a variant could be added for this?

Related: https://github.com/conda-forge/mpi4py-feedstock/issues/36

Installed packages

$ conda list
# packages in environment at /home/lourens/.miniconda3/envs/amuse-conda-test:
#
# Name                    Version                   Build  Channel

Environment info

$ conda info

     active environment : amuse-conda-test
    active env location : /home/lourens/.miniconda3/envs/amuse-conda-test
            shell level : 1
       user config file : /home/lourens/.condarc
 populated config files : /home/lourens/.condarc
          conda version : 24.1.2
    conda-build version : 3.27.0
         python version : 3.9.18.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=zen3
                          __conda=24.1.2=0
                          __glibc=2.35=0
                          __linux=5.15.0=0
                          __unix=0=0
       base environment : /home/lourens/.miniconda3  (writable)
      conda av data dir : /home/lourens/.miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/lourens/.miniconda3/pkgs
                          /home/lourens/.conda/pkgs
       envs directories : /home/lourens/.miniconda3/envs
                          /home/lourens/.conda/envs
               platform : linux-64
             user-agent : conda/24.1.2 requests/2.31.0 CPython/3.9.18 Linux/5.15.0-91-generic ubuntu/22.04.3 glibc/2.35 solver/libmamba conda-libmamba-solver/23.11.1 libmambapy/1.5.8
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False
dalcinl commented 3 months ago

I can reproduce the issue. @minrk Any idea what could be going on? Are we just needing a rebuild?

leofang commented 3 months ago

It's because the global pinning is still at Open MPI 4 not 5: https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/e3d4a72a7a35de6c19949dca3ff0c50161879cf7/recipe/conda_build_config.yaml#L708-L709 There's a migrator ready to go (https://github.com/conda-forge/conda-forge-pinning-feedstock/pull/5296) but for some reason no one merged that PR. Once merged, the bot will kick off an infrastructure-wide package rebuild.

dalcinl commented 3 months ago

Thanks, @leofang ... in the meantime and FWIW I approved conda-forge/conda-forge-pinning-feedstock#5296, and pinged the core team.

dalcinl commented 3 months ago

@LourensVeen Everything should be working now. Could you please try again?

LourensVeen commented 3 months ago

Works as advertised, thanks for the quick fix!