DotMP Pre-Release v1.6.0-pre1
Pre-releaseDotMP v1.6.0 isn't planned to incorporate a ton of new features (though there are some!). Rather, it aims to provide a wide plethora of well-needed performance improvements across the board.
This is the first pre-release of v1.6.0.
Licensing Changes
The project license has been changed from MIT to LGPL 2.1.
Changes to the Scheduler API
The schedule
parameter in Parallel.For
and its derivatives now take implementations of the IScheduler
interface instead of a DotMP.Schedule
enum. The changes are fully source-compatible with previous versions, but breaks API and ABI compatibility. There are not only performance benefits to doing this, but in addition, the code is simpler, more modular, more maintainable, more readable, has less duplication, and is expansible by the user.
The IScheduler
interface is public-facing and permits users to implement their own custom schedulers. Details are outlined in the new wiki!
We also introduce a new work-stealing scheduler. The work-stealing scheduler can be accessed via DotMP.Schedule.WorkStealing
, and has been seamlessly integrated into the rest of DotMP. Details are also outlined in the new wiki.
Performance Improvements
There have been minor performance improvements across the board with parallel-for loops. However, collapsed for loops in 2D and 3D see substantial performance improvements, over 3x in some of my benchmarks. Static scheduling sees a performance bump as well from better avoidance of false sharing issues.
Bug Fixes
Prior to this release, if an exception was thrown from inside a parallel region, it could not be caught from outside the region. Now, exceptions thrown inside parallel regions are properly caught and re-thrown in serial space, allowing for try/catch blocks to be thrown around a parallel region and catch exceptions that happen in parallel space.
Planned Improvements
Before DotMP v1.6.0 is fully released, some more improvements are planned:
- Fix issue where tasks can't call
taskwait
without a deadlock, which limits opportunities for recursive parallelism. - Optimize 4+ dimensional collapsed for loops.
- Do in-depth performance tuning across the entire tasking subsystem.
What's Changed
- Full rewrite of core scheduler, support custom schedulers by @computablee in #101
- Implement proper exception handling from threads by @computablee in #103
- nuget: bump the fluent group in /DotMP-Tests with 1 update by @dependabot in #102
- Major refactoring by @computablee in #104
- nuget: bump the bench group in /benchmarks/HeatTransfer with 2 updates by @dependabot in #106
- nuget: bump the xunit group in /DotMP-Tests with 3 updates by @dependabot in #105
- Significant performance improvements, new scheduler by @computablee in #107
- Better benchmark, more lenient testing for GitHub Actions by @computablee in #109
Full Changelog: v1.5.0...v1.6.0-pre1