JuliaLang / Distributed.jl

Create and control multiple Julia processes remotely for distributed computing. Ships as a Julia stdlib.
https://docs.julialang.org/en/v1/stdlib/Distributed/
MIT License
23 stars 9 forks source link

`remote_do` won't print exception to `stderr` when running a function on the master process #74

Open vancleve opened 3 years ago

vancleve commented 3 years ago
julia> using Distributed

julia> addprocs(1)
1-element Array{Int64,1}:
 2

julia> remote_do(sqrt, 1, -1)

julia> remote_do(sqrt, 2, -1)

julia>       From worker 2: DomainError with -1.0:
      From worker 2:    sqrt will only return a complex result if called with a complex argument. Try sqrt(Complex(x)).
      From worker 2:    throw_complex_domainerror(::Symbol, ::Float64) at ./math.jl:33
      From worker 2:    sqrt at ./math.jl:573 [inlined]
      From worker 2:    sqrt(::Int64) at ./math.jl:599
      From worker 2:    (::Distributed.var"#114#116"{Distributed.RemoteDoMsg})() at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Distributed/src/process_messages.jl:315
      From worker 2:    run_work_thunk(::Distributed.var"#114#116"{Distributed.RemoteDoMsg}, ::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Distributed/src/process_messages.jl:79

julia> versioninfo()
Julia Version 1.5.3
Commit 788b2c77c1 (2020-11-09 13:37 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) Gold 6230 CPU @ 2.10GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, cascadelake)