Skip to content

Commit

Permalink
Merge pull request #23 from JuliaParallel/remotecall-eval
Browse files Browse the repository at this point in the history
Export `remotecall_eval`
  • Loading branch information
JamesWrigley authored Jan 24, 2025
2 parents 97b7f4a + 6ac243d commit a7dabfc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
3 changes: 3 additions & 0 deletions docs/src/_changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ This documents notable changes in DistributedNext.jl. The format is based on
- [`other_workers()`](@ref) and [`other_procs()`](@ref) were implemented and
exported ([#18]).

### Changed
- [`remotecall_eval`](@ref) is now exported ([#23]).

## [v1.0.0] - 2024-12-02

### Fixed
Expand Down
1 change: 1 addition & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ DistributedNext.fetch(::RemoteChannel)
DistributedNext.remotecall(::Any, ::Integer, ::Any...)
DistributedNext.remotecall_wait(::Any, ::Integer, ::Any...)
DistributedNext.remotecall_fetch(::Any, ::Integer, ::Any...)
DistributedNext.remotecall_eval
DistributedNext.remote_do(::Any, ::Integer, ::Any...)
DistributedNext.put!(::RemoteChannel, ::Any...)
DistributedNext.put!(::DistributedNext.Future, ::Any)
Expand Down
1 change: 1 addition & 0 deletions src/DistributedNext.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export
other_procs,
remote,
remotecall,
remotecall_eval,
remotecall_fetch,
remotecall_wait,
remote_do,
Expand Down
17 changes: 11 additions & 6 deletions test/sshmanager.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Test
using DistributedNext
import Sockets: getipaddr
import Sockets: getipaddr, listenany

import LibSSH as ssh
import LibSSH.Demo: DemoServer
Expand All @@ -26,8 +26,11 @@ function test_n_remove_pids(new_pids)
end

@testset "SSHManager" begin
DemoServer(2222; auth_methods=[ssh.AuthMethod_None], allow_auth_none=true, verbose=false, timeout=3600) do
sshflags = `-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR -p 2222 `
ssh_port, server = listenany(2222)
close(server)

DemoServer(Int(ssh_port); auth_methods=[ssh.AuthMethod_None], allow_auth_none=true, verbose=false, timeout=3600) do
sshflags = `-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR -p $(ssh_port)`
#Issue #9951
hosts=[]
localhost_aliases = ["localhost", string(getipaddr()), "127.0.0.1"]
Expand Down Expand Up @@ -66,7 +69,7 @@ end
print("\nssh addprocs with tunnel (SSH multiplexing)\n")
new_pids = addprocs_with_testenv([("localhost", num_workers)]; tunnel=true, multiplex=true, sshflags=sshflags)
@test length(new_pids) == num_workers
controlpath = joinpath(ssh_dir, "julia-$(ENV["USER"])@localhost:2222")
controlpath = joinpath(ssh_dir, "julia-$(ENV["USER"])@localhost:$(ssh_port)")
@test issocket(controlpath)
test_n_remove_pids(new_pids)
@test :ok == timedwait(()->!issocket(controlpath), 10.0; pollint=0.5)
Expand All @@ -82,9 +85,11 @@ end
h1 = "localhost"
user = ENV["USER"]
h2 = "$user@$h1"
h3 = "$h2:2222"
h3 = "$h2:$(ssh_port)"
h4 = "$h3 $(string(getipaddr()))"
h5 = "$h4:9300"
(bind_port, server) = listenany(9300)
close(server)
h5 = "$h4:$(bind_port)"

new_pids = addprocs_with_testenv([h1, h2, h3, h4, h5]; sshflags=sshflags)
@test length(new_pids) == 5
Expand Down

0 comments on commit a7dabfc

Please sign in to comment.