Execution

In the Execution area of a task definition you can specify whether the evaluator will execute the task using a command or script as well as conditions under which an evaluator should terminate the task.

Execute By

Choose either Command or Script.

  • If Command is selected, enter either the Windows command or Linux shell command to be executed. There are special placeholders or variables, which are defined using a % syntax, that pass information to the command. Some important placeholders are:

    %executable%

    Replaced with the path to the application's executable, like AnsysFW.exe or runwb2 in the case of Workbench on Windows or Linux, respectively.

    %file:name_of_the_file%

    Replaced with paths to input or output files that are defined in the Files area.

    If needed, you can also access these placeholders in the command:

    • %memory%

    • %num_cores%

    • %disk_space%

    • %platform%

    Here is a typical command for executing Mechanical APDL (MAPDL):

  • If Script is selected, click Upload Script and upload the script to use. To view or edit the uploaded script, click Edit Script. The script is displayed in an onscreen text editor. To save changes the script, click Apply. To discard your changes, click Revert.

Maximum Execution Time

Maximum time in seconds for executing the task. A value of 0 means that there is no time limit. If a time limit is set, and an evaluation is not completed within the time limit, the evaluator assumes something is wrong and stops, changing the status of the job to timeout. For more information, see Job Lifecycle and Evaluation Status.

Execution Level

When a job definition contains multiple tasks, the execution level determines the sequence for executing tasks. All tasks set to 0 can be evaluated at the same time, supporting an interesting workflow if there are multiple unrelated load cases.

Number of Attempts

Maximum number of attempts to make to evaluate the task. The default is 1. However, if you expect that job failures are related to licensing issues on a particular evaluator, you can increase the number of attempts so that a failed job automatically goes from failed to pending, allowing it to then be picked up by another evaluator. In a job's details you can see if the evaluation is running in the first attempt, second attempt, or so on.

Context Entries

Settings available to define the context of the solution. Settings such as additional_args and mpi_type are common to many solvers, while other settings are solver-specific. For Mechanical APDL, for example, you can see an amfg setting that can be used to enable the additive manufacturing capability in Mechanical simulations.

To add a context entry, click Add Context Entry and select either String, Integer, Float, or Boolean. These are described below.

String

A string is a data type that represents text. It is composed of a sequence of characters that can include letters, spaces, and numbers.

Integer

An integer is a data type used to represent real numbers that do not have fractional values. It is a numerical value that can be positive, negative, or zero.

Float

A float is a data type that represents a fraction in decimal format.

Boolean

A Boolean is a data type that has one of two possible values (usually True/False or On/Off).

Environment Variables

Variables available to the application during runtime.

To add an environment variable, click Add Environment Variable and then specify the variable's name and value: