You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Returns ``True`` if the `mpi4py` package is installed and MPI returns a world size greater than 1."""
ifnot_MPI4PY_AVAILABLE:
returnFalse
frommpi4pyimportMPI
returnMPI.COMM_WORLD.Get_size() >1
I interpret when MPI is installed, and the world size is > 1, the Trainer will detect that it is running on an MPI cluster. If you're not launching on an MPI cluster, then I guess this will not work and the hang is understandable. Can I ask what you have mpi4py installed for and did you intend to run on an MPI cluster or not?
Bug description
Trainer freezes on initialization when mpi4py is installed.
I suspect the following issues are encountering the same problem: #18836 #19768
What version are you seeing the problem on?
master
How to reproduce the bug
This freezes
pip install lightning mpi4py python -c "import lightning; lightning.Trainer(accelerator='cpu')"
This does not freeze
pip install lightning python -c "import lightning; lightning.Trainer(accelerator='cpu')"
Error messages and logs
No response
Environment
Current environment
Conda environment that freezes:
cc @awaelchli
The text was updated successfully, but these errors were encountered: