{"id":27060,"library":"impi-rt","title":"Intel MPI Library Python Bindings","description":"The impi-rt package provides Python bindings for Intel MPI Library, enabling high-performance message passing for parallel computing. Currently at version 2021.18.0, it follows Intel's release cadence tied to Intel MPI releases. It is a runtime-only package intended for executing MPI applications; the development package (impi-devel) is separate.","status":"active","version":"2021.18.0","language":"python","source_language":"en","source_url":"https://github.com/IntelPython/impi-rt","tags":["mpi","intel","hpc","parallel-computing"],"install":[{"cmd":"pip install impi-rt","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Many users use impi-rt with mpi4py for MPI bindings; impi-rt itself provides the runtime, mpi4py provides the Python interface.","package":"mpi4py","optional":true}],"imports":[{"note":"impi-rt is a runtime library, not a Python module with MPI symbols. Use mpi4py to access MPI functionality.","wrong":"import impi_rt or from impi_rt import MPI","symbol":"MPI","correct":"from mpi4py import MPI"}],"quickstart":{"code":"from mpi4py import MPI\nimport numpy as np\n\ncomm = MPI.COMM_WORLD\nrank = comm.Get_rank()\nsize = comm.Get_size()\ndata = np.array([rank + 1], dtype=np.int32)\nif rank == 0:\n    comm.Send(data, dest=1)\n    print(f\"Rank 0 sent {data[0]}\")\nelif rank == 1:\n    recv = np.zeros(1, dtype=np.int32)\n    comm.Recv(recv, source=0)\n    print(f\"Rank 1 received {recv[0]}\")\n","lang":"python","description":"Basic MPI send/receive using mpi4py with Intel MPI runtime. Run with 'mpirun -np 2 python script.py'."},"warnings":[{"fix":"Install impi-devel (or intel-oneapi-mpi-devel) for development headers and compiler wrappers.","message":"impi-rt is the runtime package; for development, install impi-devel. Without impi-devel, you cannot compile MPI applications but can run them if the runtime is present.","severity":"gotcha","affected_versions":"all"},{"fix":"Use conda: conda install -c intel intelmpi -c intel mpi4py","message":"Intel has transitioned from pypi impi-rt to conda/OneAPI packages. The PyPI version is outdated (2021.18.0) and may not be actively maintained. Use conda with intelmpi for newer versions.","severity":"breaking","affected_versions":"2021.18.0"},{"fix":"Use mpi4py: from mpi4py import MPI; rank = MPI.COMM_WORLD.Get_rank()","message":"MPI_Comm_rank and similar MPI functions are not directly available via impi-rt; you must use mpi4py bindings.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Do not import impi_rt directly. Use mpi4py: from mpi4py import MPI","cause":"Users incorrectly try to import from impi_rt as if it were a Python module.","error":"ImportError: No module named impi_rt"},{"fix":"Ensure impi-rt is installed and set LD_LIBRARY_PATH to include the Intel MPI library directory (e.g., /opt/intel/mpi/lib). Alternatively, use mpirun which sets environment automatically.","cause":"LD_LIBRARY_PATH not set or Intel MPI runtime not installed correctly.","error":"OSError: libmpi.so: cannot open shared object file"},{"fix":"Install Intel MPI via system package or conda (conda install -c intel intelmpi) which includes mpirun.","cause":"Intel MPI launcher not in PATH; only the Python package impi-rt is installed, not the full Intel MPI installation.","error":"mpirun: command not found"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}