Skip to content

Multithreading #177

Description

@djukic14

Hi @krcools,
I’ve pushed a PR that introduces (a preliminary version of) basis function coloring for the multi-threaded assembly of system matrices.
If you're interested in incorporating this, I’d be happy to discuss the best approach for integration. Currently, the coloring is offered as a third option alongside the existing single-threaded and multi-threaded assemble! Multi-threading is enabled by passing a scheduler from OhMyThreads.jl to the threading argument:

T = assemble(op, X, X; threading=DynamicScheduler())

This also allows for more control, such as using only a subset of the available threads. When using SerialScheduler, no coloring is applied, and assembly proceeds in a single thread.
The coloring itself is performed using GraphsColoring.jl with the WorkstreamDSATUR algorithm, which aims to produce balanced colors.
Additionally, I’ve added a new progress bar and parallelized the computation of the potential!
I’d be glad to refine this further (and eliminate any potential bugs I introduced) based on your feedback.
Best regards,
Danijel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions