ANSYS HFSS FAQs

When submitting an ANSYS HFSS job with HPC at Rescale, it is good practice to gather DEBUG files in case the job fails. In the event of a failing analysis, the DEBUG files can then be provided to Rescale Support. Please contact us if you're having trouble.

On the command window of the Software Settings page of your job setup, add the following commands before the Ansys Electronics Desktop command ansysedt that you typically run. An example is shown below:

export DEBUG_LOG_DIR=`pwd`/debug_log
mkdir $DEBUG_LOG_DIR 2>/dev/null
export ANSOFT_DEBUG_LOG=$DEBUG_LOG_DIR/debug
export ANSOFT_DEBUG_LOG_SEPARATE=1
export ANSOFT_DEBUG_LOG_THREAD_ID=1
export ANSOFT_DEBUG_LOG_TIMESTAMP=1
export ANSOFT_DEBUG_MODE=2
export ANSOFT_PASS_DEBUG_ENV_TO_REMOTE_ENGINES=1
ansysedt -auto -distributed -monitor -machinelist file=$HOME/machinefile.hfss -ng -batchsolve test.aedt

In addition to running the analysis, this will create a debug-log directory within the work directory which will contain all the generated logs. It is recommended that you use these commands every time you submit an ANSYS HFSS job in batch.

ANSYS Electronics Desktop supports two types of HPC licenses: Pack and Pool licenses. When you submit a batch job through the ScaleX platform such as HFSS or Maxwell, the default command is set up to use the HPC Pack license. In order to use your HPC pool license, you need to add the following flag to your command:

-batchoptions "'HFSS/HPCLicenseType'='Pool'"

A sample HFSS execution commmand containing the HPC pool license flag is shown below:

export TASKS_PER_NODE=-1
for host in `cat $HOME/machinefile`; do echo "$host:$TASKS_PER_NODE:$RESCALE_CORES_PER_NODE:90%" >> $HOME/work/machinefile.hfss; done
ansysedt -auto -distributed -monitor -machinelist file=$HOME/work/machinefile.hfss -batchoptions "'HFSS/HPCLicenseType'='Pool'" -ng -batchsolve my-hfss-input-file.aedt

ANSYS Electronics has the option to specify the tasks automatically or manually for a distributed batch job. Please refer to the ANSYS Electromagnetics HPC Administrator's Guide for more information about automatic and manual mode.

Automatic Mode

In this mode ANSYS Electronics software determines how the tasks should be distributed to the available resources. In the command line, we use an environment variable, TASK_PER_NODE. When this variable is set to -1, the tasks will be automatically distributed among the cores. The -auto flag is also used to specify automatic mode. The command line will look as follows for automatic mode -

export TASKS_PER_NODE=-1
for host in `cat $HOME/machinefile`; do ssh ${host} "ansoftrsmservice start; RegisterEnginesWithRSM.pl add;"; echo ${host}:${TASKS_PER_NODE}:${RESCALE_CORES_PER_NODE}:90% >> $HOME/work/machinefile.hfss; done 
ansysedt -auto -distributed -monitor -machinelist file=$HOME/work/ machinefile.hfss -ng -batchsolve ansys-hfss-electronics-example.aedtz

Manual Mode

In this mode, users can specify the total number of cores and number of tasks per node (And hence, number of cores per task). In the command line, we can set the the environment variable, TASKS_PER_NODE to ' 2 ' , ' 4 ' , ' 8 ', ' 16 ' etc. Additionally, we need to delete the -auto flag.

For example, if we're using 8 cores for a job and we're setting tasks per node as 2, then each task will require 4 cores and this will result in a maximum of two tasks per host.

For the above example, the commands line on the Rescale platform will be as follows :

export TASKS_PER_NODE=2
for host in `cat $HOME/machinefile`; do ssh ${host} "ansoftrsmservice start; RegisterEnginesWithRSM.pl add;"; echo ${host}:${TASKS_PER_NODE}:${RESCALE_CORES_PER_NODE}:90% >> $HOME/work/machinefile.hfss; done 
ansysedt -distributed -monitor -machinelist file=$HOME/work/ machinefile.hfss -ng -batchsolve ansys-hfss-electronics-example.aedtz

The default command line for ANSYS Electronics on Rescale platform has the placeholder . You can specfify one of the design option types in the placeholder by including the expression within quotes :

  • "[designName]" - batch solve all setups for design with the name given under the project.

  • "[designName]:Nominal" - batch solve all nominal setups for design with the name given under the project.

  • "[designName]:Optimetrics" - batch solve all Optimetrics setups for design with the name given under the project.

  • "[designName]:Nominal:[setupname]" - batch solve the specified nominal setup for design with the name given under the project. The setupname is case insensitive.

  • "[designName]:Optimetrics:[setupname] - batch solve the specified Optimetrics setup for design with the name given under the project. The setupname is case insensitive.

In the example problem given in the ANSYS HFSS batch example, if we want to solve the Nominal part of second design named "pcie_gen3_fab3_cutout", then the command line will look as follows -

export TASKS_PER_NODE=-1
for host in `cat $HOME/machinefile`; do ssh ${host} "ansoftrsmservice start; RegisterEnginesWithRSM.pl add;"; echo ${host}:${TASKS_PER_NODE}:${RESCALE_CORES_PER_NODE}:90% >> $HOME/work/machinefile.hfss; done 
ansysedt -auto -distributed -monitor -machinelist file=$HOME/work/ machinefile.hfss -ng -batchsolve "pcie_gen3_fab3_cutout:Nominal" ansys-hfss-electronics-example.aedtz

Add a flag -batchextract to the command line of the batch job followed by the macro file. See example below:

export TASKS_PER_NODE=-1
for host in `cat $HOME/machinefile`; do ssh ${host} "ansoftrsmservice start; RegisterEnginesWithRSM.pl add;"; echo ${host}:${TASKS_PER_NODE}:${RESCALE_CORES_PER_NODE}:90% >> $HOME/work/machinefile.hfss; done 
ansysedt -auto -distributed -monitor -machinelist file=$HOME/work/ machinefile.hfss -batchextract Sparameter_extract.py -batchoptions "" -ng -batchsolve ansys-hfss-electronics-example.aedtz

where:

Sparameter_extract.py is a post-processing macro recorded in the HFSS GUI

ansys-hfss-electronics-example.aedtz is the HFSS input file

Note this flag only works for HFSS model types, not with 3D layout model types

If the user is running HFSS/Maxwell on Azure, the IB environment variables need to be set before the ansys command lines and additional batch options (-batchoption ” ‘<SOFTWARE>/MPIVendor’=‘Intel’ ”) need to be specified.

export I_MPI_DAPL_PROVIDER=ofa-v2-ib0
export I_MPI_DYNAMIC_CONNECTION=0
export I_MPI_DAPL_UD=0
export I_MPI_DAPL_TRANSLATION_CACHE=0
export I_MPI_FABRICS=shm:dapl
export TASKS_PER_NODE=-1
for host in `cat $HOME/machinefile`; do ssh ${host} "ansoftrsmservice start; RegisterEnginesWithRSM.pl add;"; echo ${host}:${TASKS_PER_NODE}:${RESCALE_CORES_PER_NODE}:90% >> $HOME/work/machinefile.hfss; done 
ansysedt -auto -distributed -monitor -machinelist file=$HOME/work/ machinefile.hfss -batchoption ” ‘HFSS/MPIVendor’=‘Intel’ ” -ng -batchsolve ansys-hfss-electronics-example.aedtz