triqs_dftkit.qe.driver.MPIHandler
- class triqs_dftkit.qe.driver.MPIHandler(mpi_exec: str = 'mpirun', n_cores: int = 1)[source]
Handles MPI configuration and execution environment for parallel DFT calculations.
This class encapsulates MPI-related configuration and provides utilities for running parallel executables with proper environment variable handling.
Examples
>>> mpi_handler = MPIHandler(mpi_exec="mpirun -np 4", n_cores=4) >>> env = mpi_handler.get_env_vars()
- Attributes:
- mpi_execstr
The MPI executor command (e.g., “mpirun”, “mpiexec”, “srun”).
- n_coresint
Number of MPI processes/cores to use for parallel execution.
Methods
|
|
Retrieve essential environment variables for subprocess execution. |
|
Check if this is the master MPI node. |
|
|
Report a message (only from master MPI node). |
Attributes