学习中心

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 haveinstalled 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 cancombine multiple licenses into a single fileto 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:

  1. Locate and runlmtools.exe.
    1. You can use theLMTOOLSshortcut in the COMSOL Launchers directory, or runlmtools.exedirectly from the{COMSOLInstallationDirectory}\license\win64directory. 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.
  2. Locate theService/License Filetab. Make sure that theConfiguration using Servicesradio 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.

  3. Locate theConfig Servicestab.
    1. Enter "COMSOL License Manager" in theService Namefield.
    2. Specify the full paths for the required files in their corresponding fields. Below are the default paths for the files used by COMSOL Multiphysics®:
      1. Path to thelmgrd.exefile:C:\Program Files\COMSOL\COMSOLXY\Multiphysics\license\win64\lmgrd.exe
      2. Path to the license file:C:\Program Files\COMSOL\COMSOLXY\Multiphysics\license\license.dat
      3. 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 Execute
        • LMCOMSOl(vendor daemon) – Read and Execute
        • License.dat— Read
        • Debug Log File Path — Read and Write
    3. Enable service by checking theUse Servicescheckbox and then theStart Server at Power Upcheckbox.
    4. Finally, clickSave Service.
  4. Locate theStart/Stop/Rereadtab and click theStart Serverbutton to start the license manager.
  5. Verify that the license manager is running.
    1. Open the details page in the Task Manager
    2. Ensure thatlmgrd.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 (usingsystemd).

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, usingsystemdprovides 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 asystemdservice 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 asystemdservice.

Insystemd, 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/glnxa64or{COMSOLInstallationDirectory}/license/glnxarm64depending on the processor architecture.

Reminder: Replace XY with your COMSOL version.

  1. Open thelmcomsol.servicefile and verify paths tolmgrd,license.dat, and the log file.
    1. Thelmcomsol.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
    2. Make sure that the path to thelmgrd, 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 asystemdservice.

  2. Specify the user account in thelmcomsol.servicefile that will initiate the service.
    1. Uncomment and replace the username, as shown in the example line below, with a non-root user. The user must be able to runlmgrd, read thelicense.dat, and write to the designated log file location.
      #User=username
    2. Save thelmcomsol.servicefile.
  3. Make sure that the/usr/tmpdirectory exists and set the permissions.
    mkdir -p /usr/tmp chmod 1777 /usr/tmp
    The/usr/tmpdirectory is used for storing temporary files by license manager.
  4. Stop the existing license manager.
    1. If an older license manager is already installed and running, first stop the existing version with the following command:
      systemctl stop lmcomsol
  5. 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.
  6. Activate the license manager withsystemd.
    1. 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/
    2. Then, enable the service so that it starts automatically on boot.
      systemctl enable lmcomsol
    3. Finally, start the service using the following command:
      systemctl start lmcomsol
  7. Verify the license manager is running.
    1. Use the followingsystemdcommand to check the status of the license manager service:
      systemctl status lmcomsol
    2. To further verify that the license manager is functioning correctly, review the debug log file for any relevant status messages or errors.

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} orglnxarm64(ARM architecture).

The default location of{COMSOLInstallationDirectory}used by the COMSOL installer on Linux®is/usr/local/comsolXY/Multiphysics(whereXYis the version number).

  1. Navigate to the license manager folder.
    cd /usr/local/comsolXY/multiphysics/license/glnxa64
  2. Start the license manager.
    ./lmgrd -c ../license.dat -l /var/tmp/comsolXY.log
    • The commandlmgrdstarts 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).
  3. Verify that the license manager is running.
    1. Once the license manager is running, it's good practice to confirm that its processes are active. Run the following commands to check if bothLMCOMSOL(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.

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 alaunchdservice. After stopping any existing LM instances, use the following steps to automatically start the license manager on boot.

  1. 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.
  2. Open the.plistfile in a text editor to make the necessary edits.
    open -a TextEdit /Library/LaunchDaemons/com.comsol.lmcomsol.plist
  3. Set the correct permissions for the.plistfile.
    sudo chmod 600 /Library/LaunchDaemons/com.comsol.lmcomsol.plist
  4. Enable and start the daemon.
    sudo launchctl load -w /Library/LaunchDaemons/com.comsol.lmcomsol.plist

Manually Start the License Manager on macOS:

  1. Launch the Terminal application.
  2. Change the directory to the license folder depending on your CPU architecture.
    cd /Applications/COMSOL64/Multiphysics/license/macarm64
    cd /Applications/COMSOL64/Multiphysics/license/maci64
    • Choose the path that matches your CPU architecture.
  3. Start the license manager.
    ./lmgrd -c ../license.dat -l /var/tmp/comsol64.log
    • Thelmgrdcommand 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 server is now ready to distribute licenses over the network. It writes any debug information to the log file/var/tmp/comsolXY.log.


请提交与此页面相关的反馈,或点击此处联系技术支持。

Baidu
map