-
Hi all I am running a simulation of a ring resonator using a gaussian source and using harminv to analyse the resonant modes. I start out with a source with a center frequency fcen and a width df. When investigating one of the frequencies, i.e. I set m, fcen to match one of the found resonant frequencies and then reduce df to only include one resonance, I get the following error: 'harminv.c: invalid argument to ZGEEV' from line 503 in the harminv code. Increasing the resolution or the size of the cell does not work. Has anyone had the same issue or have any idea how to fix it? For reference I am running python 3.10.4, pymeep 1.23.0, numpy 1.22.3, nomkl 3.0, libblas 3.9.0, and harminv 1.4.1. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
How are you calling Harminv? It doesn't like one of the arguments you are using. (Specifically, LAPACK doesn't like one of the arguments you passed) |
Beta Was this translation helpful? Give feedback.
-
I have found a fix for this problem. It seems like there is an upper limit of how many cores Harminv can tolerate. The code runs well with up to 12 cores, but increasing the number of threads above this causes these errors. I don't know if this is an issue to fix in upcoming releases, but for me this can be considered solved. |
Beta Was this translation helpful? Give feedback.
-
Apparently this is a problem with some LAPACK builds — ZGEEV isn't thread-safe for large numbers of cores unless LAPACK is built with (Interestingly the other discussion thread also arose from a electromagnetics solver, in that case S4.) The LAPACK calls in Meep are not performance critical, so I would generally just recommend against using multiple cores for your BLAS library. (You won't want to do this if you are parallelizing Meep with MPI anyway.) |
Beta Was this translation helpful? Give feedback.
I have found a fix for this problem. It seems like there is an upper limit of how many cores Harminv can tolerate. The code runs well with up to 12 cores, but increasing the number of threads above this causes these errors.
I don't know if this is an issue to fix in upcoming releases, but for me this can be considered solved.