@@ -129,16 +129,7 @@ function launch(mgr::MPIManager, params::Dict,
129
129
println (" Try again with a different instance of MPIManager." )
130
130
throw (ErrorException (" Reuse of MPIManager is not allowed." ))
131
131
end
132
- if VERSION >= v " 0.5.0-dev+4047"
133
- # Pass the cookie as symbol to `setup_worker` to work around
134
- # the mangling issues with command objects, strings and `julia -e` option.
135
- # Same reason that the ip-address is passed as an integer.
136
- # Prefix cookie with a "cookie_" since symbols do not
137
- # lend itself well to strings starting with a "0"
138
- cookie = string (" :cookie_" ,Base. cluster_cookie ())
139
- else
140
- cookie = ` nothing`
141
- end
132
+ cookie = string (" :cookie_" ,Base. cluster_cookie ())
142
133
setup_cmds = ` using MPI\; MPI.setup_worker'('$(getipaddr (). host) ,$(mgr. port) ,$cookie ')'`
143
134
mpi_cmd = ` $(mgr. mpirun_cmd) $(params[:exename ]) -e $(Base. shell_escape (setup_cmds)) `
144
135
open (detach (mpi_cmd))
@@ -365,9 +356,7 @@ function start_main_loop(mode::TransportMode=TCP_TRANSPORT_ALL;
365
356
366
357
# Send the cookie over. Introduced in v"0.5.0-dev+4047". Irrelevant under MPI
367
358
# transport, but need it to satisfy the changed protocol.
368
- if VERSION >= v " 0.5.0-dev+4047"
369
- MPI. bcast (Base. cluster_cookie (), 0 , comm)
370
- end
359
+ MPI. bcast (Base. cluster_cookie (), 0 , comm)
371
360
# Start event loop for the workers
372
361
@schedule receive_event_loop (mgr)
373
362
# Tell Base about the workers
@@ -379,12 +368,8 @@ function start_main_loop(mode::TransportMode=TCP_TRANSPORT_ALL;
379
368
mgr = MPIManager (np= size- 1 , mode= mode)
380
369
mgr. comm = comm
381
370
# Recv the cookie
382
- if VERSION >= v " 0.5.0-dev+4047"
383
- cookie = MPI. bcast (nothing , 0 , comm)
384
- Base. init_worker (cookie, mgr)
385
- else
386
- Base. init_worker (mgr)
387
- end
371
+ cookie = MPI. bcast (nothing , 0 , comm)
372
+ Base. init_worker (cookie, mgr)
388
373
# Start a worker event loop
389
374
receive_event_loop (mgr)
390
375
MPI. Finalize ()
0 commit comments