Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/spacetime.jl
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ function blocking(points::Vector{T}, by, nthreads=Sys.CPU_THREADS) where T <: So
# This enables threading over partitions without race conditions. Note tha points that occupy the same
# finie-difference-grid point will be adjacent in "points" due to the above sort.
npartitions = min(nthreads, length(points))
npartitions >= 1 || error("max(nthreads, length(points)) must be greater than zero, nthreads=$nthreads, length(points)=$(length(points))")
npartitions >= 1 || error("min(nthreads, length(points)) must be greater than zero, nthreads=$nthreads, length(points)=$(length(points))")

nominal_points_per_partition,r = divrem(length(points), npartitions)
if r > 0
Expand Down