Hi Quang,

Are you using a parallel HDF5 (built with MPI)? How did you install meep
(built from source, conda package (release or nightly))?

I'm guessing it's some kind of deadlock when using MPI and parallel HDF5
since get_dft_array works, although I am unable to reproduce the hang. Are
you able to post the full simulation so I can debug further?

Chris

On Thu, May 2, 2019 at 5:12 PM Quang Nguyen <nguyen...@gmail.com> wrote:

> Hello all,
>
>
>
> I am looking to calculate the E-fields for my simulation as a function of
> frequency. To do so I add a dft field monitor using mp.add_dft_fields(…)
> and I attempt to get the data it records by using sim.output_dft(…).
> However, it appears the output_dft function doesn’t work.
>
>
>
> My simulation normally takes a few minutes to run, e.g. when computing
> just the flux. However, by calling output_dft it continues to run for hours
> without completing. I have tested outputting a fraction of the results
> using get_dft_array instead, and in that case the simulation will finish as
> normal and output the desired data. Thus, I believe my monitor is set up
> correctly and it is simply the output_dft function that is not working
> properly. The total data set is rather large, so I would like to use
> output_dft if possible since the .h5 file is relatively easy to work with
> for large data sets.
>
>
>
> For reference, below is some pseudocode of the relevant lines:
>
>
>
> dft_fields = sim.add_dft_fields([mp.Ex], fmin, fmax, nfreq,
> center=mp.Vector3(), size=mp.Vector3(sx,sy,sz-2*t_PML))
>
> sim.run(…)
>
> sim.output_dft(dft_fields, 'test')
>
>
>
> The above does not work and continues running forever as stated
> previously. In contrast, the following does work:
>
>
>
> dft_fields = sim.add_dft_fields([mp.Ex], fmin, fmax, nfreq,
> center=mp.Vector3(), size=mp.Vector3(sx,sy,sz-2*t_PML))
>
> sim.run(…)
>
> for i in range(nfreq):
>
>     ex_data = sim.get_dft_array(dft_fields, mp.Ex, i)
>
>     print("dft:, {}".format(ex_data))
>
>
>
> Actually the data set is long enough that the printed output has ellipses
> omitting a large part of the data, but leaving that aside, it does output
> something. The output_dft function does not. Any help would be greatly
> appreciated.
> _______________________________________________
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
_______________________________________________
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