Problem running complex dolfinx demo in parallel

Hi, i’m currently having trouble running dolfinx complex mode in parallel.

Everything works has expected while running in serial with the solution converging to the analytical one, but when i switch to run with mpi problems start to occur. I either get a segmentation fault or the simulation runs endlessly without giving any error message, depending on the solver i choose. This exact behavior also occurs when i try to run the demo “Electromagnetic scattering from a wire with scattering boundary conditions”, where the simulation in parallel runs endlessly without giving any error message (i don’t change anything in the file). I don’t know exactly what is happening, if it’s a problem with my installation or some feature that is not yet implemented.
My second environment using dolfinx in real mode doesn’t have this problem and i can even solve the same problem using a mixed space formulation in parallel, although i would much rather use dolfinx in complex mode as it seems more efficient from the tests made in serial.

Any advice would be great, thanks.

How did you install the complex mode environment?

Could you also pinpoint what line in

that is hanging? Ie comment out blocks of code until it runs.

Hi, so the install was done using conda with the following commands in order:

  • conda create -n fenicsx-complex
  • conda activate -n fenicsx-complex
  • conda install -c conda-forge python=3.10 fenics-dolfinx petsc==complex mpich
  • conda install gmsh python-gmsh
  • conda install pyvista

As for the error it appears at the solver line. I did further testing and apparently i can run this The Poisson problem with complex numbers — FEniCSx tutorial tutorial in parallel without any problem.