Problem with real functionspace in parallel

I face a problem using a real function space in parallel. I have the following MWE

from fenics import *

# parameters["dof_ordering_library"] = "Boost"

mesh = UnitSquareMesh(8, 8)
R = FunctionSpace(mesh, "R", 0)

which, when run with mpirun -n 2 python test.py fails with the following reason

*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
***
***     fenics-support@googlegroups.com
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------------------------------------------------------------------------
*** Error:   Unable to re-order graph using SCOTCH.
*** Reason:  Error during re-ordering.
*** Where:   This error was encountered inside SCOTCH.cpp.
*** Process: 0
*** 
*** DOLFIN version: 2019.1.0
*** Git changeset:  ea4ec9db9a0ab5757694c6a6ff308b135231a4dd
*** -------------------------------------------------------------------------

So apparently, SCOTCH can not reorder the (single) DoF in parallel. Running the script in serial works fine.
Also, uncommenting the one commented line to use boost as graph reordering tool also works. Does anyone have any ideas how to fix this or where the issue comes from?

For the scotch version, I am using

scotch                    7.0.4                hd53efc5_2    conda-forge

which is installed with PETSc 3.21 from conda forge.
I have tried downgrading to scotch v6, which worked for me, but then I could not use the newest PETSc version.

Thanks in advance,
Sebastian

I could change my code so that I don’t require a single real function space is not required anymore. For mixed elements, where one of them is real, there seems to be no issue. I’ll leave this here, in case anyone else has the problem.

Even with mixed elements some issues arise. For example this code returns the same error if run in parallel

from fenics import *

mesh = UnitSquareMesh(8, 8)
P1 = FiniteElement("CG", mesh.ufl_cell(), 1)
R = FiniteElement("R", mesh.ufl_cell(), 0)
ME = MixedElement([P1, R])
V = FunctionSpace(mesh, ME)

up = Function(V)
u, p = up.split(deepcopy=True)

Does anyone have suggestion on how to proceed? Thanks!

@plugged, in the meanwhile this issue is solved, could you please explain me how to downgrade SCOTCH while keeping fenics at version 2019.1.0 in conda? Thank you!

You can do so with the command

conda create -n <name> -c conda-forge fenics=2019 scotch"<7"

when you install a new environment. Be careful, as other specifications could result in you also installing libscotch 7, which is not compatible with scotch 6.

1 Like