AttributeError: '' object has no attribute 'CreateBlock


I have installed ngsuite parallel.
Even all the simple mpi examples are running ok, but for my code
I get this runtime error.

AttributeError: '' object has no attribute 'CreateBlockSmoother'

for this function:

The same code with the serial ngsuite (USE_MPI=OFF) is running.

When running with more than one MPI rank, a BilinearForm assembles a ParallelMatrix, a wrapper around a SparseMatrix with additional information about parallel connectivity of DOFs.

You can access the underlying local part of the matrix with a.mat…local_mat. A block-smoother for the local mat will, however, not give you anything useful for the global problem.

ParallelMatrix itself has no CreateBlockSmoother.
Multiplicative BlockSmoothers in parallel are not implemented (and would be unfeasible anyways as I do not think there is a way to do this efficiently and scalably).
Additive Block Jacobi can be used by calling CreateBlockSmoother(…, parallel=True) on the local_mat of the parallel matrix. It is not documented yet because I only recently added it.
However, for that to work, some additional (pretty strong) constraints for the blocks have to hold:
[li]Blocks are consistent across subdomain boundaries[/li]
[li]Blocks are ordered consistently across subdomain boundaries[/li]
[li]All DOFs in a block have to be shared by the same procs.[/li]
This excludes, for example, blocks that reach from a subdomain interface in the interior of any domain or ones which cross subdomain boundaries.

Note that CreateBlockSmoother with parallel=True gives you a block-smoother, whcih will let you CALL .Smooth(…) and .SmoothBack(…), but the results are undefined. Only use it additively!