The guidelines shown in this post is for running Lumerical (Python) API scripts, 'lumapi' or 'lumopt' from Terminal in Linux. The process will allow running these scripts utilizing only 1 Lumerical GUI license.
- Append the Lumerical, Python API and the Python 3 installation directory into your shell environment as shown here.
- Check the PATH or which python3 and Lumerical installation you are using.
echo $PATH echo $PYTHONPATH which python3 which fdtd-solutions
- The output should show your current settings.
Running the API script
- Change the directory to the location of your script file.
- Run the Python API script using the Python 3 set in your environment.
cd /path_to/script_simulation_files python3 myscript.py
Note: This will run the simulation in your script using the resource configuration (product preference.ini file) set in the Lumerical GUI. If you want to run optimization/sweeps concurrently on your local machine, set this beforehand in the resource configuration with the "Capacity" option.