flaport / fdtd

A 3D electromagnetic FDTD simulator written in Python with optional GPU support
https://fdtd.readthedocs.io
MIT License
454 stars 116 forks source link

parallel computation #47

Open jjdredd opened 2 years ago

jjdredd commented 2 years ago

Hello, Thanks for your work. Is there a way to run this code in parallel on cpu? I assume that it's automatically parallelized if the cuda backend is used. Is this correct?

flaport commented 2 years ago

Hi @jjdredd ,

Currently the simulator supports computations on a CPU (numpy backend) or computations on a GPU (torch backend). However, further parallelization (for example using MPI) is not supported.

That said, it should be fairly trivial to create a dask backend (see backend.py). I would happily accept a PR for that :)

Best, Floris

jjdredd commented 2 years ago

Thanks. I'll take a look. didn't know about dask.