Hello,

I am trying to run the CrossRouter.py example

https://github.com/NanoComp/meep/blob/master/python/examples/adjoint_optimization/CrossRouter.py

as suggested at

https://homerreid.github.io/meep-adjoint-documentation/AdjointSolver/ExampleGallery/

with command:

python CrossRouter.py --verbose --visualize --optimize


it works fine, except no graphics appear. As soon as I run the command
without

--optimize

graphics try to appear but are immediately shut down, and I receive the
following error message:

FileNotFoundError: [Errno 2] No such file or directory: 'latex': 'latex'


With the following traceback:

Traceback (most recent call last):
  File "CrossRouter.py", line 170, in <module>
    op.run()
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/meep/adjoint/OptimizationProblem.py",
line 371, in run
    self.plot_geometry()
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/meep/adjoint/OptimizationProblem.py",
line 238, in plot_geometry
    vis.update(sim,'Geometry')
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/meep/adjoint/Visualization.py",
line 1096, in update
    plot_dft_data=False if case=='Geometry' else True if case
=='Forward' else 'flux')
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/meep/adjoint/Visualization.py",
line 722, in visualize_sim
    plt.tight_layout()
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/matplotlib/pyplot.py",
line 1382, in tight_layout
    gcf().tight_layout(pad=pad, h_pad=h_pad, w_pad=w_pad, rect=rect)
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/matplotlib/figure.py",
line 2377, in tight_layout
    pad=pad, h_pad=h_pad, w_pad=w_pad, rect=rect)
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/matplotlib/tight_layout.py",
line 366, in get_tight_layout_figure
    pad=pad, h_pad=h_pad, w_pad=w_pad)
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/matplotlib/tight_layout.py",
line 115, in auto_adjust_subplotpars
    tight_bbox_raw = union([ax.get_tightbbox(renderer) for ax in subplots
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/matplotlib/tight_layout.py",
line 116, in <listcomp>
    if ax.get_visible()])
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/matplotlib/axes/_base.py",
line 4373, in get_tightbbox
    bb_xaxis = self.xaxis.get_tightbbox(renderer)
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/matplotlib/axis.py",
line 1142, in get_tightbbox
    self._update_label_position(renderer)
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/matplotlib/axis.py",
line 1934, in _update_label_position
    bboxes, bboxes2 = self._get_tick_boxes_siblings(renderer=renderer)
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/matplotlib/axis.py",
line 1919, in _get_tick_boxes_siblings
    tlb, tlb2 = axx.xaxis._get_tick_bboxes(ticks_to_draw, renderer)
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/matplotlib/axis.py",
line 1125, in _get_tick_bboxes
    extent = tick.label1.get_window_extent(renderer)
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/matplotlib/text.py",
line 930, in get_window_extent
    bbox, info, descent = self._get_layout(self._renderer)
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/matplotlib/text.py",
line 313, in _get_layout
    ismath=ismath)
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/matplotlib/backends/backend_agg.py",
line 209, in get_text_width_height_descent
    s, fontsize, renderer=self)
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/matplotlib/texmanager.py",
line 464, in get_text_width_height_descent
    dvifile = self.make_dvi(tex, fontsize)
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/matplotlib/texmanager.py",
line 328, in make_dvi
    texfile], tex)
  File 
"/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/site-packages/matplotlib/texmanager.py",
line 298, in _run_checked_subprocess
    stderr=subprocess.STDOUT)
  File "/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/subprocess.py",
line 395, in check_output
    **kwargs).stdout
  File "/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/subprocess.py",
line 472, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/subprocess.py",
line 775, in __init__
    restore_signals, start_new_session)
  File "/home/hrferge/anaconda3/envs/pmpa/lib/python3.7/subprocess.py",
line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)



At this point I do not know how to solve my problems. Any Suggestions?

Thank you for your time.

- Halvor
_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to