How to run Licensed Ansys Software
Ansys software requires a licence and this page describes how to use this licence on Pawsey systems. Configuring your FlexLM licence server to be utilised by an external supercomputer/cluster/cloud may need to be done by your IT department, as it involves changes to the FlexLM server and firewalls.
Connecting to Ansys licence servers
The following instructions need to be relayed to your IT department to ensure that the firewall is properly configured.
Ports and Firewalls
Getting Ansys licensing to work through a firewall can be confusing as it requires three ports to be opened through a firewall. The third port is not obvious as it is not locked to a specific port number. There are three TCP port numbers to consider.
- FlexLM lmgrd. This needs to run on port 1055 to be consistent with the Ansys manual. This port number corresponds to
ANSYSLMD_LICENSE_FILE
. - Ansys Licensing Interconnect daemon, ansysli_server. This needs to run on port 2325 to be consistent with the Ansys manual. This port number corresponds to
ANSYSLI_SERVERS
. - Ansys FlexLM vendor daemon ansyslmd. This can run on any available port. Ansys tools do not talk to this directly, but FlexLM tools require it. FlexLM tools get the port number by querying lmgrd.
Configuring the FlexLM Server
Your licence file (license.dat
) from Ansys probably looks like this to begin with:
SERVER hostname hostid 1055
VENDOR ansyslmd
where hostid
is the MAC address of the server. hostname
might be the short hostname, myflexlmserver
, or the fully qualified domain name (FQDN), myflexlmserver.edu.au
.
Change the licence file to set the ansyslmd
port is a random available port and set hostname to the FQDN.
SERVER myflexlmserver.edu.au hostid 1055
VENDOR ansyslmd port=24680
Open up all three ports in the firewalls between client and server boxes as well as the client and server boxes. You can open access to the client machine or subnet, but not more than that. Note that it is usually safe to run other vendor daemons off the same FlexLM lmgrd, in which case they will need the same port number on the SERVER line.
Querying the Licence Server at Runtime
You need to set two environment variables in a jobscript before running the product.
ANSYSLI_SERVERS=2325@myflexlmserver.edu.au
ANSYSLMD_LICENSE_FILE=1055@myflexlmserver.edu.au
You may need to change myflexlmserver.edu.au
to the hostname of the FlexLM licence server. You can then check your setup in a batch script by loading Ansys software and testing the connection with the lmstat
and nmap
commands.
$ module load ansys-fluids/version $ $PAWSEY_ANSYS_FLUIDS_HOME/fluids/shared_files/licensing/linx64/lmutil $ lmstat -a $ nmap -P0 -p 1055,2325,24680 myflexlmserver.edu.au
Common Problems
A status of "filtered" means the port is blocked by a firewall, which could be an actual firewall or on the server itself. A status of "closed" means the port is open through firewalls but the daemon is not listening on that port number, which is usually the case for the third port if you have not fixed it on the VENDOR line of the licence file.
When trying to run Ansy codes, you may encounter issues with the licence server.
Possible issue 1
lmgrd
is not running: License server machine is down or not responding. (-96,7:2 "No such file or directory")
Make sure the Fully Qualified Domain Name of the licence server is used on the SERVER line of the licence file. Do not use the default short hostname.
Possible issue 2
lmgrd
is not running: Cannot connect to license server system. (-15,570:115 "Operation now in progress")
Lock down the ansyslmd port with a port= statement on the VENDOR line of the licence file. Make sure this port is open in your firewall. This is likely to be the problem if lmstat
gives an error but ansysli_util
works.
Debugging
To debug Ansys products, you need to create a file in your home director, .flexlmrc
, and then run lmutil
. The file should contain the following:
FLEXLM_DIAGNOSTICS=3
On the server, create an options file in the same directory as the licence file, with the same filename but with extension .opt
.
DEBUGLOG /opt/flexlm/logs/debug/ansys.log
Alternatively you can specify the name of the options file using the DAEMON line in a licence file. Consult the FlexLM documentation for that.
Setting user licence preferences
By default Fluent may attempt to use commercial licences. The steps to change to an academic licence are provided below.