Integration with Ansys Remote Simulation Management (RSM)
Ansys Electromagnetics supports its own Remote Simulation Management (RSM) software along with other High Performance Computing (HPC) software management programs (see High Performance Computing (HPC) Integration).
When do you need RSM?
RSM is generally required if you want to run remote or distributed simulations. However, if you have a separate scheduling system that Ansys Electromagnetics supports, and you plan to run batchsolve simulations only, you may not need to install RSM. For details of installation and configuration of RSM, see the Ansys Electromagnetics Installation Guides.
Job Management UI for RSM
You can use the Job Management UI to submit batch jobs to RSM. The Job Management UI is accessed by running Ansys Electronics Desktop on the designated 'Postprocessing node' of the cluster. The Desktop provides UI commands for Scheduler selection, Job submission and Job monitoring/control. You access the Scheduler User Interface by clicking Tools > Job Management > Select Scheduler...
You can also select the Simulation tab of the ribbon, and click the Scheduler icon.
This displays the selection dialog box. The Select scheduler drop-down menu lists potential schedulers (which can include RSM, LSF, Windows HPC, or SGE, depending on the environment).
If you select a scheduler that is not supported in your environment, you receive a warning.
If you select Remote RSM and your environment has been configured , you can select a computer, user name, and password.
After selecting a scheduler, click Refresh to display information for that scheduler.
Once you have selected a scheduler supported in your environment, you can go through the following steps to submit a batch job.
- Set up and prepare model on local workstation.
- Copy the input project (or folder, if
the project references external files) from a personal workstation to
a shared-drive on cluster (say project is copied to /home/projects/spool/test.adsn).
- In the RSM environment, you are required to specify a machine-list. See: HPC and Analysis Options. For example, say the machine-list is: 3 cores from 'm1' and 3 cores from 'm2', for a total of 6 engines. You select the list on the Compute Resources tab of the Submit Job to RSM window, as described below.
- Open a remote-desktop session (or equivalent such as vnc session) on the node corresponding to the first machine of job's machine-list, 'm1' in this case. Launch Desktop graphically on 'm1'.
- After setting the job submission node, select Tools > Job
Management > Submit Job... or Project > Submit Job... or
[ProductName] > Submit Job... to open the Submit Job To: window.
You can also access Submit Job from the shortcut menus for the Project Name, Design
name, Analysis Setup, or Optimetrics Setup.
The Submit Job To: window contains two tabs:
- Analysis Specification– specify the Product path, Project name, the setups, and analysis options such as batchoptions, or, for advanced users, Environment variables. If you select the Analysis or Optimetrics setup, the Analysis Specification is pre-populated.
- Compute Resources – specify the amount of compute resources and how to select specific resources from those available, and automatic settings, if supported by the design types.
The standard Job Submission window displays.
- Use the ellipsis button [...] to open a browser to select the project. The project can be an archive.
- In the Analysis setups area, you can select radio buttons for All
setups in the project, All setups in the design, or a single setup. For
instance, the OptimTee example includes setups for Nominal, Parametric, and Optimization.
If you accessed the Submit Job window from the right-click menus for Setup or
Optimetrics Setup, this field can be pre-populated.
For Parametric setups, you have the option to select Use Large Scale DSO. For details on how and when you use this feature, see Job Management Interface for Large Scale DSO.
- The Analysis options include check boxes for Monitoring the job, whether to
wait for a license, and a field for adding Batchoptions. via a graphical interface, or as text.
- If you intend to monitor the job through a user interface, you must select Monitor job. You can then monitor this job through the Tools > Job Management > Monitor Jobs... command or by checking the dialog that opens when you submit the job.
- The Batchoptions field allows you to add additional -batchoptions
parameters, either as text, or by using a dialog with selection menus. Click the Add
button to view the Add Batchoption dialog box.
The Show registry key entries field lets you filter the entries displayed, by means of drop-down menu selection, and a check box to Display only frequently used entries.
- When you have selected a batchoption, you can type the value in the field, and click the Add button to add the option to the batchcommand.
- In the Submit Job To: window, you can enable Show advanced
options to display additional fields for environment variables, and whether to Use
batch extract.
The Environment field is for environment variables, for instance, for debugging features or other variable controlled features. Click the ellipsis [...] button to open a dialog box for Additional Job Options.
The Add... button opens a New Environment Variable dialog box in which you can include a variable name and value.
Clicking the Add Debug Environment Variables button automatically adds a set of debug variables. This can be useful in working with Ansys Application Engineering support.
Selecting a variable in the dialog enables the Remove and Edit buttons. The Edit button opens a dialog box where you can change the variable and value.
- To see the command-line to be submitted to the scheduler, click Preview
Submission. This opens a dialog box showing the command to be sent to the scheduler.
The text can be copied to the clipboard, if desired.
Use Batch Extract for RSM
Selecting Show advanced options for RSM also shows the Use batch extract fields.
See the discussion on Running Ansys Electronics Desktop from a Command line for a discussion of the solve information available through batch extract.
- The Compute Resources tab of the Submit Job to: RSM window
displays other parameters. Depending on the resources available for a scheduler environment,
some of the fields may be disabled.
With Use automatic settings selected, the Job distribution field is removed and the Use automatic settings check box and Num variations to distribute field appear.
If you select Use automatic settings with Num variations to distribute set to 1, Optimetrics variations will be solved sequentially. Other distribution types will be distributed automatically. It does distribute frequencies, domains, and use of multiple level domains. If you set Num variations to distribute to 2 or more, Optimetrics variations will be solved in parallel. Other distribution types will be distributed automatically.
Otherwise:
- Specify node list
Here you can specify a node list. In a computing environment where the available cores are not uniform, you can use this to control which resources your job will use. For use with Large Scale DSO for RSM, for jobs that are submitted from job submission panel, localhost must be the first node in the resource selection node list, other wise LSDSO solve with RSM will fail.
Job Distribution
If you disable User automatic selection, you can modify the Job distribution settings.
- Single level or two level distribution (single level is the
default). Click Modify to display the Job Distribution dialog box and
select the Enable two level option if appplicable and desired.
Enabled distribution types can be modified here.
Second level distribution operates within DSO. If available and enabled you can specify a number of engines for level 1.
In response to a set of minimal constraints, the Scheduler may increase the resources assigned beyond the minimal values in order to meet the full set of requirements. For example, if you specify 7 distributed engines, with two processors per engine, and also limit the number of engines per node to 4, the scheduler may increase the number of cores used in order to meet the limit specified for engines per node. Notice that a preview of the Submit Job Results shows the number of resources assigned, and that the scheduler generated code includes an MPI specification.
- To submit the command with the specified parameters, click Submit Job.
Note:
The RSM environment does not support for queuing, so Submit Job will immediately start running the job.
A dialog box displays. You can select Begin monitoring this job now and click OK.
- You can monitor this job either automatically (by selecting the option above ) or through the Tools > Job Management > Monitor Jobs... command. For more details, see Monitor Jobs window.
Process for Changing the Listening Port used by AnsoftRSM Service
To change the listening port used by the AnsoftRSMService, you need to change the configuration file, ansoftrsmservice.cfg, as follows:
You must specify the ListenPort within a 'CommDetails' block, which must be within a 'Default:CommDetails' block, which must be within the top level block of the file, the 'AnsoftCOMDaemon' block. The following example shows the listen port changed from 32958 to 32957, with these blocks at the beginning of the file:
$begin 'AnsoftCOMDaemon'
$begin 'Default:CommDetails'
$begin 'CommDetails'
ListenPort='32957'
$end 'CommDetails'
$end 'Default:CommDetails'
. . . .
$end 'AnsoftCOMDaemon'
For the second level block, ensure that there is a single colon character and no spaces or tabs separating the two parts of the block name 'Default:CommDetails'. The third level block, with name 'CommDetails' is also required. Use caution when editing this file by hand, because any typos in the block or value names may cause the data to be ignored.
Changing the AnsoftRSMService Listening Port
For Remote Analysis or Distributed Analsysis, processes may need to be started on multiple hosts. If the Ansys Electromagnetics Desktop needs to start a process on a remote host, the AnsoftRSMService is used to start these remote processes. By default, the AnsoftRSMService listens for socket connections from the Ansys Electromagnetics Desktop on port 32958.
This section describes how to change the port number used by the AnsoftRSMService.
To change the port number, both the AnsoftRSMService and the Ansys Electromagnetics Desktop must be configured to use the new port number. The same port number must be used for Ansys Electromagnetics Desktop and for the AnsoftRSMService process running on each host used for the analysis.
AnsoftRSMService Configuration
The AnsoftRSMService port number is configured in the ansoftrsmservice.cfg configuration file. This configuration file is located in the platform specific subdirectory of the RSM installation directory.
The default location of this directory is C:\Program Files\AnsysEM\RSM\Win64 on Windows.
The default location of this directory is /opt/AnsysEM/rsm/Linux64 on Linux.
To modify the AnsoftRSMService configuration, first stop the ansoftrsmservice, then modify the ansoftrsmservice.cfg configuration file, then restart the ansoftrsmservice.
When using Linux, root maintains exclusive control over systemd-managed services. Once the startonboot command has been given, only root users can start and stop AnsoftRSMService, using the commands:
sudo ansoftrsmservice start
sudo ansoftrsmservice stop
The beginning of the configuration file should appear as follows:
$begin 'AnsoftCOMDaemon'
$begin 'Default:CommDetails'
$begin 'CommDetails'
'ListenPort'='32958'
$end 'CommDetails'
$end 'Default:CommDetails'
If there are additional lines between the following two lines, then they should not be modified:
$begin 'AnsoftCOMDaemon'
$begin 'Default:CommDetails'
To change the port number, modify the ListenPort setting within the single quotes from 32958 to the desired port number. The single quotes should not be removed or changed.
For previous versions of the software, the ansoftrsmservice.cfg file may not contain the lines:
$begin 'Default:CommDetails'
$begin 'CommDetails'
'ListenPort'='32958'
$end 'CommDetails'
$end 'Default:CommDetails'
If these lines are not present, then add them to the ansoftrsmservice.cfg file after the first line of the file, and change the ListenPort to the desired port number. For example, to change the port number to 32000, the beginning of the ansoftrsmservice.cfg file should look like the following after the changes:
$begin 'AnsoftCOMDaemon'
$begin 'Default:CommDetails'
$begin 'CommDetails'
'ListenPort'='32000'
$end 'CommDetails'
$end 'Default:CommDetails'
Ansoft Electromagnetics Desktop Configuration
The port number for connecting to the AnsoftRSMService is configured from the General Options window.
To access these options:
-
Select Tools > Options > General Options to open the General Options window.
-
If it is not already expanded, expand the General tree and click Remote Analysis.
Under RSM Service Options, the Ansoft Service Port field shows the current AnsoftRSMService port number.
- Click Change to modify this setting. This opens the Change Ansoft Service Port dialog box.
- Enter the new port number in the Ansoft Service Port field.
- Click OK to close the dialog box and accept the new port number.
- Click OK to close the General Options window and accept the changes.