Ansys Learning Forum Forums Discuss Simulation Photonics Error when running a topology optimization on a cluster (Linux) Reply To: Error when running a topology optimization on a cluster (Linux)

Lito
Ansys Employee

Hi samupekkaojanen,

Based on the information provided, you are running the scripts without GUI on Linux.

>>>Running CAD jobs on headless Linux systems – Ansys Optics 

 

If you are able to run: 

xvfb-run "/home/opt/Lumerical/2021-r1/python-3.6.8rc1/bin/python" somepythonscript.py

But you are having issues running a different lumapi/lumopt script:

xvfb-run "/home/opt/Lumerical/2021-r1/python-3.6.8rc1/bin/python" topology_runsim.py

Then the issue is with your script, "topology_runsim.py".

Try to saving the script below (lumtest.py): 

## save as lumtest.py ##
import lumapi
fdtd = lumapi.FDTD()
fdtd.addfdtd()
fdtd.addring()
fdtd.addmesh()
fdtd.save("lumtestpy.fsp")

Run the above script: 

xvfb-run "/home/opt/Lumerical/2021-r1/python-3.6.8rc1/bin/python" /path_to_script/lumtest.py

It should create the "lumtestpy.fsp" simulation file on the same working directory as script.Â