releso.spor.MPIClusterMultiProcessor
- class releso.spor.MPIClusterMultiProcessor(*, save_location: Path, logger_name: str | None = None, command: str = '$MPIEXEC', max_core_count: ConstrainedIntValue, always_use: bool = False, location: Literal['cluster'], mpi_flags_variable: str = '$FLAGS_MPI_BATCH')
Bases:
MultiProcessorMulti-processor extension for the cluster MPI call.
- __init__(**data: Any) None
Constructor for the ReLeSO basemodel object.
Methods
convert_to_pathlib_add_datetime(v)Add timestamp to save_location, of applicable.
get_command(core_count)Return the string that represents the call for multiprocessing.
get_logger()Gets the currently defined environment logger.
set_logger_name_recursively(logger_name)Set the logger_name variable for all child elements.
Attributes
The location title needs to be set to
clusterso thatcommand prefix which is needed to parallelize the give task
additional flags for the mpi call.
max_core_countMax core count to use for this parallelization option.
always_useWhether or not to always use the multiprocessing option.
save_locationDefinition of the save location of the logs and validation results.
logger_namename of the logger.
- command: str
command prefix which is needed to parallelize the give task
- get_command(core_count: int) str
Return the string that represents the call for multiprocessing.
Note
Since the cluster uses PATH variables for its computation. This function will read these in and use them correspondingly. But will not change them. This limitation is done so that there is less interference during Multi-Environment training.
- Parameters:
core_count (int) – Number of wanted cores.
- Raises:
RuntimeError – This error is thrown if the mpi_flags PATH variable
is not of the shape expected by the function. Expected are 2 parts –
-np [core_count] where -np can be anything and the core_count –
should be a number. –
- Returns:
string representing the command line call prefix
- Return type:
str
- location: Literal['cluster']
The location title needs to be set to
clusterso that
- mpi_flags_variable: str
additional flags for the mpi call.