Closed sbuchbinder closed 4 years ago
Odd, I havent seen this one before. Do you have an example file which produces the problem so that I can take a look? Does the wg_modes_3D.py example work on your machine? Also, what version of PETSc do you have installed?
I was able to figure this one out earlier today.
The key is to not have w_pml be a list (as returned from the sim object).
I am trying to calculate the 2d cross section mode of a waveguide (built using StructuredMaterial3D).
When I try to run, I get an error: Arguments are incompatible Both n and N cannot be PETSC_DECIDE
Traceback (most recent call last): File ".../my_file.py", line 105, in
neigs=num_modes
File ".../emopt/modes.py", line 1209, in init
self._A.setUp()
File "PETSc/Mat.pyx", line 570, in petsc4py.PETSc.Mat.setUp
Following https://lists.mcs.anl.gov/pipermail/petsc-users/2015-January/023985.html, I tried changing line 1207 of modes.py to:
self._A.setSizes([(Nfields*self._M*self._N, PETSc.DETERMINE), (Nfields*self._M*self._N, PETSc.DETERMINE)])
This gave an out of memory error (amusingly, Memory requested 18446744073709520896). Though my structure is significantly smaller than the one used in the examples/waveguide_modes/wg_modes_3D.py.
Any ideas?