anstmichaels / emopt

A suite of tools for optimizing the shape and topology of electromagnetic structures.
BSD 3-Clause "New" or "Revised" License
100 stars 41 forks source link

ModeFullVector: MUMPS numerical factorization error #11

Closed sbuchbinder closed 3 years ago

sbuchbinder commented 4 years ago

I receive an error from MUMPS when calling ModeFullVector.solve()

Error reported by MUMPS in numerical factorization phase: INFOG(1)=-9, INFO(2)=3

I think this is somehow related to memory allocation but I'm not totally sure?

In the same simulation setup, I call ModeFullVector.solve on a different ModeFullVector object with an even larger domain, and that passes.

In the past, I was able to sometimes solve this by playing with the -n option that I pass to mpirun. Changing the number of cores changes INFO(2).

Any advice / insight into what causes the error?

anstmichaels commented 4 years ago

Hi,

It is difficult to say what the cause of the error could be. Could you upload a script that reproduces the error so I can take a look?

I have encountered similar errors in the past when the simulation domain contains, for example, zero permittivity. In this case, the numerical problem is ill-posed. As a starting point, I would double check the permittivity and permeability values you are generating. You can do this by the calling StructuredMaterial.get_values_in(...) and StructuredMaterial.get_values(...) functions.