Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added documentation for parallel fixes for estimators #2233

Merged
merged 3 commits into from
Apr 3, 2023
Merged
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
3 changes: 3 additions & 0 deletions tardis/montecarlo/montecarlo_numba/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,14 @@ def montecarlo_main_loop(
)
rpacket_trackers.append(RPacketTracker())

# Get the ID of the main thread and the number of threads
main_thread_id = get_thread_id()
n_threads = get_num_threads()

estimator_list = List()
for i in range(n_threads): # betting get tid goes from 0 to num threads
1e9abhi1e10 marked this conversation as resolved.
Show resolved Hide resolved
# Note that get_thread_id() returns values from 0 to n_threads-1,
# so we iterate from 0 to n_threads-1 to create the estimator_list
estimator_list.append(
Estimators(
np.copy(estimators.j_estimator),
Expand Down