-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
recursive @threads
blocks unsupported
#18335
Comments
I don't think we support nested |
I understand it is a bit messy to have thread safe nested macros. |
I think we should have the feature so this should be fixed. Just stating that our really simple runtime probably doesn't handle this and is probably why you see the weird result. |
I know multi threading is a real headache... Thank you for your work with Julia! |
Yes, we need to leave this open. |
@threads
blocks unsupported
Solving it right now for the very limitted But this becomes harder when more thread functionality is added; I think |
This will definitely work once threading is less experimental, but it will take some time and effort. |
* Print a warning if an error occurs in the threaded loop (Helps JuliaLang#17532) * Make recursive threaded loops "work" (Fix JuliaLang#18335). The proper fix will be tracked by JuliaLang#21017
* Print a warning if an error occurs in the threaded loop (Helps JuliaLang#17532) * Make recursive threaded loops "work" (Fix JuliaLang#18335). The proper fix will be tracked by JuliaLang#21017
* Print a warning if an error occurs in the threaded loop (Helps JuliaLang#17532) * Make recursive threaded loops "work" (Fix JuliaLang#18335). The proper fix will be tracked by JuliaLang#21017
* Print a warning if an error occurs in the threaded loop (Helps JuliaLang#17532) * Make recursive threaded loops "work" (Fix JuliaLang#18335). The proper fix will be tracked by JuliaLang#21017
The problem occurs when a function having a threaded loop calling another function with
a threaded loop inside.
here is a code sample computing the mean of a random matrix.
expected result 0.5
the result in detail is given in file bugThread.txt
summary :
call to meanMat(vmat[1]) OK 0.49068859745047
call to meanMat(vmat[2]) OK 0.5044064092497642
call to res=meanMatThreadThread(vmat)
result is false
2-element Array{Float64,1}:
0.124943
0.128193
I ran with 4 threads, and I get the result of 1/4 threads.
With n = 50000 it I get really 0.125 !!
Moreover the interpreter gets in a fuzzy state as described in details in bugThread.txt.
My configuration
Environment:
bugThread.txt
The text was updated successfully, but these errors were encountered: