Photonics

Photonics

Difference between lumerical_gui and lum_fdtd_gui

    • jungtaek.kim
      Subscriber

      Based on this link:

      https://optics.ansys.com/hc/en-us/articles/360037824513-Python-API-overview

      Python API requires an available "lumerical_gui" license, which belongs to Ansys Enterprise.

      We only have "lum_fdtd_gui" and other features that belong to Ansys (Standard),

      and we are struggling to run Python API from outside the Lumerical GUI.

      Do we need "Ansys Enterprise" to get "lumerical_gui"? Or is there any methods to run Python API from outside the Lumerical GUI?

      Thank you in advance.

    • chx33
      Subscriber

      According to the information given in the following link:

      https://optics.ansys.com/hc/en-us/articles/360052724713-List-of-licensed-features-by-product 

      lumerical_gui license is only contained in ANSYS enterprise but NOT part of ANSYS standard or Academic Lumerical Research. Is this information still up to date, and would it be possible to run Python API in batch mode fully outside the Lumerical FDTD GUI?

    • Lito Yap
      Ansys Employee

      Both Ansys Enterprise and Standard licenses support running the API. The API is part of our scripting environment which is part of the Lumerical CAD/GUI component. Running the API will always require a GUI interface/connection and a GUI license, either "lumerical_gui" or "lum_product_gui", which ever is available for checkout on your Ansys LM/server. See this KB articles for details. 

      Hope this helps.
      Lito

      * Answers to common issues can be found in the Lumerical installation and licensing troubleshooting and FAQ.

    • jungtaek.kim
      Subscriber

      Thank you for your reply.

      However, I got the following error where I can use the GUI interface:

      =====

      Traceback (most recent call last):
        File “test.py”, line 438, in
          debug=debug,
        File “test.py”, line 229, in run_simulation
          fdtd = lumapi.FDTD(hide=hide)
        File “/ihome/crc/install/lumerical/2021R2/lumerical/v212/api/python/lumapi.py”, line 1298, in __init__
          super(FDTD, self).__init__(‘fdtd’, filename, key, hide, serverArgs, **kwargs)
        File “/ihome/crc/install/lumerical/2021R2/lumerical/v212/api/python/lumapi.py”, line 1076, in __init__
          self.handle = open(product, key, hide, serverArgs)
        File “/ihome/crc/install/lumerical/2021R2/lumerical/v212/api/python/lumapi.py”, line 238, in open
          raise LumApiError(error)
      lumapi.LumApiError: ‘appOpen error: \n Failed to start messaging, check licenses…/ihome/crc/install/lumerical/2021R2/lumerical/v212/bin/fdtd-solutions: line 8: 28796 Aborted                 (core dumped) $FDTD_BIN_DIR/fdtd-solutions-app “$@”\n'
      Exception ignored in:
      Traceback (most recent call last):
        File “/ihome/crc/install/lumerical/2021R2/lumerical/v212/api/python/lumapi.py”, line 1174, in __del__
          close(self.handle)
      AttributeError: ‘FDTD’ object has no attribute ‘handle'

      =====

      Do you have any idea for this error?

    • chx33
      Subscriber

      As a follow up, when Python API is run on a node with graphical capabilities, then at the execution of line fdtd=lumapi.FDTD() the above "check licenses" error shows up, but a FDTD GUI window opens up simultaneously from which work can continue. However, the variable 'fdtd' remains uninitialized due to the error, and cannot be used within Python. This seems to suggest that our license is for GUI use only and not for running Python API in pure batch mode. Do you have any suggestions about how we can run the Python API without the above error message?

    • Lito Yap
      Ansys Employee

      If you have more than 1 FDTD GUI license, try to run the script below from the Lumerical FDTD CAD/GUI, script editor. Where you have the API configured to "Use Python provided by Lumerical" and integration status as "active". 

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

      If you have only 1 GUI license for each Lumerical product/solver, i.e. 1xFDTD and 1MODE, open the MODE CAD/GUI and run the script above that opens and runs the FDTD GUI.

      Otherwise, If you want to run the API from the terminal/outside of the Lumerical CAD/GUI, see this KB guide for details on setting up your Linux shell/environment. 

      Best,
      Lito

      * Answers to common installation and licensing issues can be found in the Lumerical Troubleshooting and FAQ.

    • jungtaek.kim
      Subscriber

      Thank you for your comment.

      With the GUI, it works fine.

      Since I want to run the API from the terminal, it leads to the issue we raised.

      I have already followed the instructions you sent (about environment setups).  It sometimes works but does not often work as mentioned by @chx33 above.

    • Lito Yap
      Ansys Employee

      Ensure that you are followed everything in the KB guide. And the corresponding version and installation are correct. Our bundled Python3 cannot have additiona modules installed. If you are going to use your own installation of Python and not our bundled Python3 - use your Python 3 installation path. Are you able to run the sample script I provided (below) from the terminal without the CAD/GUI after configuring your shell/environment? Remove the "lumtestpy.fsp" first in your directory before running the script to ensure that the script run and create the "lumtestpy.fsp" file. 

      import lumapi
      fdtd = lumapi.FDTD()
      fdtd.addfdtd()
      fdtd.addring()
      fdtd.addmesh()
      fdtd.save("lumtestpy.fsp")
    • chx33
      Subscriber

      I just tried your approach and executed the python script within the GUI, using the integrated Python version as provided by Lumerical. However, I still receive the same error, while a second GUI window is being launched, verifying license, upon execution of fdtd=lumapi.FDTD(), as shown in the screenshot.

    • Lito Yap
      Ansys Employee

      The lumapi script in Linux will require additional GUI license when it this run from the CAD. So when you run the sample script I provided from FDTD it will take up 2 FDTD GUI licenses. Have you tried running the sample script I provided from MODE? 

      Otherwise, If you want to run the script from the terminal/outside of the Lumerical CAD using only 1 GUI license, see this KB guide for details on setting up your Linux environment. 

      I would also suggest to use the latest version, Lumerical 2022 R2.1. There has been bug fixes and patches since the 2021 R2 version.  

       

    • chx33
      Subscriber

      Many thanks for your reply, I was now able to execute Python API from the MODE CAD.

      Related to running Python outside the GUI, I came across this forum exchange about the same error around one month ago. Has this issue now been resolved, or do we need to upgrade to the newer Lumerical version for it to work (We currently have 2021 R2)?

      • Lito Yap
        Ansys Employee

        As mentioned in my last message, "I would also suggest to use the latest version, Lumerical 2022 R2.1. There has been bug fixes and patches since the 2021 R2 version."

    • chx33
      Subscriber

      Many thanks for this clarification. Just one more question: Does our current academic licence (5-tasks) cover the newer Lumerical version, or would we need renew it?

    • Lito Yap
      Ansys Employee

      If you are running the license on the Ansys License Manager you should be good with the latest version of Lumerical.

    • chx33
      Subscriber

      Thanks for this info! However, when we try to launch the 2022R2.1 version, we receive an error saying the following:

      "qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
      This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
      "

      No such issue happens for the previous version 2021R2. What could be the reason for this problem?

      • Lito Yap
        Ansys Employee

        See this KB guide on resolving graphics related issues on Linux.

        https://optics.ansys.com/hc/en-us/articles/6792647875987-How-to-resolve-system-and-OpenGL-graphics-related-issues 

        Best, 

        Lito

        * Answers to common installation and licensing issues can be found in the Lumerical Troubleshooting and FAQ.

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