Photonics

Photonics

Topics related to Lumerical and more.

Topology Optimization Error

    • gangin2
      Subscriber

      Hello,

      I am running a topology optimization of a 90 degree bend (see below).

      The topology python script I adapted from the example on the website can run the zero-th iteration and it gets to the structure above.  However, it cannot run the next iteration.

      This is the terminal output:

      At iterate    0    f= -1.27792D+01    |proj g|=  2.50000D-01
      Making forward solve
      Making adjoint solve
      Running solves
      Processing forward solve
      Traceback (most recent call last):
        File "E:\Documents\Research\Lumerical\Inverse\bend\bend_opt2.py", line 74, in
          runSim(initial_cond, eps_min, eps_max, x_pos, y_pos, filter_R*1e-9, working_dir)
        File "E:\Documents\Research\Lumerical\Inverse\bend\bend_opt2.py", line 45, in runSim
          opt.run(working_dir = working_dir)
        File "C:\Program Files\Lumerical\v241\api\python\lumopt\optimization.py", line 582, in run
          self.optimizer.run()
        File "C:\Program Files\Lumerical\v241\api\python\lumopt\optimizers\generic_optimizers.py", line 50, in run
          res = spo.minimize(fun = self.callable_fom,
        File "C:\Program Files\Lumerical\v241\python\Lib\site-packages\scipy\optimize\_minimize.py", line 609, in minimize
          return _minimize_lbfgsb(fun, x0, args, jac, bounds,
        File "C:\Program Files\Lumerical\v241\python\Lib\site-packages\scipy\optimize\lbfgsb.py", line 345, in _minimize_lbfgsb
          f, g = func_and_grad(x)
        File "C:\Program Files\Lumerical\v241\python\Lib\site-packages\scipy\optimize\lbfgsb.py", line 295, in func_and_grad
          f = fun(x, *args)
        File "C:\Program Files\Lumerical\v241\python\Lib\site-packages\scipy\optimize\optimize.py", line 327, in function_wrapper
          return function(*(wrapper_args + args))
        File "C:\Program Files\Lumerical\v241\api\python\lumopt\optimizers\minimizer.py", line 24, in callable_fom_local
          fom = callable_fom(params_over_scaling_factor)
        File "C:\Program Files\Lumerical\v241\api\python\lumopt\optimization.py", line 781, in callable_fom
          fom = self.process_forward_sim(iter)
        File "C:\Program Files\Lumerical\v241\api\python\lumopt\optimization.py", line 714, in process_forward_sim
          Optimization.check_simulation_was_successful(self.sim)
        File "C:\Program Files\Lumerical\v241\api\python\lumopt\optimization.py", line 1027, in check_simulation_was_successful
          raise UserWarning('FDTD simulation did not complete successfully: status {0}'.format(simulation_status))
      UserWarning: FDTD simulation did not complete successfully: status 0.0

       

      If I check the log file, it states "Error: there was an unknown parallel error. The error code is 0, the process number is 5" for both the forward and adjoint solves.

       

      Once the script fails, I can independently run the simulation files that it has created for the forward and adjoint solves.  They will also crash but give more details:

      From this error message, since I am doing a narrowband varFDTD simulation I tried following the suggestion and unchecked "can optimize mesh algorithm for extruded structures."  However doing that does not solve the issue and I'm not sure how I can resolve the next error:

      Any help would be appreciated.  Thank you!

    • Fatema Chowdhury
      Ansys Employee

      Hello,

      According to Optimizable Geometry - Python API – Ansys Optics, one should work with FDTD for all topology optimizations. Therefore, I would first suggest that  you kindly try FDTD instead of varFDTD.

      For further support, resolving the issue without the access to the file could be difficult. Debugging such issues with a specific file is beyond the scope of ALF. I recommend that  you can kinldy create a case in ACSS (https://customer.ansys.com/) to provide you proper support. To know more about ACSS,please use this link(https://optics.ansys.com/hc/en-us/articles/5609426062483-How-to-register-on-Ansys-Customer-Support-Space)

Viewing 1 reply thread
  • You must be logged in to reply to this topic.