Lumerical now supports running Lumerical analysis on a supported Windows and Linux machine using only solve licenses for FDTD and MODE (Finite Difference IDE). This includes running Lumerical scripts (.lsf) for the command line or through Lumerical INTEROP. Although a CAD/GUI environment is still required when running scripts, a GUI license is not anymore utilized by this process. Rather a solve license will be checked out in place of the GUI license
Requisites
- Lumerical 2022 R2.1 and newer versions
- Licenses running on the Ansys License Manager 2021 R1 and newer versions
- CAD/GUI environment on the Linux machine running the script
Notes
- The number of threads use to run the script can be set using the "threads' argument. Otherwise, it will take the settings from the "Design Environment" tab in the resource configuration.
- It disables the ability to show and hide the window via script and disables showing visualizer windows and other popups.
- This option implies '-hide' and '-exit' for command line and implies 'hide' for INTEROPs (Python, MATLAB, etc).
- Only results analysis can be run in this mode. Commands like “run” and “runsweep” are disabled. See this list of disabled script commands for the '-use-solve' argument.
Running scripts in FDTD
- Open Terminal
- Change directory to the location of your script or simulation files
- Run the script.lsf file with the FDTD CAD/GUI and the '-run' and '-use-solve' arguments
/opt/lumerical/[[verpath]]/bin/fdtd-solutions -run <script.lsf> -use-solve
- "-use-solve" check outs an FDTD solve license instead of a GUI license.
Running scripts in MODE
- Open Terminal
- Change directory to the location of your script or simulation files
- Run the script.lsf file with the MODE CAD/GUI and the '-run' and '-use-solve <solver>' arguments.
- Where the <solver> argument can be either: 'eme', 'fde', or 'varfdtd', depending on which MODE simulation is run.
/opt/lumerical/[[verpath]]/bin/mode-solutions -threads 32 -run <script.lsf> -use-solve eme
/opt/lumerical/[[verpath]]/bin/mode-solutions -threads 16 -run <script.lsf> -use-solve fde
/opt/lumerical/[[verpath]]/bin/mode-solutions -threads 8 -run <script.lsf> -use-solve varfdtd
- '-use-solve <solver>' check outs the corresponding MODE solve license instead of a GUI license.
Examples
Running an FDTD script using 12 threads and FDTD solver resources: processes=16, threads=1 and capacity=1 as shown in the image.
/opt/lumerical/[[verpath]]/bin/fdtd-solutions -threads 12 -run scriptfile.lsf -use-solve fdtd
- The above command will checkout 2 FDTD solve licenses. 1 for the GUI and another solve license to run a simulation up to a maximum of 32 cores. See this page for details on license consumption when running simulations.
Running an EME script with 6 threads using only the EME solve license. Setting the threads to 6 will use 6 threads/cores when running both the script and the EME simulation that is run in the script.
/opt/lumerical/[[verpath]]/bin/mode-solutions -threads 6 -run scriptfile.lsf -use-solve eme
- The "-use-solve eme" argument checks out the EME solve license instead of the MODE GUI license.
- Then another corresponding solve license is used when running a simulation job within the script. See this page for details on license consumption when running simulations.
Running through the Python API
- Follow the instructions from the Python API - Session management.
- Pass the "use-solve" argument and optionally the threads argument as parameters in the constructor to define a method.
Example
Running an FDTD script with the default number of threads through the Python API using an FDTD solve license:
app = self.appConstructor(script=”scriptfile.lsf”,serverArgs={"use-solve":True});
Running an EME script with 6 threads through the Python API using an EME solve license:
app = self.appConstructor(script=”scriptfile.lsf”,serverArgs={"use-solve":”eme”, "threads" : 6});
See also
Running simulations using terminal in Linux
Resource configuration elements and controls
Lumerical solve, accelerator and Ansys HPC license consumption