Distributed.jl icon indicating copy to clipboard operation
Distributed.jl copied to clipboard

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

Open vancleve opened this issue 4 years ago • 1 comments

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)

vancleve avatar Jan 13 '21 03:01 vancleve

I still see this recent Julia versions

julia> versioninfo()
Julia Version 1.11.6
Commit 9615af0f269 (2025-07-09 12:58 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin24.0.0)
  CPU: 12 × Apple M2 Max
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, apple-m2)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)

vancleve avatar Sep 15 '25 22:09 vancleve