Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion contrib/generate_precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ julia_exepath() = joinpath(Sys.BINDIR, Base.julia_exename())

have_repl = haskey(Base.loaded_modules,
Base.PkgId(Base.UUID("3fa0cd96-eef1-5676-8a61-b3b8758bbffb"), "REPL"))

Distributed = get(Base.loaded_modules,
Base.PkgId(Base.UUID("8ba89e20-285c-5b6f-9357-94700520ee1b"), "Distributed"),
nothing)
if Distributed !== nothing
precompile_script *= """
using Distributed
addprocs(2)
pmap(x->iseven(x) ? 1 : 0, 1:4)
@distributed (+) for i = 1:100 Int(rand(Bool)) end
"""
end

Pkg = get(Base.loaded_modules,
Base.PkgId(Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), "Pkg"),
nothing)
Expand Down Expand Up @@ -134,7 +147,7 @@ function generate_precompile_statements()
close(pty_master)
write(debug_output, "\n#### FINISHED ####\n")

# Extract the precompile statements from stderr
# Extract the precompile statements from the precompile file
statements = Set{String}()
for statement in eachline(precompile_file_h)
# Main should be completely clean
Expand Down
1 change: 0 additions & 1 deletion stdlib/Distributed/src/Distributed.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ include("macros.jl") # @spawn and friends
include("workerpool.jl")
include("pmap.jl")
include("managers.jl") # LocalManager and SSHManager
include("precompile.jl")

function __init__()
init_parallel()
Expand Down
Loading