This is a package to help use all the CPU cores when running multithreaded simulations or solvers. With Threads.@threads or OhMyThreads.jl, each parallel loop needs to spawn new tasks on each outer iteration. Loops that don’t depend on each other can’t easily overlap. JobGraphs.jl lets you describe loops of parallel loops and their dependencies. This description can be planned and then run many times on a fixed number of worker tasks.
Linear Algebra · The Julia Language might be what you are looking for, if you just want to know how fast a CPU is and don’t have a specific problem in mind.
JobGraphs is built using @spawn in a loop right now. JobGraphs is another scheduler that sits to the left of the Julia scheduler in this diagram. It runs job chunks on Julia worker tasks, so it doesn’t give low level control over this. The ThreadPinning.jl package can be used to control what cores or hyperthreads Julia will use. I could also add an option to use Threads.@threads :static so each worker task has a fixed thread id.
In the past month I’ve been writing more complex programs using JobGraphs.jl. For example, various structure relaxation algorithms like conjugate gradients and FIRE. I’ve been able to scale well up to at least 8 cores; however, the ergonomics are pretty bad. For example a 200 line program expands to 600 lines in JobGraphs due to all of the additional explicit per chunk and per worker state management, reductions, and code to setup the graph.
KernelAbstractions.jl in the unreleased changes section notes that kernel launch costs on the CPU backend could potentially be greatly reduced in the future. If this can happen it might be possible to replace JobGraphs.jl with KernelAbstractions.@spawn, KernelInterface.record_event, and KernelInterface.wait_event.