When running a job that requires a CAD instance (eg. Lumerical Script, Python API, or LumOpt), you will need to have a graphics environment (even if it is hidden). On compute clusters consider running scripted workflows on nodes with visualization capabilities; then modifying the resource configuration to distribute the workload or submitting jobs from the terminal to the headless nodes.
While having a full graphical interface on all instances is our supported solution, if this is not possible you can try a virtual X11 display.
Notes: This is not supported on all Linux installations and is provided as is without further support.
Using a virtual display (Xvfb)
- Install Xvfb (consult your operating systems documentation for proper instructions)
$ sudo yum install xorg-x11-server-Xvfb
- Run your application with a virtual display:
xvfb-run --auto-servernum /opt/lumerical/2020a/bin/fdtd-solutions -run your_script.lsf
xvfb-run --auto-servernum python lumopt_example.py