Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

PackageCompiler: Setting the number of threads

$
0
0

@scj wrote:

Is it possible to set the number of Julia threads when building an executable using PackageCompiler?

module Hello
Base.@ccallable function julia_main(ARGS::Vector{String})::Cint
    println(Threads.nthreads())
    return 0
end
end

If I compile the above code using PackageCompiler,

using PackageCompiler
build_executable("hello.jl")

then I get

hello.exe
1

Does this mean, as is suggested, that only a single thread is available to the program? I’ve tried using the cc_flags option, but I’ve had no luck.

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 2795

Latest Images

Trending Articles



Latest Images