Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyTraceback (most recent call last):
File “/home/wan01937/Workspace/Fractal_boundary/fractal_boundary/n2p_ex1.py”, line 16, in
ngmesh = unit_cube.GenerateMesh(maxh=0.1).Distribute(comm)
TypeError: Distribute(): incompatible function arguments. The following argument types are supported:
1. (self: netgen.libngpy._meshing.Mesh, comm: netgen.libngpy._meshing.MPI_Comm) → netgen.libngpy._meshing.Mesh
Invoked with: <netgen.libngpy._meshing.Mesh object at 0x7f28d7967b70>, <mpi4py.MPI.Intracomm object at 0x7f2b0690c1b0>
A similar thing happens every time I try to use something like unit_cube.GenerateMesh(maxh=0.1).Distribute(comm). Does anyone have some idea about the problem?
It looks like the mpi4py communicator cannot be converted to a Netgen mpi-communicator. Did you run Netgen - cmake after installing mpi4py ?
Your CMakeCache.txt should contain:
If you are intrested in using PETSc I suggest you have a look into ngsPETSc (it supports more features then standard ngs2petsc, such as NEST matrix, non linear problems and it also gives you acess to more PETSc PC). You can find the docs, including how to install properly NGSolve here: Welcome to ngsPETSc’s documentation! — ngsPETSc 0.0.1 documentation
Best,
U.
However, the problem still exists, and I could not find USE_MPI4PY:BOOL=ON in my CMakeCache.txt, as attached. Is there anything else I need to do? CMakeCache.txt (24.5 KB)
Btw, I can actually find what you wrote in the CMakeCache.txt in the directory /ngsolve-build/netgen. And I can see “Including MPI version 3.1” if I just start netgen. However, the mpi4py communicator still cannot be converted to a Netgen mpi-communica CMakeCache.txt (23.2 KB)
tor.