You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there is a mistake in lecture 5 notes, in the "Multithreaded Parameter Searches" section, in the following code:
const _u_cache_threads = [Vector{typeof(@SVector([1.0,0.0,0.0]))}(undef,1000) for i in1:Threads.nthreads()]
functioncompute_trajectory_mean5(u0,p)
# u is automatically capturedsolve_system_save!(_u_cache_threads[Threads.threadid()],lorenz,u0,p,1000);
mean(_u_cache)
end@btimecompute_trajectory_mean5(@SVector([1.0,0.0,0.0]),p)
After solving the system, the iteration are stored in _u_cache_threads[Threads.threadid()], but then the mean is computed on _u_cache, which, in my understanding, is not used anymore at this point of the notes.
It can be deceiving since serial_out - threaded_out it's still all 0s, but if you check the output of any of serial_out or threaded_out, the means for different ps have all the same value.
I think it should be mean(_u_cache_threads[Threads.threadid()]), is that correct?
(I'm not actually taking the course, I'm not a MIT student, I studying from the lecture notes in this repo)
Giacomo Randazzo
The text was updated successfully, but these errors were encountered:
Hi,
I think there is a mistake in lecture 5 notes, in the "Multithreaded Parameter Searches" section, in the following code:
After solving the system, the iteration are stored in
_u_cache_threads[Threads.threadid()]
, but then the mean is computed on_u_cache
, which, in my understanding, is not used anymore at this point of the notes.It can be deceiving since
serial_out - threaded_out
it's still all0
s, but if you check the output of any ofserial_out
orthreaded_out
, the means for differentp
s have all the same value.I think it should be
mean(_u_cache_threads[Threads.threadid()])
, is that correct?(I'm not actually taking the course, I'm not a MIT student, I studying from the lecture notes in this repo)
Giacomo Randazzo
The text was updated successfully, but these errors were encountered: