Quadratic complexity of dense matrix allocation (e.g., on Real space)

Issue #713 resolved
Jan Blechta created an issue

Quadratic complexity of sparsity pattern allocation has already been resolved by pull request #255. It remains to allocate PETSc matrix using full sparsity pattern data (full pattern mode) as distinct from using just number of non-zeros (num nonzeros mode) in rows which is efficient for sparse matrices. There are few options:

  1. Have both num nonzeros and full pattern modes and allow switching them by parameter/argument/TensorLayout interface/SparsityPatternBuilder interface, etc.

  2. Have both num nonzeros and full pattern modes and detect a need for using latter automatically.

  3. Drop num nonzeros mode and use full pattern mode exclusively. This has been tested by pull request #255 and seemed to have no serious regression.

Investigate the situation with other backends as well.

Comments (5)

  1. Jan Blechta reporter

    @garth-wells, what's the current status of PETScMatrix? Can it be touched now? (You asked me to postpone the fix before as you had MatNest plans with @chris_richardson.)

  2. Jan Blechta reporter

    Insert dense rows in increasing column order before assembly

    This avoid dense rows being inserted in random colun index order during asembly resulting in quadraric complexity. Resolves issue #713.

    → <<cset c8f999c8a87e>>

  3. Log in to comment