RALocalExecutionSettings#

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

Bases: ansys.rocky.app.api_element_item.ApiElementItem

Rocky PrePost Scripting wrapper for the Local Execution Settings.

Access it from the RASimulatorRun with:

simulator_run = study.GetSimulatorRun()
local_execution_settings = simulator_run.GetLocalExecutionSettings()
local_execution_settings.GetNumberOfProcessors()

Overview#

GetTargetGpus

return:

A list of IDs of the GPUs currently selected for Multi GPU simulation.

SetTargetGpus

It will configure the IDs of GPUs that will be used in a local simulation based on the list of IDs or

GetMultiGpuSlicingDirection

Get “Multi Gpu Slicing Direction” as a string.

SetMultiGpuSlicingDirection

Set the value of “Multi Gpu Slicing Direction”.

GetValidMultiGpuSlicingDirectionValues

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

GetNumberOfProcessors

Get the value of “Number of Processors”.

SetNumberOfProcessors

Set the value of “Number of Processors”.

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”.

GetTargetGpu

Get the value of “Target Gpu”.

SetTargetGpu

Set the value of “Target Gpu”.

Import detail#

from ansys.rocky.app.ra_local_execution_settings import RALocalExecutionSettings

Method detail#

classmethod RALocalExecutionSettings.GetWrappedClass() → type[rocky30.models.solver.general_settings.LocalExecutionSettings]#
classmethod RALocalExecutionSettings.GetClassName() → str#
RALocalExecutionSettings.GetTargetGpus() → list[int]#
Returns:

A list of IDs of the GPUs currently selected for Multi GPU simulation.

RALocalExecutionSettings.SetTargetGpus(gpus: list[int | str]) → None#

It will configure the IDs of GPUs that will be used in a local simulation based on the list of IDs or names of GPUs passed.

Parameters:

gpus – List with IDs or names of GPUs to be used in simulation. For example in the name “1 - Geforce GTX 980”, the ID is 1 and the name is “1 - Geforce GTX 980”.

RALocalExecutionSettings.GetMultiGpuSlicingDirection() → str#

Get “Multi Gpu Slicing Direction” as a string.

Returns:

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

RALocalExecutionSettings.SetMultiGpuSlicingDirection(value: str) → None#

Set the value of “Multi Gpu 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 “Multi Gpu Slicing Direction” option.

RALocalExecutionSettings.GetValidMultiGpuSlicingDirectionValues() → list[str]#

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

Returns:

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

RALocalExecutionSettings.GetNumberOfProcessors() → int#

Get the value of “Number of Processors”.

RALocalExecutionSettings.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.

RALocalExecutionSettings.GetProcessingUnit() → str#

Get “Processing Unit” as a string.

Returns:

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

RALocalExecutionSettings.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.

RALocalExecutionSettings.GetValidProcessingUnitValues() → list[str]#

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

Returns:

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

RALocalExecutionSettings.GetTargetGpu() → int#

Get the value of “Target Gpu”.

RALocalExecutionSettings.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.