Photonics

Photonics

Topics related to Lumerical and more.

Lumerical Python API with newest Linux version 8.6

    • minkyu.kim
      Subscriber

      Hi,

      We had updated our cluster to newer RedHat version 8.6, and I was using Python API for Lumerical simulation.

      But when we updated the server, Python API cannot even open existing simulation files.

      I am using Lumerical 2023R1 version, and is this known issue?

      Simple "lumapi.FDTD(filename="test.fsp")" cannot open the file, but just blank FDTD is opened.

       

      Thanks,

      Minkyu

    • minkyu.kim
      Subscriber

      I found other cluster is working, and the difference is CPU. Cluster with problem is using AMD CPU with much larger memories, and the other without any problem is using Intel CPU. Does it matter?

      • Lito
        Ansys Employee

        @Minkyu,

        Does the new operating system have all the required libraries to run Ansys Lumerical?
            > Installing on a shared filesystem on Linux – Ansys Optics
        Did you update your environment to the new install path?
            > How to run Lumerical API (Python) scripts in Linux – Ansys Optics 

        How are you running the script? Directly from the Terminal/CLI or using a job scheduler? Or from the CAD/GUI >> Script file editor window with Python Integration = "active" as shown in the image? 

        Running the 1 liner script, "lumapi.FDTD(filename="test.fsp")" will simply open and close the FDTD CAD window. 

        Try the script below on your new system and see if it runs and a new simulation, "testapi.fsp" is created. 

        import lumapi
        fdtd = lumapi.FDTD()
        fdtd.addfdtd()
        fdtd.addring()
        fdtd.addmesh()
        fdtd.save("testapi.fsp")

         

    • minkyu.kim
      Subscriber

      Thank you for the reply.

       

      I was running lumapi by running script as below.

       

      import sys
      import importlib.util

      sys.path.append("[path_to_lumerical]/api/python/lumapi.py") #Default linux lumapi path

      spec_lin = importlib.util.spec_from_file_location('lumapi', "[path_to_lumerical]/api/python/lumapi.py")
      lumapi = importlib.util.module_from_spec(spec_lin)
      spec_lin.loader.exec_module(lumapi)

      fdtd = lumapi.FDTD(filename='test.fsp')

       

      How I can know if I have any missing library?

       

    • Lito
      Ansys Employee
       

      Consult IT if they checked the dependencies before installing Ansys Optics/Lumerical on the cluster? See the KB below or details.
          > Installing on a shared filesystem on Linux – Ansys Optics   

      Did you try running the script I provided from the CAD/GUI >> Script file editor window as shown in the image on my previous post? ☝

      import lumapi
      fdtd = lumapi.FDTD()
      fdtd.addfdtd()
      fdtd.addring()
      fdtd.addmesh()
      fdtd.save("testapi.fsp")

       

    • minkyu.kim
      Subscriber

      Hi thanks for the reply,

      The code you gave me is working on cluster with Intel process. But I found another cluster with AMD is also working.

      Maybe only specific cluster is not working which means library is somewhat missing.

    • Lito
      Ansys Employee

      @minkyu.kim,

      Thanks for the updates. I agree. Please consult with IT/cluster admin to resolve and check what is different on the machine that is having the issue. 

Viewing 5 reply threads
  • The topic ‘Lumerical Python API with newest Linux version 8.6’ is closed to new replies.