Skip to content

Warning etc. if threads=true while multithreading #48

@KnutAM

Description

@KnutAM

The following example causes julia to quit silently on Windows 10 (but not on Windows Subsystem for Linux) if run with more than 1 thread.

using RecursiveFactorization, LinearAlgebra
num = 10
dim = 14
K_vec = [rand(dim,dim) + 5I for _ in 1:num]
b_vec = [rand(dim) for _ in 1:num]
lupivot_vec = [Vector{Int}(undef, dim) for _ in 1:num]

function run_recursive_test(Kv, bv, lupivotv)
    Threads.@threads for i in 1:length(Kv)
        K = Kv[i]
        b = bv[i]
        lupivot = lupivotv[i]
        LU = RecursiveFactorization.lu!(K,lupivot)
        ldiv!(LU, b)
    end
end

run_recursive_test(K_vec, b_vec, lupivot_vec)

Setting thread=false seems to solve it: LU = RecursiveFactorization.lu!(K,lupivot,Val{true}(),Val{false}()).
Should this be described somewhere, or did I miss some documentation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions