Dymola license server for novices

This post looks at how the FlexLM license server works with Dymola and how to troubleshoot it. Most of the information was obtained from the Dymola User Manual 1A and from questions asked on the Claytex support and the Dassault Systemes support system.

Note that there is also the Dassault Systemes license server and other 3rd party licensing mechanisms; these will not be covered in this blog post.

1. Understanding the license server

The basic operation of the licensing system is shown in Figure 1.

Figure 1. FlexLM license server operational diagram.

Images sourced from Computer icons created by Nikita Golubev – Flaticon and Case icons created by Freepik – Flaticon

Dymola uses FlexLM client software to contact the license server using TCPIP. The Dymola requests can be requesting a license, requesting to borrow a license for a given time, returning a license and more.

When the License Server Manager starts, it reads the license files and opens the associated Vendor Daemons.

The calls from Dymola to the license server are passed to the Dymola Vendor Daemon, in this case the dynasim.exe process. The Vendor Daemon sends out access to license features as appropriate.

Every 5 minutes Dymola will check-in with the license server.

2. Installing the license server

The installation files for the license server are contained within the Dymola installation media as in Figure 2 for Windows.

Figure 2. Installing the License server software from the Dymola windows installation files

After running the installation, the lmgrd.exe, dynasim.exe and lmtools.exe are stored in the <Dymola installation directory>\bin64’ folder.

Admin rights are needed to install and configure the license server; however, admin rights are not required for day to day use. For more information about setting up the license server please refer to the Dymola User Manual 1A, that is in <Dymola installation directory>\Documents. Also see License Server Setup.

3. The license Borrowing feature

It is possible to borrow licenses for up to 30 days at a time using the Borrow tab on the Dymola License Setup dialog as in Figure 3.

Figure 3. The Borrow tab in Tools>License Setup is used to check out licenses for a given time period

Checking out licenses can be useful if you know a computer is going to be out of contact with the license server for a while. It is also possible to check licenses back in. The license server should take about 2 minutes to detect that a license has been checked back in.

4. The license file

The license files are text files in which one can see what license features are covered by the license and the related details such as, the expiry date, the host ID of the license server and the server name. If the license file contains the text server.name.here replace this with the name of the license server machine.

By default the TCPIP port addresses used by Dymola are in the range of 27000 to 27009; however, a port address can be set by putting the desired port at the end of the SERVER line in the license file. You may need to modify your firewall setup to allow external connections to this port.

The port used by the vendor daemon is usually automatically determined and as the communication is within the same machine no firewall rule is usually needed. It is possible to set the port by adding a port number at the end of the VENDOR line.

5. License checking out behaviour

The following behaviour describes how different libraries are checked out.

  • DymolaStandard is checked out when Dymola is started. If this is not successful then the demo version of Dymola is used.
  • Commercial library options are checked out when the library is opened/loaded for the first time in Dymola.
  • BinaryModelExport is checked out when a model is translated or if the Compiler Setup is opened.
  • SourceCodeGeneration is checked out when translateModelExport() is run.
  • DesignOptimization is checked out when running an optimization problem with more than 3 tuners.
  • ModelCalibration is checked out when running a calibration problem.

Any of the license features can be disabled by starting Dymola from the command line with the argument /NoFeatureName where FeatureName is the name of the option to disable, for Figure 4:

Figure 4. Starting Dymola from the commandline with the BinaryModelExport license disabled.

The BinaryModelExport and SourceCodeGeneration licenses can also be disabled as by going to the Tools>License Setup and deselecting this option as in Figure 5.

Figure 5. Tools>License Setup’s Details tab has an option for disabling the BinaryModelExport and SourceCodeGeneration license. In the figure the user had the SourceCodeGeneration option. The dialog will look different if the BinaryModelExport license is present.

The Details tab in Figure 5 also contains a list of the licenses that are checked out.

6. Known limitations

  • Features from nodelocked and network licenses cannot be combined. That is you cannot get some licenses from a nodelocked license and others from the network license.
  • Dymola should not be installed on the license server machine.

7. Troubleshooting

a. Getting more information

The License Server debug log contains information about the License Server operation. The location of this log is on the LMTools Config Services tab as in Figure 6.

Figure 6. The LMTools Config Services tab with the location of the debug log highlighted

Examine this debug log, explanations of the Flex.Net error codes can be found here.

The license file referred to in Figure 6. should also be double checked. See Section 4. for more information on what to check.

Double check the LMTools configuration by going through Section 4.3.1 of the Dymola User Manual 1A that can be found in <Dymola installation directory>\Documents.

To get extra license server information click on Perform Diagnostics on the Server Diags tab.

To get more information about the distribution of licenses press Perform Status Enquiry on the Server Status tab. This can be used to check the following:

  • The number of licenses for different features that are available and the number of these licenses that have been checked out.
  • Who has checked out what license, the PC that was used to check the license and when.

Note that after making changes to the license server configuration, the license server needs to be stopped and restarted using the Start/Stop/Reread tab of LMtools. Dymola should also be restarted.

b. Further troubleshooting

Dymola cannot connect to the license server

The connection from Dymola to the license server can be checked by pressing Verify on the Tools>License Setup, Setup tab. If this fails, also try pinging the license server as described here.

In the event that a connection to the license server fails, the issue likely stems from a network problem. The user should verify both the network connections and the firewall settings. In a rare instance, another program might be utilizing the same TCP/IP port that Dymola relies on for communication with the license server. Instructions for checking this are available here.

Issues after updating Dymola

Check that the Dymola version supports the version of FlexLM that is being used. This information is in the “Dymola Release notes” that is in <Dymola installation directory>\Documents.

Note that the FlexLM software is backwards compatible.

Borrowing issues

The user can determine what Dymola is borrowing by entering the following command in the Dymola command line:

Modelica.Utilities.System.getEnvironmentVariable(“LM_BORROW”);

Additionally, if there exists a file .lm_borrow in C:\Users\%USER%\AppData\Roaming\DassaultSystemes\Dymola, check what is in this text file.


To check all the borrowed license use LMtools Perform Status Enquiry described in Section 7.a above.

In some cases you may want to return a checked out license manually this can be done as described here.

Switching from network to node locked license giving issues

Make sure that the nodelocked license is being used. This may have to be done manually by replacing the licenses in these directories:

  • C:/ProgramData/DassaultSystemes/Dymola (This is for everyone on the PC)
  • C:/Users/your_user_name/AppData/Roaming/DassaultSystemes/Dymola (This is only for this PC)

8. Conclusion

This blog post gives an overview of how the Dymola FlexLM license system operates and some ideas on how to troubleshoot issues that may arise. If you are still having issues please contact your Dymola reseller.

Written by: Garron Fish – Chief Engineer

Please get in touch if you have any questions or have got a topic in mind that you would like us to write about. You can submit your questions / topics via: Tech Blog Questions / Topic Suggestion

CONTACT US

Got a question? Just fill in this form and send it to us and we'll get back to you shortly.

Sending

© Copyright 2010-2024 Claytex Services Ltd All Rights Reserved

Log in with your credentials

Forgot your details?