Skip to content

Multifrontal TODOs #2350

@dellaert

Description

@dellaert

Context:

We created a new class MultiFrontalSolver designed to

  • solve the same system multiple times - as is common in a nonlinear optimization loop. Other than the legacy GaussianFactorGraph pipeline, this allocates all the memory in advance and is optimized for cache performance and avoiding mallocs.
  • deal with changing damping parameter lambda without as little overhead as possible
  • when TBB is not installed, it uses a newly created TaskScheduler which provides parallel processing for the multifrontal elimination (bottom-up) and solve (top-down).

Dirty secret: Frank pinned the number of threads to be 0.75 * nr cores, for both TBB and Mixin. This is super-important for the TaskScheduler, as I think because Eigen also tries threads and get starved. This might make TBB look worse (as it might do that again).

Goal:

  • Mixin (name for using TaskScheduler/ForestTraversal) beats TBB every time. Then we can eradicate TBB. This though means that the legacy GTSAM also has to use ForestTraversal. That would be awesome!

What's left:

  • Have a proper SymbolicAnalysis class that bundles the merging code, use payload in SymbolicFactor
  • If MULTIFRONTAL_SOLVER is selected, throw if conditions not met - don't fail silently.
  • merged leaves should be parallel in the eliminate step
  • problemSize tuning and max (branch by Frank)
  • pinning of threads
  • in MFC, line 381, just add to the queue in the TaskScheduler - will also share the threadpool if multiple parallel updates are happening
  • threads = cores - 1 ?
  • add datasets in-between BAL and chain: SLAm, sparser SFM
  • Profile @tzvist approach to parallelizing parent updates rather than per-thread storage
  • See whether we can do same linear graph with different lambda, even after eliminate. Probably not.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions