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

Remove use of threadid #95

Merged
merged 6 commits into from
Feb 21, 2022
Merged

Remove use of threadid #95

merged 6 commits into from
Feb 21, 2022

Conversation

devmotion
Copy link
Member

@devmotion devmotion commented Feb 19, 2022

One must not use threadid in @threads for ...., as discussed in https://discourse.julialang.org/t/behavior-of-threads-threads-for-loop/76042. This PR implements an alternative suggested in JuliaMolSim/DFTK.jl#588.

Edit: Since @spawn was introduced in Julia 1.3, we have to drop Julia < 1.3 or add special version guards.

@codecov
Copy link

codecov bot commented Feb 19, 2022

Codecov Report

Merging #95 (bb7ced2) into master (fe972e8) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #95      +/-   ##
==========================================
+ Coverage   97.68%   97.73%   +0.05%     
==========================================
  Files           7        7              
  Lines         216      221       +5     
==========================================
+ Hits          211      216       +5     
  Misses          5        5              
Impacted Files Coverage Δ
src/sample.jl 98.03% <100.00%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe972e8...bb7ced2. Read the comment docs.

@devmotion devmotion requested a review from cpfiffer February 20, 2022 21:01
Copy link
Member

@cpfiffer cpfiffer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it! Let's gooooooooo

@cpfiffer cpfiffer merged commit 24f88b1 into master Feb 21, 2022
@delete-merged-branch delete-merged-branch bot deleted the dw/threadid branch February 21, 2022 17:00
@cpfiffer
Copy link
Member

Failing tests were known and relate to MCMCChains, I ignored them and merged in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants