Skip to content

Commit 4bd8c5a

Browse files
committed
turn off TimerOutputs when using threads
1 parent f6ada72 commit 4bd8c5a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/CMBLensing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ using StaticArrays: @SMatrix, @SVector, SMatrix, StaticArray, StaticArrayStyle,
4545
StaticMatrix, StaticVector, SVector, SArray, SizedArray
4646
using Statistics
4747
using StatsBase
48-
using TimerOutputs: @timeit, get_defaulttimer, reset_timer!
48+
using TimerOutputs: @timeit, get_defaulttimer, reset_timer!, disable_timer!
4949
using UnPack
5050
using Zygote
5151
using Zygote: unbroadcast, Numeric, @adjoint, @nograd

src/util.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,10 @@ macro show⌛(ex)
381381
end
382382
end
383383

384+
@init if Threads.nthreads() > 1
385+
disable_timer!(get_defaultimer())
386+
end
387+
384388

385389

386390
# used in a couple of places to create a Base.promote_rule-like system

0 commit comments

Comments
 (0)