diff --git a/base/loading.jl b/base/loading.jl index cf306d77ad24e..b366015918401 100644 --- a/base/loading.jl +++ b/base/loading.jl @@ -120,14 +120,6 @@ end find_in_path(name::AbstractString, wd::AbstractString = pwd()) = find_in_path(String(name), String(wd)) -function find_in_node_path(name::String, srcpath, node::Int=1) - if myid() == node - return find_in_path(name, srcpath) - else - return remotecall_fetch(find_in_path, node, name, srcpath) - end -end - function find_source_file(file::String) (isabspath(file) || isfile(file)) && return file file2 = find_in_path(file) @@ -158,51 +150,9 @@ function _include_from_serialized(path::String) end # returns an array of modules loaded, or an Exception that describes why it failed -# and also attempts to load the same file across all nodes (if toplevel_node and myid() == master) # and it reconnects the Base.Docs.META -function _require_from_serialized(node::Int, mod::Symbol, path_to_try::String, toplevel_load::Bool) - local restored = nothing - local content::Vector{UInt8} - if toplevel_load && myid() == 1 && nprocs() > 1 - # broadcast top-level import/using from node 1 (only) - if node == myid() - content = open(read, path_to_try) - else - content = remotecall_fetch(open, node, read, path_to_try) - end - restored = _include_from_serialized(content) - isa(restored, Exception) && return restored - - results = sizehint!(Vector{Tuple{Int,Any}}(), nprocs()) - @sync for p in procs() - if p != myid() - @async begin - result = remotecall_fetch(p) do - let m = try - _include_from_serialized(content) - catch ex - isa(ex, Exception) ? ex : ErrorException(string(ex)) - end - isa(m, Exception) ? m : nothing - end - end - push!(results, (p, result)) - end - end - end - for (id, m) in results - if m !== nothing - warn("Node state is inconsistent: node $id failed to load cache from $path_to_try. Got:") - warn(m, prefix="WARNING: ") - end - end - elseif node == myid() - restored = _include_from_serialized(path_to_try) - else - content = remotecall_fetch(open, node, read, path_to_try) - restored = _include_from_serialized(content) - end - +function _require_from_serialized(mod::Symbol, path_to_try::String) + restored = _include_from_serialized(path_to_try) if !isa(restored, Exception) for M in restored::Vector{Any} if isdefined(M, Base.Docs.META) @@ -216,24 +166,13 @@ end # returns `true` if require found a precompile cache for this mod, but couldn't load it # returns `false` if the module isn't known to be precompilable # returns the set of modules restored if the cache load succeeded -function _require_search_from_serialized(node::Int, mod::Symbol, sourcepath::String, toplevel_load::Bool) - if node == myid() - paths = find_all_in_cache_path(mod) - else - paths = @fetchfrom node find_all_in_cache_path(mod) - end - +function _require_search_from_serialized(mod::Symbol, sourcepath::String) + paths = find_all_in_cache_path(mod) for path_to_try in paths::Vector{String} - if node == myid() - if stale_cachefile(sourcepath, path_to_try) - continue - end - else - if @fetchfrom node stale_cachefile(sourcepath, path_to_try) - continue - end + if stale_cachefile(sourcepath, path_to_try) + continue end - restored = _require_from_serialized(node, mod, path_to_try, toplevel_load) + restored = _require_from_serialized(mod, path_to_try) if isa(restored, Exception) if isa(restored, ErrorException) && endswith(restored.msg, " uuid did not match cache file.") # can't use this cache due to a module uuid mismatch, @@ -270,15 +209,11 @@ const _track_dependencies = Ref(false) # set this to true to track the list of f function _include_dependency(_path::AbstractString) prev = source_path(nothing) if prev === nothing - if myid() == 1 - path = abspath(_path) - else - path = joinpath(remotecall_fetch(abspath, 1, "."), _path) - end + path = abspath(_path) else path = joinpath(dirname(prev), _path) end - if myid() == 1 && _track_dependencies[] + if _track_dependencies[] push!(_require_dependencies, (path, mtime(path))) end return path, prev @@ -334,34 +269,13 @@ order to throw an error if Julia attempts to precompile it. using `__precompile__()`. Failure to do so can result in a runtime error when loading the module. """ function __precompile__(isprecompilable::Bool=true) - if (myid() == 1 && - JLOptions().use_compilecache != 0 && + if (JLOptions().use_compilecache != 0 && isprecompilable != (0 != ccall(:jl_generating_output, Cint, ())) && - !(isprecompilable && toplevel_load::Bool)) + !(isprecompilable && toplevel_load[])) throw(PrecompilableError(isprecompilable)) end end -function require_modname(name::AbstractString) - # This function can be deleted when the deprecation for `require` - # is deleted. - # While we could also strip off the absolute path, the user may be - # deliberately directing to a different file than what got - # cached. So this takes a conservative approach. - if Bool(JLOptions().use_compilecache) - if endswith(name, ".jl") - tmp = name[1:end-3] - for prefix in LOAD_CACHE_PATH - path = joinpath(prefix, tmp*".ji") - if isfile(path) - return tmp - end - end - end - end - return name -end - """ reload(name::AbstractString) @@ -369,17 +283,17 @@ Force reloading of a package, even if it has been loaded before. This is intende during package development as code is modified. """ function reload(name::AbstractString) - if isfile(name) || contains(name,Filesystem.path_separator) + if contains(name, Filesystem.path_separator) || contains(name, ".") # for reload("path/file.jl") just ask for include instead error("use `include` instead of `reload` to load source files") else # reload("Package") is ok - require(Symbol(require_modname(name))) + require(Symbol(name)) end end # require always works in Main scope and loads files from node 1 -toplevel_load = true +const toplevel_load = Ref(true) """ require(module::Symbol) @@ -401,8 +315,19 @@ all platforms, including those with case-insensitive filesystems like macOS and Windows. """ function require(mod::Symbol) - _require(mod::Symbol) - # After successfully loading notify downstream consumers + _require(mod) + # After successfully loading, notify downstream consumers + if toplevel_load[] && myid() == 1 && nprocs() > 1 + # broadcast top-level import/using from node 1 (only) + @sync for p in procs() + p == 1 && continue + @async remotecall_wait(p) do + if !isbindingresolved(Main, mod) || !isdefined(Main, mod) + _require(mod) + end + end + end + end for callback in package_callbacks invokelatest(callback, mod) end @@ -415,7 +340,7 @@ function _require(mod::Symbol) _track_dependencies[] = false DEBUG_LOADING[] = haskey(ENV, "JULIA_DEBUG_LOADING") - global toplevel_load + # handle recursive calls to require loading = get(package_locks, mod, false) if loading !== false # load already in progress for this module @@ -424,12 +349,12 @@ function _require(mod::Symbol) end package_locks[mod] = Condition() - last = toplevel_load::Bool + last = toplevel_load[] try - toplevel_load = false + toplevel_load[] = false # perform the search operation to select the module file require intends to load name = string(mod) - path = find_in_node_path(name, nothing, 1) + path = find_in_path(name, nothing) if path === nothing throw(ArgumentError("Module $name not found in current path.\nRun `Pkg.add(\"$name\")` to install the $name package.")) end @@ -437,7 +362,7 @@ function _require(mod::Symbol) # attempt to load the module file via the precompile cache locations doneprecompile = false if JLOptions().use_compilecache != 0 - doneprecompile = _require_search_from_serialized(1, mod, path, last) + doneprecompile = _require_search_from_serialized(mod, path) if !isa(doneprecompile, Bool) return # success end @@ -457,10 +382,10 @@ function _require(mod::Symbol) end if doneprecompile === true || JLOptions().incremental != 0 - # spawn off a new incremental pre-compile task from node 1 for recursive `require` calls + # spawn off a new incremental pre-compile task for recursive `require` calls # or if the require search declared it was pre-compiled before (and therefore is expected to still be pre-compilable) cachefile = compilecache(mod) - m = _require_from_serialized(1, mod, cachefile, last) + m = _require_from_serialized(mod, cachefile) if isa(m, Exception) warn("The call to compilecache failed to create a usable precompiled cache file for module $name. Got:") warn(m, prefix="WARNING: ") @@ -473,27 +398,14 @@ function _require(mod::Symbol) # just load the file normally via include # for unknown dependencies try - # include on node 1 first to check for PrecompilableErrors - Base.include_from_node1(Main, path) - - if last && myid() == 1 && nprocs() > 1 - # broadcast top-level import/using from node 1 (only) - @sync begin - for p in filter(x -> x != 1, procs()) - @async remotecall_fetch(p) do - Base.include_from_node1(Main, path) - nothing - end - end - end - end + Base.include_relative(Main, path) catch ex if doneprecompile === true || JLOptions().use_compilecache == 0 || !precompilableerror(ex, true) rethrow() # rethrow non-precompilable=true errors end # the file requested `__precompile__`, so try to build a cache file and use that cachefile = compilecache(mod) - m = _require_from_serialized(1, mod, cachefile, last) + m = _require_from_serialized(mod, cachefile) if isa(m, Exception) warn(m, prefix="WARNING: ") # TODO: disable __precompile__(true) error and do normal include instead of error @@ -501,7 +413,7 @@ function _require(mod::Symbol) end end finally - toplevel_load = last + toplevel_load[] = last loading = pop!(package_locks, mod) notify(loading, all=true) _track_dependencies[] = old_track_dependencies @@ -509,13 +421,12 @@ function _require(mod::Symbol) nothing end -# remote/parallel load +# relative-path load """ include_string(m::Module, code::AbstractString, filename::AbstractString="string") -Like `include`, except reads code from the given string rather than from a file. Since there -is no file path involved, no path processing or fetching from node 1 is done. +Like `include`, except reads code from the given string rather than from a file. """ include_string(m::Module, txt::String, fname::String) = ccall(:jl_load_file_string, Any, (Ptr{UInt8}, Csize_t, Cstring, Any), @@ -543,21 +454,14 @@ function source_dir() p === nothing ? pwd() : dirname(p) end -include_from_node1(mod::Module, path::AbstractString) = include_from_node1(mod, String(path)) -function include_from_node1(mod::Module, _path::String) +include_relative(mod::Module, path::AbstractString) = include_relative(mod, String(path)) +function include_relative(mod::Module, _path::String) path, prev = _include_dependency(_path) tls = task_local_storage() tls[:SOURCE_PATH] = path local result try - if myid()==1 - # sleep a bit to process file requests from other nodes - nprocs()>1 && sleep(0.005) - result = Core.include(mod, path) - nprocs()>1 && sleep(0.005) - else - result = include_string(mod, remotecall_fetch(readstring, 1, path), path) - end + result = Core.include(mod, path) finally if prev === nothing delete!(tls, :SOURCE_PATH) @@ -565,7 +469,7 @@ function include_from_node1(mod::Module, _path::String) tls[:SOURCE_PATH] = prev end end - result + return result end """ @@ -574,8 +478,7 @@ end Evaluate the contents of the input source file into module `m`. Returns the result of the last evaluated expression of the input file. During including, a task-local include path is set to the directory containing the file. Nested calls to `include` will search -relative to that path. All paths refer to files on node 1 when running in parallel, and -files will be fetched from node 1. This function is typically used to load source +relative to that path. This function is typically used to load source interactively, or to combine files in packages that are broken into multiple source files. """ include # defined in sysimg.jl @@ -655,7 +558,6 @@ This can be used to reduce package load times. Cache files are stored in for important notes. """ function compilecache(name::String) - myid() == 1 || error("can only precompile from node 1") # decide where to get the source file from path = find_in_path(name, nothing) path === nothing && throw(ArgumentError("$name not found in path")) @@ -777,7 +679,7 @@ function stale_cachefile(modpath::String, cachefile::String) continue end name = string(mod) - path = find_in_node_path(name, nothing, 1) + path = find_in_path(name, nothing) if path === nothing return true # Won't be able to fullfill dependency end diff --git a/base/precompile.jl b/base/precompile.jl index 338baddbe63f5..e745f2603ceec 100644 --- a/base/precompile.jl +++ b/base/precompile.jl @@ -1670,8 +1670,6 @@ precompile(Tuple{typeof(Base.any), Base.BitArray{1}}) precompile(Tuple{typeof(Base.uvfinalize), Base.PipeEndpoint}) precompile(Tuple{typeof(Base.uvfinalize), Base.Process}) precompile(Tuple{getfield(Base.Distributed, Symbol("#kw##remotecall_fetch")), Array{Any, 1}, typeof(Base.Distributed.remotecall_fetch), typeof(Base.Distributed.fetch_future), Base.Distributed.Worker, Base.Distributed.RRID, Int64}) -precompile(Tuple{getfield(Base.Distributed, Symbol("#kw##remotecall_fetch")), Array{Any, 1}, typeof(Base.Distributed.remotecall_fetch), typeof(Base.find_in_path), Base.Distributed.LocalProcess, String, Void}) -precompile(Tuple{getfield(Base.Distributed, Symbol("#kw##remotecall_fetch")), Array{Any, 1}, typeof(Base.Distributed.remotecall_fetch), typeof(Base.find_in_path), Base.Distributed.Worker, String, Void}) precompile(Tuple{getfield(Base.Distributed, Symbol("#kw##remotecall_fetch")), Array{Any, 1}, typeof(Base.Distributed.remotecall_fetch), typeof(Base.open), Base.Distributed.LocalProcess, typeof(Base.read), String}) precompile(Tuple{getfield(Base.Distributed, Symbol("#kw##remotecall_fetch")), Array{Any, 1}, typeof(Base.Distributed.remotecall_fetch), typeof(Base.open), Base.Distributed.Worker, typeof(Base.read), String}) precompile(Tuple{getfield(Base.Distributed, Symbol("#kw##remote_do")), Array{Any, 1}, typeof(Base.Distributed.remote_do), typeof(Base.exit), Base.Distributed.Worker}) @@ -1706,10 +1704,6 @@ precompile(Tuple{typeof(Base.Distributed.call_on_owner), typeof(Base.Distributed precompile(Tuple{typeof(Base.Distributed.fetch_future), Base.Distributed.RRID, Int64}) precompile(Tuple{typeof(Base.Distributed.flush_gc_msgs), Base.Distributed.Worker}) precompile(Tuple{typeof(Base.Distributed.remotecall_fetch), typeof(Base.Distributed.fetch_future), Base.Distributed.Worker, Base.Distributed.RRID, Int64}) -precompile(Tuple{typeof(Base.Distributed.remotecall_fetch), typeof(Base.find_in_path), Base.Distributed.LocalProcess, String, Void}) -precompile(Tuple{typeof(Base.Distributed.remotecall_fetch), typeof(Base.find_in_path), Base.Distributed.Worker, String, Void}) -precompile(Tuple{typeof(Base.Distributed.remotecall_fetch), typeof(Base.open), Base.Distributed.LocalProcess, typeof(Base.read), String}) -precompile(Tuple{typeof(Base.Distributed.remotecall_fetch), typeof(Base.open), Base.Distributed.Worker, typeof(Base.read), String}) precompile(Tuple{typeof(Base.Distributed.remote_do), typeof(Base.exit), Base.Distributed.Worker}) precompile(Tuple{typeof(Base.Distributed.send_del_client), Base.Distributed.Future}) precompile(Tuple{typeof(Base.Distributed.send_msg), Base.Distributed.Worker, Base.Distributed.MsgHeader, Base.Distributed.CallMsg{:call}}) @@ -1732,7 +1726,6 @@ precompile(Tuple{typeof(Base.Filesystem.samefile), String, String}) precompile(Tuple{typeof(Base.Filesystem.unlink), String}) precompile(Tuple{typeof(Base.finalizer), Base.Distributed.Future, typeof(Base.Distributed.finalize_ref)}) precompile(Tuple{typeof(Base.find_all_in_cache_path), Symbol}) -precompile(Tuple{typeof(Base.find_in_node_path), String, Void, Int64}) precompile(Tuple{typeof(Base.find_in_path), String, Void}) precompile(Tuple{typeof(Base.getindex), Base.ObjectIdDict, Symbol}) precompile(Tuple{typeof(Base.getindex), Type{Tuple{String, Float64}}, Tuple{String, Float64}}) @@ -1747,7 +1740,7 @@ precompile(Tuple{typeof(Base.ht_keyindex), Base.Dict{Symbol, UInt64}, Symbol}) precompile(Tuple{typeof(Base.ht_keyindex), Base.Dict{Tuple{String, Float64}, Void}, Tuple{String, Float64}}) precompile(Tuple{typeof(Base.ht_keyindex), Base.Dict{WeakRef, Void}, Base.Distributed.Future}) precompile(Tuple{typeof(Base.ident_cmp), Tuple{String, String, Int64}, Tuple{String, Int64}}) -precompile(Tuple{typeof(Base.include_from_node1), String}) +precompile(Tuple{typeof(Base.include_relative), String}) precompile(Tuple{typeof(Base._include_from_serialized), String}) precompile(Tuple{typeof(Base.indexed_next), Tuple{Symbol, UInt64}, Int64, Int64}) precompile(Tuple{typeof(Base.indexed_next), Tuple{Void, Void}, Int64, Int64}) @@ -1791,8 +1784,8 @@ precompile(Tuple{typeof(Base.rehash!), Base.Dict{Symbol, Base.Condition}, Int64} precompile(Tuple{typeof(Base.rehash!), Base.Dict{Symbol, UInt64}, Int64}) precompile(Tuple{typeof(Base.rehash!), Base.Dict{Tuple{String, Float64}, Void}, Int64}) precompile(Tuple{typeof(Base.remove_linenums!), Module}) -precompile(Tuple{typeof(Base._require_from_serialized), Int64, Symbol, String, Bool}) -precompile(Tuple{typeof(Base._require_search_from_serialized), Int64, Symbol, String, Bool}) +precompile(Tuple{typeof(Base._require_from_serialized), Symbol, String}) +precompile(Tuple{typeof(Base._require_search_from_serialized), Symbol, String}) precompile(Tuple{typeof(Base.require), Symbol}) precompile(Tuple{typeof(Base.resize!), Array{Base.Condition, 1}, Int64}) precompile(Tuple{typeof(Base.resize!), Array{Tuple{String, Float64}, 1}, Int64}) diff --git a/base/sysimg.jl b/base/sysimg.jl index 826f48e61f5bb..a30ec87bf7f5e 100644 --- a/base/sysimg.jl +++ b/base/sysimg.jl @@ -11,7 +11,7 @@ function include(mod::Module, path::AbstractString) elseif INCLUDE_STATE === 2 result = _include(mod, path) elseif INCLUDE_STATE === 3 - result = include_from_node1(mod, path) + result = include_relative(mod, path) end result end @@ -24,7 +24,7 @@ function include(path::AbstractString) else # to help users avoid error (accidentally evaluating into Base), this is deprecated depwarn("Base.include(string) is deprecated, use `include(fname)` or `Base.include(@__MODULE__, fname)` instead.", :include) - result = include_from_node1(_current_module(), path) + result = include_relative(_current_module(), path) end result end @@ -435,7 +435,7 @@ function __init__() init_threadcall() end -INCLUDE_STATE = 3 # include = include_from_node1 +INCLUDE_STATE = 3 # include = include_relative include(Base, "precompile.jl") end # baremodule Base diff --git a/test/cmdlineargs.jl b/test/cmdlineargs.jl index a70a494f51b69..0ac9fd1c66d70 100644 --- a/test/cmdlineargs.jl +++ b/test/cmdlineargs.jl @@ -423,7 +423,7 @@ end for precomp in ("yes", "no") bt = readstring(pipeline(ignorestatus(`$(Base.julia_cmd()) --startup-file=no --precompiled=$precomp -E 'include("____nonexistent_file")'`), stderr=catcmd)) - @test contains(bt, "include_from_node1(::Module, ::String) at $(joinpath(".", "loading.jl"))") + @test contains(bt, "include_relative(::Module, ::String) at $(joinpath(".", "loading.jl"))") lno = match(r"at \.[\/\\]loading\.jl:(\d+)", bt) @test length(lno.captures) == 1 @test parse(Int, lno.captures[1]) > 0 diff --git a/test/compile.jl b/test/compile.jl index 8821493033395..5453432e71058 100644 --- a/test/compile.jl +++ b/test/compile.jl @@ -172,7 +172,7 @@ try # use _require_from_serialized to ensure that the test fails if # the module doesn't reload from the image: @test_warn "WARNING: replacing module $Foo_module." begin - @test isa(Base._require_from_serialized(myid(), Foo_module, cachefile, #=broadcast-load=#false), Array{Any,1}) + @test isa(Base._require_from_serialized(Foo_module, cachefile), Array{Any,1}) end let Foo = getfield(Main, Foo_module) @@ -535,7 +535,8 @@ end let module_name = string("a",randstring()) insert!(LOAD_PATH, 1, pwd()) file_name = string(module_name, ".jl") - sleep(2); touch(file_name) + sleep(2) + touch(file_name) code = """module $(module_name)\nend\n""" write(file_name, code) reload(module_name) @@ -546,51 +547,64 @@ end # Issue #19960 let - # ideally this would test with workers on a remote host that does not have access to the master node filesystem for loading - # can simulate this for local workers by using relative load paths on master node that are not valid on workers - # so addprocs before changing directory to temp directory, otherwise workers will inherit temp working directory - test_workers = addprocs(1) - temp_path = mktempdir() + push!(test_workers, myid()) save_cwd = pwd() - cd(temp_path) - load_path = mktempdir(temp_path) - load_cache_path = mktempdir(temp_path) - unshift!(LOAD_PATH, basename(load_path)) - unshift!(Base.LOAD_CACHE_PATH, basename(load_cache_path)) - - ModuleA = :Issue19960A - ModuleB = :Issue19960B - - write(joinpath(load_path, "$ModuleA.jl"), - """ - __precompile__(true) - module $ModuleA - export f - f() = myid() - end - """) + temp_path = mktempdir() + try + cd(temp_path) + load_path = mktempdir(temp_path) + load_cache_path = mktempdir(temp_path) + + ModuleA = :Issue19960A + ModuleB = :Issue19960B + + write(joinpath(load_path, "$ModuleA.jl"), + """ + __precompile__(true) + module $ModuleA + export f + f() = myid() + end + """) + + write(joinpath(load_path, "$ModuleB.jl"), + """ + __precompile__(true) + module $ModuleB + using $ModuleA + export g + g() = f() + end + """) - write(joinpath(load_path, "$ModuleB.jl"), - """ - __precompile__(true) - module $ModuleB - using $ModuleA - export g - g() = f() + @sync for wid in test_workers + @async remotecall_fetch(Core.eval, wid, Base, quote + unshift!(LOAD_PATH, $load_path) + unshift!(LOAD_CACHE_PATH, $load_cache_path) + end) end - """) - - try - @eval using $ModuleB - for wid in test_workers - @test remotecall_fetch(g, wid) == wid + try + @eval using $ModuleB + uuid = Base.module_uuid(getfield(Main, ModuleB)) + for wid in test_workers + @test remotecall_fetch(Core.eval, wid, Main, :( Base.module_uuid($ModuleB) )) == uuid + if wid != myid() # avoid world-age errors on the local proc + @test remotecall_fetch(g, wid) == wid + end + end + finally + @sync for wid in test_workers + @async remotecall_fetch(Core.eval, wid, Base, quote + shift!(LOAD_PATH) + shift!(LOAD_CACHE_PATH) + end) + end end finally - shift!(LOAD_PATH) - shift!(Base.LOAD_CACHE_PATH) cd(save_cwd) rm(temp_path, recursive=true) + pop!(test_workers) # remove myid rmprocs(test_workers) end end diff --git a/test/distributed_exec.jl b/test/distributed_exec.jl index 3b430a58ba275..e681a356dc925 100644 --- a/test/distributed_exec.jl +++ b/test/distributed_exec.jl @@ -1684,27 +1684,33 @@ end end end == true -@test let +let # creates a new worker in a different folder and tries to include file - tmp_file, temp_file_stream = mktemp() - close(temp_file_stream) - tmp_file = relpath(tmp_file) - tmp_dir = relpath(mktempdir()) + tmp_dir = mktempdir() + tmp_dir2 = joinpath(tmp_dir, "2") + tmp_file = joinpath(tmp_dir2, "testfile") + tmp_file2 = joinpath(tmp_dir2, "testfile2") + proc = addprocs_with_testenv(1, dir=tmp_dir) try - proc = addprocs_with_testenv(1, dir=tmp_dir) - include(tmp_file) - remotecall_fetch(include, proc[1], tmp_file) + mkdir(tmp_dir2) + write(tmp_file, "23.32 + 32 + myid() + include(\"testfile2\")") + write(tmp_file2, "myid() * 2") + @test_throws(ErrorException("could not open file $(abspath("testfile"))"), + include("testfile")) + @test_throws(ErrorException("could not open file $(abspath("testfile2"))"), + include("testfile2")) + @test_throws(ErrorException("could not open file $(abspath("2", "testfile"))"), + include(joinpath("2", "testfile"))) + @test include(tmp_file) == 58.32 + @test remotecall_fetch(include, proc[1], joinpath("2", "testfile")) == 55.32 + proc[1] * 3 + finally rmprocs(proc) - rm(tmp_dir) - rm(tmp_file) - return true - catch e - println(e) - rm(tmp_dir, force=true) rm(tmp_file, force=true) - return false + rm(tmp_file2, force=true) + rm(tmp_dir2, force=true) + rm(tmp_dir, force=true) end -end == true +end # cookie and comand line option `--worker` tests. remove workers, set cookie and test struct WorkerArgTester <: ClusterManager worker_opt