Photonics

Photonics

Intermittent Error Python connecting to Lumerical

    • fdtdisgreat
      Subscriber

      Hi all,

      I am using Python on Spyder to run Lumerical. I am experiencing intermittent errors when running 'fdtd = lumapi.FDTD()' to open Lumerical. The error is:

      appOpen error: \n Failed to start messaging, check licenses...

      Typically this error will occur many times in a row before it suddenly works. Then the next day the error will be back. I am able to open Lumerical GUI via terminal consistently without any problems, and my licenses are correctly configured. I have the same preamble as suggested on Lumerical website (i.e spec_linux = importlib.util.spec_from_file_location("lumapi","/opt/lumerical/v221/api/python/lumapi.py" ) etc.)

      In addition, when I am able to run Lumerical via Python, sometimes I get an error when trying to save transmission results as a variable in Python (i.e. I define a function in Python that runs Lumerical, and the return of the function is 'fdtd.getresult("Trans_Monitor","T")' ). The error I get is 'failed to get variable'. This error is also intermittent, and I suspect related to the first error.

      I am running this on a RHEL server. Lumerical Version is 2022 R1.

      Thanks in advance.

    • fdtdisgreat
      Subscriber

      I've also noticed that each time I try to open it and it fails, an instance of 'fdtd-solutions-app' opens and hangs in the background (according to System Monitor).

    • Lito Yap
      Ansys Employee

       

      @mfoley,

      Please see this KB article: >https://optics.ansys.com/hc/en-us/articles/5771091294739

      Also, ensure that you have write access to the “/tmp” folder.

      And running on a supported RHEL version: >https://www.lumerical.com/licensing/system-requirements/

       

    • fdtdisgreat
      Subscriber

       

      Thanks for your response @lito yap.

      I am able to run Lumerical consistently through the terminal, so RHEL version is not the problem.

      I just restarted the server and Python is now able to open Lumerical without any errors (no other changes have been made to the Python code I am running or to the server itself). This makes me wonder if there is a problem with Lumerical not releasing resources or programs if it is closed a certain way (i.e. stopping Lumerical via Python console vs selecting ‘Quit and don’t save’ vs closing Lumerical GUI whilst it is running)? Is there known problem with regards to this? Restarting the server each time this problem occurs would not be a feasible long-term solution.

      Thank you in advance.

       

      • Lito Yap
        Ansys Employee

        Try the following:

        Check any running Lumerical FDTD applications in the background. 

        ps aux | grep fdtd 
        pgrep fdtd

        And kill the process using the PID shown from the above command.

        kill [PID]

         

Viewing 3 reply threads
  • You must be logged in to reply to this topic.