Running Ansys EM

A version of Ansys Electromagnetics suite is installed for Leeds researchers who have access to either their own or a departmental license. This supports the infiniband interconnect so can be used for large runs with many processors, if the problem warrants it.

Various field solvers are included, such as HFSS and Maxwell

Setting up the license

The application obtains the license location through the LM_LICENSE_FILE variable. To set it in bash do:

To get the values of port@machine specific to your group/department please contact your local IT support.

Setting up the path/environment:

All variables can be set by loading the ansys module:

To load a specific version of AnsysEM, specify this on the module command i.e.:

HFSS

Once the ansysem module is loaded and the LM_LICENSE_FILE variable set, HFSS can be run by executing the command hfss from the command prompt. By default, this will launch the HFSS graphical user interface (GUI).

The first time this is run, it will take a short while to setup your configuration files. Once complete, it will ask you for a default directory to look for project files. We suggest you use /nobackup/USERNAME/Ansoft (replacing USERNAME as appropriate).

At this point, the GUI is running on one of the login nodes, which is not appropriate for intensive computation; however, it can be used for simple tasks, such as: looking at results, preparing project files or submitting jobs to the batch queue system.

When calculations need to be done, the work needs to be given to the batch queue as a job, where it will be given dedicated access to the resources it needs. Please see the sections below on how to do this.

Running the GUI through the batch queues

To launch the graphical interface in an interactive shell, issue the following on the command line:

In the above command, hh:mm:ss is the length of real-time the shell will exist for, vmem is the amount of memory required, dim is the dimension/precision of the fluent process (e.g. 2d for two dimension, single precision).

Running a batch job via the command line (serial or parallel)

HFSS simulations can be executed in serial or parallel through the batch scheduler. To do so, ensure you also have the sge module loaded, create a job submission file of either of the following formats, then submit it using the qsub command.

Prior to submission, you will want to modify port@machine to include license details, plus h_vmem and HFSS/DesiredRAMLimitInGB to indicate the maximum amount of RAM to make available (note: for parallel jobs, we believe HFSS/DesiredRAMLimitInGB should be the same value as h_vmem multiplied by the number of cores requested – although this has not yet been tested).

See the HFSS online documentation (available from the GUI) for further options.

Example serial job submission script

Example parallel job submission script

(modify the 2 in the first line to equal the number of cpus you require)

Running a batch job via the GUI (serial or parallel)

HFSS simulations can be executed in serial or parallel through the batch scheduler. To do so, ensure you also have the sge module loaded, launch the GUI and then configure it. Unfortunately, this appears to need to be done for each user:

  • Select menu option Tools->Job Management->Select Scheduler...
    • Ensure Use this computer is selected
    • Select sge from the Choose scheduler dropdown box.
    • Click OK
  • Select menu option Tools->Job Management->Submit Job...
    • Select Analysis Specification tab
      • Below Batchoptions:, click Add...
        • Select tempdirectory, enter a value of /scratch, click Add.
        • Select HFSS/HPCLicenseType, enter a value of Pool. Click Add.
        • Select HFSS/DesiredRAMLimitInGB, enter a value of 1. Click Add.
        • Click Done.
      • Tick checkbox Show advanced options
      • To the right of Environment:, click button marked ...
        • Click Add...
          • Enter variable name: LM_LICENSE_FILE
          • Enter Variable value: port@machine (use your license details)
          • Click OK
        • Click OK
      • Select Compute Resources tab (may take a few moments to draw)
        • To the right of Resource selection parameters:, click the ... button
          • Tick checkbox for ParallelEnvironment. Ensure value is set to ib
          • Click OK
        • Set Total number of tasks: to 1
        • Set Cores per distributed task: to 1
        • Ensure that the following are unchecked:
          • Nodes are for exclusive usage by this job
          • Limit number of tasks per node to
        • Select Scheduler Options tab
          • Ensure checkbox for Show advanced options is ticked
          • Tick checkbox for Customise job submission
          • In Additional job submission options, add:
        • Click Save Settings As Default
        • Click Cancel

      To submit a job, now:

      • Select menu option Tools->Job Management->Submit Job...
        • Select Analysis Specification tab
          • Enter the file for the project you want to work on in Project:
          • If your job requires more RAM than previously entered, under Batchoptions: select HFSS/DesiredRAMLimitInGB, then alter it by clicking Edit...
        • Select Compute Resources tab (may take a few moments to draw)
          • If your job requires more than 1 CPU, set Total number of tasks: to the number you need
        • Select Scheduler Options tab
          • In Additional job submission options, ensure that h_vmem is set to at least the value provided for HFSS/DesiredRAMLimitInGB divided by the number of tasks entered in the previous tab.
        • Clicking Preview Submission will show you how to construct the job without using the GUI.
        • Clicking Submit Job will give the job to the batch queue.