Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Using modin with APT-installed MPI on linux doesn't work #7421

Open
3 tasks done
sfc-gh-mvashishtha opened this issue Jan 15, 2025 · 2 comments
Open
3 tasks done
Labels
bug 🦗 Something isn't working

Comments

@sfc-gh-mvashishtha
Copy link
Contributor

Modin version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest released version of Modin.

  • I have confirmed this bug exists on the main branch of Modin. (In order to do this you can follow this guide.)

Reproducible Example

sudo apt install libmpich-dev
python -m pip install -e "modin[mpi]"
MODIN_ENGINE=unidist UNIDIST_BACKEND=mpi mpiexec -n 1 python -c "import modin.pandas as pd; print(pd.DataFrame([1,2,3]))"

Issue Description

MPI fails to start and gives errors like Error in spawn call. Example: https://github.com/modin-project/modin/actions/runs/12753981920/job/35546821512?pr=7420#logs

Expected Behavior

modin[mpi] should run without error.

Error Logs

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/runner/work/modin/modin/modin/logging/logger_decorator.py", line 144, in run_and_log
    return obj(*args, **kwargs)
  File "/home/runner/work/modin/modin/modin/pandas/dataframe.py", line 203, in __init__
    distributed_frame = from_non_pandas(data, index, columns, dtype)
  File "/home/runner/work/modin/modin/modin/pandas/io.py", line 972, in from_non_pandas
    new_qc = FactoryDispatcher.from_non_pandas(df, index, columns, dtype)
  File "/home/runner/work/modin/modin/modin/core/execution/dispatching/factories/dispatcher.py", line 177, in from_non_pandas
    return cls.get_factory()._from_non_pandas(*args, **kwargs)
  File "/home/runner/work/modin/modin/modin/core/execution/dispatching/factories/dispatcher.py", line 115, in get_factory
    Engine.subscribe(_update_engine)
  File "/home/runner/work/modin/modin/modin/config/pubsub.py", line 295, in subscribe
    callback(cls)
  File "/home/runner/work/modin/modin/modin/pandas/__init__.py", line 133, in _update_engine
    initialize_unidist()
  File "/home/runner/work/modin/modin/modin/core/execution/unidist/common/utils.py", line 41, in initialize_unidist
    unidist.init()
  File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/unidist/api.py", line 92, in init
    init_backend()
  File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/unidist/core/base/utils.py", line 28, in init_backend
    initialize_mpi()
  File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/unidist/core/backends/mpi/utils.py", line 12, in initialize_mpi
    init()
  File "/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/unidist/core/backends/mpi/core/controller/api.py", line [234](https://github.com/modin-project/modin/actions/runs/12753981920/job/35546821512?pr=7420#step:6:235), in init
    intercomm = MPI.COMM_SELF.Spawn(
  File "src/mpi4py/MPI.src/Comm.pyx", line 2544, in mpi4py.MPI.Intracomm.Spawn
mpi4py.MPI.Exception: Other MPI error, error stack:
internal_Comm_spawn(77171)..: MPI_Comm_spawn(command=/opt/hostedtoolcache/Python/3.9.21/x64/bin/python, argv=0x7fd906bd26d0, maxprocs=5, info=0x9c000000, 0, MPI_COMM_SELF, intercomm=0x7fd906bd2680, array_of_errcodes=(nil)) failed
MPID_Comm_spawn_multiple(85): Error in spawn call

Installed Versions

I don't know; I don't have a linux machine, and we saw this issue in CI on ubuntu: https://github.com/modin-project/modin/actions/runs/12753981920/job/35546821512?pr=7420#logs

@sfc-gh-mvashishtha sfc-gh-mvashishtha added the bug 🦗 Something isn't working label Jan 15, 2025
@anmyachev
Copy link
Collaborator

Thanks @sfc-gh-mvashishtha!

sfc-gh-mvashishtha added a commit that referenced this issue Jan 16, 2025
- Use Miniforge3 instead of Mambaforge in conda-incubator/setup-miniconda action, per conda-incubator/setup-miniconda#383
- Skip test that tries to use Modin with unidist installed via APT. See #7421 for details.
- Remove manual conda packaging caching, an optimization which was added to speed up CI but now causes an error complaining that `CONDA_PKGS_DIR` is empty.
- Fix some mypy errors in modin/__init__.py
@anmyachev
Copy link
Collaborator

Related commit in mpi4py: mpi4py/mpi4py@1e4e7f2

anmyachev added a commit to anmyachev/modin that referenced this issue Jan 17, 2025
mvashishtha pushed a commit that referenced this issue Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🦗 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants