Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

AttributeError: 'ngsolve.la.ParallelMatrix' object has no attribute 'CreateBlock

More
4 years 4 months ago #2199 by blobash
Hello,

I have installed ngsuite parallel.
Even all the simple mpi examples are running ok, but for my code
I get this runtime error.
Code:
AttributeError: 'ngsolve.la.ParallelMatrix' object has no attribute 'CreateBlockSmoother'

for this function:
a.mat.CreateBlockSmoother(blocks)

The same code with the serial ngsuite (USE_MPI=OFF) is running.
More
4 years 4 months ago - 4 years 4 months ago #2201 by lkogler
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:
  • Blocks are consistent across subdomain boundaries
  • Blocks are ordered consistently across subdomain boundaries
  • All DOFs in a block have to be shared by the same procs.
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!
Last edit: 4 years 4 months ago by lkogler.
Time to create page: 0.121 seconds