8.3.3. Custom Integration Environment Variables

Workbench/RSM makes job settings available to custom commands via environment variables. Some environment variables are set automatically by RSM at runtime, providing necessary information to the custom scripts or executables in the HPC commands file. Other environment variables can be set by your RSM administrator, if appropriate to your job management process.

8.3.3.1. Environment Variables Set by RSM

RSM will set the following environment variables at runtime, communicating job-specific data to the HPC commands. These variables will need to be used in your scripts to do the job handling.

Environment VariableDescription
RSM_HPC_CLUSTER_TARGET_PLATFORM

Set as "Windows" or "Linux". Defines the platform on which the final scripts are meant to run.

RSM_HPC_CORES

The number of cores requested by the user for the job.

RSM_HPC_DISTRIBUTED

Indicates whether a distributed (multi-node) cluster job is allowed.

Set to TRUE if the target solver (specified in RSM_HPC_JOBTYPE) supports distributed execution.

Set to FALSE if cores can be used on only one node.

RSM_HPC_FILE_LOCAL_DIRUsed only by storage commands/scripts. Specifies the directory on the client machine from/to which files are transferred.
RSM_HPC_FILE_REMOTE_DIRUsed only by storage commands/scripts. Specifies the directory on the remote machine from/to which files are transferred.
RSM_HPC_FILECONTEXT

Used only by storage commands/scripts. Specifies the context in which files are being transferred in case any special handling is required. Possible values are CANCEL, INPUTS, INQUIRE, and OUTPUTS.

RSM_HPC_FILEDIRECTION

Used only by storage commands/scripts. Specifies the direction of file transfers. Possible values are UPLOAD (which moves files from the client to the cluster) or DOWNLOAD (which moves files from the cluster to the client).

RSM_HPC_FILEEXCLUDEUsed only by storage commands/scripts, and only if exclusions exist. Semi-colon delimited list of files to exclude from transfer.
RSM_HPC_FILELIST

Used only by storage commands/scripts. Semi-colon delimited list of files to transfer for the job submission or status request. Dynamically generated because the list can depend on the job type or the specific UI action. May contain wildcards.

RSM_HPC_FILEUPLOADTRACKINGUsed only by storage commands/scripts. When a file is uploaded, this determines whether or not it will be downloaded again. Set to TRUEor FALSE.
RSM_HPC_JOBID

Identifier for the cluster job returned by the successful Submit command. RSM sets this variable so it is available to subsequent commands.

RSM_HPC_JOBTYPE

The solver being used for the job. Possible values are Mechanical_ANSYS, Mechanical_AUTODYN, Mechanical_RBD, Mechanical_CONTACT, Workbench_ANSYS, Workbench_CFX, Workbench_FLUENT, Workbench_POLYFLOW, and Workbench_DESIGNPOINT.

The job types with the Workbench prefix are jobs executed from within Workbench as part of the component update. Workbench_DESIGNPOINT is the job type corresponding to the execution of the Workbench Update Design Points operation.

The job types with the Mechanical prefix correspond to jobs executed from Ansys Mechanical.

RSM_HPC_LOCAL_PLATFORM

Set as "Windows" or "Linux" and defines the platform on which the cluster submit host is running.

RSM_HPC_NATIVEOPTIONS

Value(s) of the Job submission arguments property on the HPC Resource tab when defining a configuration in RSM.

Workbench/RSM does not define or manipulate these administrator-specified options.

RSM_HPC_PROTOCOL_OPTION1

Used only when Use SSH or custom communication to the submit host is selected on the HPC Resource tab.

Contains the value of the remote account name.

RSM_HPC_PROTOCOL_OPTION2

Used only when Use SSH or custom communication to the submit host is checked on the HPC Resource tab.

Contains the value of the Remote Computer Name (or Cluster Node).

RSM_HPC_PROTOCOL_OPTION3

Used only when Use SSH or custom communication to the submit host is selected on the HPC Resource tab.

Contains the value of the local environment variable %KEYPATH% to be used for remote machine authentication.

RSM_HPC_QUEUE

The queue requested by the user for the job.

The list of available queues is defined by the Workbench/RSM administrator.

RSM_HPC_STAGING

Path for the cluster’s central staging area for job files. Typically needed when client and cluster platforms are different.

Defined by the Staging directory path on cluster property on the File Management tab.

RSM_HPC_STDERRFILE

A request that HPC job stderr be redirected into the named file. The contents of this file will be added to the RSM job log.

RSM_HPC_STDOUTFILE

A request that HPC job stdout be redirected into the named file. The contents of this file will be added to the RSM job log.

8.3.3.2. Optional Environment Variables Set by Customer

The following optional environment variable can be set by your RSM administrator on the cluster side. It will be passed to the cluster submit host as an environment variable to be used in scripting:

Environment VariableDescription
RSM_HPC_PARSE_MARKER

Specifies a ‘marker’ string of an output line. The marker string is used in order to indicate the line after which parsing should start.

Additionally, the user can set any number of variables that follow in Providing Custom Client Information for Job Submission.