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

Avoid throwing exceptions in reset_threads! #154

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

efaulhaber
Copy link
Contributor

@efaulhaber efaulhaber commented Jan 7, 2025

With JuliaSIMD/ThreadingUtilities.jl#54, I get the same exception multiple times when I call Polyester.reset_threads! afterward:

julia> Polyester.reset_threads!()
ERROR: TaskFailedException
Stacktrace:
 [1] checktask(tid::Int64)
   @ ThreadingUtilities ~/.julia/dev/ThreadingUtilities/src/threadtasks.jl:74
 [2] foreach
   @ ./abstractarray.jl:3187 [inlined]
 [3] reset_threads!()
   @ Polyester ~/.julia/packages/Polyester/eqrC9/src/Polyester.jl:47
 [4] top-level scope
   @ REPL[26]:1

    nested task error: some error
    Stacktrace:
     [1] error(s::String)
       @ Base ./error.jl:35
     [2] macro expansion
       @ ./REPL[25]:4 [inlined]
     [3] #56
       @ ~/.julia/packages/Polyester/eqrC9/src/closure.jl:309 [inlined]
     [4] (::Polyester.BatchClosure{var"#56#57", ManualMemory.Reference{Tuple{…}}, false, Tuple{}})(p::Ptr{UInt64})
       @ Polyester ~/.julia/packages/Polyester/eqrC9/src/batch.jl:11
     [5] _call
       @ ~/.julia/packages/ThreadingUtilities/3z3g0/src/threadtasks.jl:11 [inlined]
     [6] (::ThreadingUtilities.ThreadTask)()
       @ ThreadingUtilities ~/.julia/dev/ThreadingUtilities/src/threadtasks.jl:29
Some type information was truncated. Use `show(err)` to see complete types.

julia> Polyester.reset_threads!()
ERROR: TaskFailedException
Stacktrace:
 [1] checktask(tid::Int64)
   @ ThreadingUtilities ~/.julia/dev/ThreadingUtilities/src/threadtasks.jl:74
 [2] foreach
   @ ./abstractarray.jl:3187 [inlined]
 [3] reset_threads!()
   @ Polyester ~/.julia/packages/Polyester/eqrC9/src/Polyester.jl:47
 [4] top-level scope
   @ REPL[26]:1

    nested task error: some error
    Stacktrace:
     [1] error(s::String)
       @ Base ./error.jl:35
     [2] macro expansion
       @ ./REPL[25]:4 [inlined]
     [3] #56
       @ ~/.julia/packages/Polyester/eqrC9/src/closure.jl:309 [inlined]
     [4] (::Polyester.BatchClosure{var"#56#57", ManualMemory.Reference{Tuple{…}}, false, Tuple{}})(p::Ptr{UInt64})
       @ Polyester ~/.julia/packages/Polyester/eqrC9/src/batch.jl:11
     [5] _call
       @ ~/.julia/packages/ThreadingUtilities/3z3g0/src/threadtasks.jl:11 [inlined]
     [6] (::ThreadingUtilities.ThreadTask)()
       @ ThreadingUtilities ~/.julia/dev/ThreadingUtilities/src/threadtasks.jl:29
Some type information was truncated. Use `show(err)` to see complete types.

julia> Polyester.reset_threads!()

julia> Polyester.reset_threads!()

This PR solves this problem.

@efaulhaber
Copy link
Contributor Author

bump

@efaulhaber
Copy link
Contributor Author

@chriselrod

@chriselrod
Copy link
Member

@ChrisRackauckas anyone to delegate as new primary owner of JuliaSIMD?

@ChrisRackauckas
Copy link
Member

Maybe @oscardssmith ?

@oscardssmith
Copy link
Contributor

oscardssmith commented Feb 12, 2025

sure

@efaulhaber
Copy link
Contributor Author

So what's the status on this now?

@efaulhaber
Copy link
Contributor Author

Bump

@oscardssmith
Copy link
Contributor

@chriselrod can you add me as a maintainer so I can merge this?

@ChrisRackauckas
Copy link
Member

you're an org owner.

@oscardssmith
Copy link
Contributor

The test failures on nightly are unrelated to this, so merging (@allocated is slightly broken currently)

@oscardssmith oscardssmith merged commit 734f5a0 into JuliaSIMD:master Feb 28, 2025
27 of 29 checks passed
@efaulhaber efaulhaber deleted the reset-noerror branch February 28, 2025 16:50
@efaulhaber
Copy link
Contributor Author

Thanks! JuliaSIMD/ThreadingUtilities.jl#54 is next now that this is merged.

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.

4 participants