RAMpiSettings#

class ansys.rocky.app.ra_mpi_settings.RAMpiSettings(id: str, model_id: str | None = None)#

Bases: ansys.rocky.app.api_element_item.ApiElementItem

Rocky PrePost Scripting wrapper for the MPI Execution Settings.

Access it from the RASimulatorRun with:

simulator_run = study.GetSimulatorRun()
mpi_settings = simulator_run.GetMpiSettings()
mpi_settings.GetNumberOfProcessors()

Overview#

GetExtraParams

Get the value of “Extra Params”.

SetExtraParams

Set the value of “Extra Params”.

GetHeterogeneous

Get the value of “Heterogeneous”.

SetHeterogeneous

Set the value of “Heterogeneous”.

EnableHeterogeneous

Set the value of “Heterogeneous” to True.

DisableHeterogeneous

Set the value of “Heterogeneous” to False.

IsHeterogeneousEnabled

Check if the “Heterogeneous” is enabled.

GetHostfile

Get the value of “Hostfile”.

SetHostfile

Set the value of “Hostfile”.

GetNumberOfProcessors

Get the value of “Number of Processors”.

SetNumberOfProcessors

Set the value of “Number of Processors”.

GetNumberOfThreadsPerProcess

Get the value of “Number of Threads Per Process”.

SetNumberOfThreadsPerProcess

Set the value of “Number of Threads Per Process”.

GetProcessingUnit

Get “Processing Unit” as a string.

SetProcessingUnit

Set the value of “Processing Unit”.

GetValidProcessingUnitValues

Get a list of all possible values for “Processing Unit”.

GetSlicingDirection

Get “Slicing Direction” as a string.

SetSlicingDirection

Set the value of “Slicing Direction”.

GetValidSlicingDirectionValues

Get a list of all possible values for “Slicing Direction”.

GetTargetGpu

Get the value of “Target Gpu”.

SetTargetGpu

Set the value of “Target Gpu”.

Import detail#

from ansys.rocky.app.ra_mpi_settings import RAMpiSettings

Method detail#

classmethod RAMpiSettings.GetWrappedClass() → type[rocky30.models.solver.general_settings.MpiSettings]#
classmethod RAMpiSettings.GetClassName() → str#
RAMpiSettings.GetExtraParams() → str#

Get the value of “Extra Params”.

RAMpiSettings.SetExtraParams(value: str) → None#

Set the value of “Extra Params”.

Parameters:

value – The value to set.

RAMpiSettings.GetHeterogeneous() → bool#

Get the value of “Heterogeneous”.

RAMpiSettings.SetHeterogeneous(value: bool) → None#

Set the value of “Heterogeneous”.

Parameters:

value – The value to set.

RAMpiSettings.EnableHeterogeneous() → None#

Set the value of “Heterogeneous” to True.

RAMpiSettings.DisableHeterogeneous() → None#

Set the value of “Heterogeneous” to False.

RAMpiSettings.IsHeterogeneousEnabled() → bool#

Check if the “Heterogeneous” is enabled.

RAMpiSettings.GetHostfile() → str#

Get the value of “Hostfile”.

RAMpiSettings.SetHostfile(value: str) → None#

Set the value of “Hostfile”.

Parameters:

value – The value to set.

RAMpiSettings.GetNumberOfProcessors() → int#

Get the value of “Number of Processors”.

RAMpiSettings.SetNumberOfProcessors(value: str | int) → None#

Set the value of “Number of Processors”.

Parameters:

value – The value to set. This value can be an expression with input variables or int type.

RAMpiSettings.GetNumberOfThreadsPerProcess() → int#

Get the value of “Number of Threads Per Process”.

RAMpiSettings.SetNumberOfThreadsPerProcess(value: str | int) → None#

Set the value of “Number of Threads Per Process”.

Parameters:

value – The value to set. This value can be an expression with input variables or int type.

RAMpiSettings.GetProcessingUnit() → str#

Get “Processing Unit” as a string.

Returns:

The returned value will be one of [‘CPU’, ‘GPU’, ‘MULTI_GPU’].

RAMpiSettings.SetProcessingUnit(value: str) → None#

Set the value of “Processing Unit”.

Parameters:

value – The value to set. Must be one of [‘CPU’, ‘GPU’, ‘MULTI_GPU’].

Raises:

RockyApiError – If value is not a valid “Processing Unit” option.

RAMpiSettings.GetValidProcessingUnitValues() → list[str]#

Get a list of all possible values for “Processing Unit”.

Returns:

The returned list is [‘CPU’, ‘GPU’, ‘MULTI_GPU’].

RAMpiSettings.GetSlicingDirection() → str#

Get “Slicing Direction” as a string.

Returns:

The returned value will be one of [‘X_Parallel’, ‘Y_Parallel’, ‘Z_Parallel’].

RAMpiSettings.SetSlicingDirection(value: str) → None#

Set the value of “Slicing Direction”.

Parameters:

value – The value to set. Must be one of [‘X_Parallel’, ‘Y_Parallel’, ‘Z_Parallel’].

Raises:

RockyApiError – If value is not a valid “Slicing Direction” option.

RAMpiSettings.GetValidSlicingDirectionValues() → list[str]#

Get a list of all possible values for “Slicing Direction”.

Returns:

The returned list is [‘X_Parallel’, ‘Y_Parallel’, ‘Z_Parallel’].

RAMpiSettings.GetTargetGpu() → int#

Get the value of “Target Gpu”.

RAMpiSettings.SetTargetGpu(value: str | int) → None#

Set the value of “Target Gpu”.

Parameters:

value – The value to set. This value can be an expression with input variables or int type.