We are designing nanophotonic structures and components, i.e., optical structures with feature sizes smaller than the wavelength of light. This leads to quite large electrodynamics simulations, since the electromagnetic fields must be resolved at a subwavelength scale (to find the highly localized fields) in components that are several thousands of wavelengths large. In general, we are interested in finding new nanophotonic structures with interesting and/or unexpected optical behaviour. This requires inverse design, i.e., determining the exact geometry of a device that exhibits a prescribed optical response. Inverse design is being achieved by parameter scans, classical optimization methods, or with the use of neural networks, depending on the number of degrees of freedom we want to optimize. Whatever method is chosen, a large number of simulations must be run, either sequentially or simultaneously.