tidy3d icon indicating copy to clipboard operation
tidy3d copied to clipboard

Parallelize EME modesolves

Open gvnwst opened this issue 1 month ago • 2 comments

Ultra-Brief Background

I've been simulating some rather large (0.5 mm to 1 mm length) structures using EME, as the cost/benefit of FDTD is poor and the structures constrain light to propagate more or less in one direction. It's a case very well-suited to EME.

The problem

The test simulation took many hours to run (I thought it was totally stalled at first!). After some discussion with Tom, it appears that it's due to the number of cells and number of modes per cell I requested. In one of my more complex structures, the sum of cells*modes per cell was around 450 (total modes solved). With an auto mesh, min 12 points per wavelength (note this is much lower than I am comfortable with for such a design! 18-25 is preferable), simulation runtime was 3 hours.

The cause, and a requested solution

As I currently understand, the long runtime is due to modesolves on each cell running serially. Is it possible to run the modesolves for an EME simulation in parallel, essentially using Batch? I have run batches of ModeSolver requesting >>450 modes, using a denser mesh, with a runtime vastly shorter than 3 hours.

For me, the current limitations seriously restrict the use cases of EME. Y'all have spoiled us with a fast FDTD solver; having an EME solver which is considerably slower makes it much less interesting or valuable a tool!

gvnwst avatar Nov 25 '25 21:11 gvnwst