pub struct Mpi4PyInstaller { /* private fields */ }Expand description
The MPI4Py installer.
Implementations§
Source§impl Mpi4PyInstaller
impl Mpi4PyInstaller
Sourcepub fn new(config: Mpi4PyConfig) -> Self
pub fn new(config: Mpi4PyConfig) -> Self
Create a new MPI4Py installer with the given config.
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create with default config.
Sourcepub fn detect_mpi(&self) -> MpiImplementation
pub fn detect_mpi(&self) -> MpiImplementation
Detect the MPI implementation on the system.
Checks for mpirun/mpiexec and identifies the implementation.
Sourcepub fn detect_mpi_path(&self) -> PathBuf
pub fn detect_mpi_path(&self) -> PathBuf
Detect the MPI installation path.
Checks common paths in order:
- /usr/lib64/openmpi
- /opt/openmpi
- /usr/lib/openmpi
- Derived from mpirun location
Sourcepub fn build_system_mpi_install_command(
&self,
distro: &DistroFacade,
) -> ShellCommand
pub fn build_system_mpi_install_command( &self, distro: &DistroFacade, ) -> ShellCommand
Construct the system package install command for MPI.
Returns the correct command based on distro family:
- apt:
sudo apt-get install -y libopenmpi-dev openmpi-bin - dnf:
sudo dnf install -y openmpi openmpi-devel - pacman:
sudo pacman -S --noconfirm openmpi - zypper:
sudo zypper install -y openmpi openmpi-devel
Sourcepub fn build_pip_install_command(&self, mpi_path: &Path) -> ShellCommand
pub fn build_pip_install_command(&self, mpi_path: &Path) -> ShellCommand
Construct the pip install command for mpi4py with correct env vars.
Sets MPICC and MPICXX environment variables pointing to the MPI installation’s compiler wrappers.
Auto Trait Implementations§
impl Freeze for Mpi4PyInstaller
impl RefUnwindSafe for Mpi4PyInstaller
impl Send for Mpi4PyInstaller
impl Sync for Mpi4PyInstaller
impl Unpin for Mpi4PyInstaller
impl UnsafeUnpin for Mpi4PyInstaller
impl UnwindSafe for Mpi4PyInstaller
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more