How to Start the License Manager for COMSOL Multiphysics®
In this article, we provide a step-by-step guide on how to start the license manager for COMSOL Multiphysics® on Windows®, Linux®, and macOS. After you have installed the license manager, you may need to start it manually or set it to start automatically. The license manager is limited to a single instance; you can combine multiple licenses into a single file to host multiple licenses from a single machine.
For the paths in this guide, replace XY with your version number. Using version 6.4 as an example, C:\ProgramData\COMSOL\comsolXY.log → C:\ProgramData\COMSOL\comsol64.log
Start the License Manager on Windows®
The license manager can be started on a Windows machine using FlexNet® Control Panel (LMTOOLS). The steps include:
-
Locate and run
lmtools.exe.-
You can use the
LMTOOLSshortcut in the COMSOL Launchers directory, or runlmtools.exedirectly from the {COMSOLInstallationDirectory}\license\win64 directory. The options in these directories will only be present if the license manager was installed and the{COMSOLInstallationDirectory}was created with the default pathC:\Program Files\COMSOL\COMSOLXY\Multiphysics.
-
You can use the
-
Locate the Service/License File tab. Make sure that the
Configuration using Services radio button is selected.
ℹ️The following steps outline how to configure the license manager service from scratch. If you installed the license manager as a service using the COMSOL installer, these settings may already be configured. In that case, simply review and verify the settings instead of repeating the steps.
-
Locate the Config Services tab.
- Enter "COMSOL License Manager" in the Service Name field.
-
Specify the full paths for the required files in their corresponding fields. Below are the default paths for the files used by COMSOL Multiphysics®:
-
Path to the
lmgrd.exefile:C:\Program Files\COMSOL\COMSOLXY\Multiphysics\license\win64\lmgrd.exe -
Path to the license file:
C:\Program Files\COMSOL\COMSOLXY\Multiphysics\license\license.dat -
Path to the debug log file:
C:\ProgramData\COMSOL\comsolXY.log
ℹ️If COMSOL was installed in a nondefault location, ensure that the local service account on Windows used to start the license manager has the following permissions:
lmgrd— Read and ExecuteLMCOMSOl(vendor daemon) – Read and ExecuteLicense.dat— Read- Debug Log File Path — Read and Write
-
Path to the
- Enable service by checking the Use Services checkbox and then the Start Server at Power Up checkbox.
- Finally, click Save Service.
- Locate the Start/Stop/Reread tab and click the Start Server button to start the license manager.
-
Verify that the license manager is running.
- Open the details page in the Task Manager
-
Ensure that
lmgrd.exeandLMCOMSOL.exeare running.
To further verify that the license manager is functioning correctly, review the debug log file for any relevant status messages or errors.
Start the License Manager on Linux®
The license manager can be started on a Linux machine manually or automatically at boot (using systemd).
Automatically vs. Manually Starting the License Manager
Starting a process manually is quick and simple but lacks built-in management features like automatic restarts. In contrast, using systemd provides robust service management, including autostart on boot, making it ideal for long-running services. A straightforward way to decide between these methods is to consider how often the machine hosting the license manager is restarted. If you opt for manual startup, the license manager must be restarted manually after every reboot. Configuring the license manager as a systemd service also enables you to reboot the machine without needing to manually restart the service.
Automatically Start the License Manager on Linux® (Using systemd)
If the license manager has been started manually, it must be stopped before automatically launching the version configured as a systemd service.
In systemd, a service file is used to describe how a specific service should be started and managed. You can find the service file, lmcomsol.service, to start the license manager under {COMSOLInstallationDirectory}/license/glnxa64 or {COMSOLInstallationDirectory}/license/glnxarm64 depending on the processor architecture.
Reminder: Replace XY with your COMSOL version.
-
Open the
lmcomsol.servicefile and verify paths tolmgrd,license.dat, and the log file.-
The
lmcomsol.servicefile specifies the following default command that should be run to start the service:ExecStart=/usr/local/comsolXY/multiphysics/license/glnxa64/lmgrd -c /usr/local/comsolXY/multiphysics/license/license.dat -L /var/tmp/comsolXY.log -
Make sure that the path to the
lmgrd, license.dat, COMSOLXY.logfiles used in the command above is accurate and exists on your machine.ℹ️If the license manager has been started manually, it must be stopped before automatically launching the version configured as a
systemdservice.
-
The
-
Specify the user account in the
lmcomsol.servicefile that will initiate the service.-
Uncomment and replace the username, as shown in the example line below, with a non-root user. The user must be able to run
lmgrd, read thelicense.dat, and write to the designated log file location.#User=username -
Save the
lmcomsol.servicefile.
-
Uncomment and replace the username, as shown in the example line below, with a non-root user. The user must be able to run
-
Make sure that the
/usr/tmpdirectory exists and set the permissions.
Themkdir -p /usr/tmp chmod 1777 /usr/tmp/usr/tmpdirectory is used for storing temporary files by license manager. -
Stop the existing license manager.
-
If an older license manager is already installed and running, first stop the existing version with the following command:
systemctl stop lmcomsol
-
If an older license manager is already installed and running, first stop the existing version with the following command:
-
Activate the license manager with
systemd.-
Copy the service file to the location
/usr/lib/systemd/system/using the following command. This ensures thatsystemdcan find it.cp lmcomsol.service /usr/lib/systemd/system/ -
Then, enable the service so that it starts automatically on boot.
systemctl enable lmcomsol -
Finally, start the service using the following command:
systemctl start lmcomsol
-
Copy the service file to the location
-
Verify the license manager is running.
-
Use the following
systemdcommand to check the status of the license manager service:systemctl status lmcomsol - To further verify that the license manager is functioning correctly, review the debug log file for any relevant status messages or errors.
-
Use the following
Note: If you're installing the license manager as a service for the first time on this machine using systemd, you can skip this step.
Manually Start the License Manager on Linux®
After it has been installed, the license manager for COMSOL Multiphysics® is available under:
{COMSOLInstallationDirectory}/license/glnxa64 (x86 64-bit architecture} or glnxarm64 (ARM architecture).
The default location of {COMSOLInstallationDirectory} used by the COMSOL installer on Linux® is /usr/local/comsolXY/Multiphysics (where XY is the version number).
-
Navigate to the license manager folder.
cd /usr/local/comsolXY/multiphysics/license/glnxa64 -
Start the license manager.
./lmgrd -c ../license.dat -l /var/tmp/comsolXY.log-
The command
lmgrdstarts the license manager. -
The
-cflag specifies the path to the license file (license.dat). -
The
-lflag defines where log file should be stored (comsolXY.login/var/tmp).
-
The command
-
Verify that the license manager is running.
-
Once the license manager is running, it's good practice to confirm that its processes are active. Run the following commands to check if both
LMCOMSOL(vendor daemon) andlmgrd(license server manager) are running.ps aux | grep -E "lmgrd|LMCOMSOL"
To further verify that the license manager is functioning correctly, review the debug log file for any relevant status messages or errors.
-
Once the license manager is running, it's good practice to confirm that its processes are active. Run the following commands to check if both
Start the License Manager on macOS
The license manager can be started manually or automatically at startup.
Reminder: Replace XY with your COMSOL version.
Automatically Start the License Manager on macOS:
If the license manager has been started manually, it must be stopped before automatically launching a different version which has been configured as a launchd service. After stopping any existing LM instances, use the following steps to automatically start the license manager on boot.
-
Copy the template
.plistfile to/Library/LaunchDaemonsdepending on your CPU architecture.sudo cp /Applications/COMSOL64/Multiphysics/license/macarm64/com.comsol.lmcomsol.plist /Library/LaunchDaemons/sudo cp /Applications/COMSOL64/Multiphysics/license/maci64/com.comsol.lmcomsol.plist /Library/LaunchDaemons/- Choose the path that matches your CPU architecture.
- Edit the
.plistfile to update thelmgrdandlicense.datpaths, and specify a non-root user to run the service.
-
Open the
.plistfile in a text editor to make the necessary edits.open -a TextEdit /Library/LaunchDaemons/com.comsol.lmcomsol.plist -
Set the correct permissions for the
.plistfile.sudo chmod 600 /Library/LaunchDaemons/com.comsol.lmcomsol.plist -
Enable and start the daemon.
sudo launchctl load -w /Library/LaunchDaemons/com.comsol.lmcomsol.plist
Manually Start the License Manager on macOS:
- Launch the Terminal application.
-
Change the directory to the license folder depending on your CPU architecture.
cd /Applications/COMSOL64/Multiphysics/license/macarm64cd /Applications/COMSOL64/Multiphysics/license/maci64- Choose the path that matches your CPU architecture.
-
Start the license manager.
./lmgrd -c ../license.dat -l /var/tmp/comsol64.log- The
lmgrdcommand starts the license manager. - The
-cflag specifies the path to the license file (license.dat). - The
-lflag defines where the log file will be stored (/var/tmp/comsol64.log).
- The
The server is now ready to distribute licenses over the network. It writes any debug information to the log file /var/tmp/comsolXY.log.
Envoyer des commentaires sur cette page ou contacter le support ici.
