Skip to content

Commit

Permalink
Merge pull request #95 from kaskarn/master
Browse files Browse the repository at this point in the history
minor 0.7+ fixes and updates to slurm.jl
  • Loading branch information
tanmaykm authored Aug 23, 2018
2 parents 40b9575 + 1533af0 commit 91f04c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/ClusterManagers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ using Sockets
export launch, manage, kill, init_worker, connect
import Distributed: launch, manage, kill, init_worker, connect

worker_arg() = `--worker=$(cluster_cookie())`
worker_arg() = `--worker=$(Distributed.init_multi(); cluster_cookie())`


# PBS doesn't have the same semantics as SGE wrt to file accumulate,
# a different solution will have to be found
Expand Down
6 changes: 3 additions & 3 deletions src/slurm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ function launch(manager::SlurmManager, params::Dict, instances_arr::Array,
exename = params[:exename]
exeflags = params[:exeflags]

stdkeys = keys(Base.Distributed.default_addprocs_params())
p = filter((x,y) -> !(x in stdkeys), params)
stdkeys = keys(Distributed.default_addprocs_params())
p = filter(x->!(x[1] in stdkeys), params)

srunargs = []
for k in keys(p)
Expand All @@ -41,7 +41,7 @@ function launch(manager::SlurmManager, params::Dict, instances_arr::Array,
np = manager.np
jobname = "julia-$(getpid())"
srun_cmd = `srun -J $jobname -n $np -o "job%4t.out" -D $exehome $(srunargs) $exename $exeflags $(worker_arg())`
out, srun_proc = open(srun_cmd)
srun_proc = open(srun_cmd)
for i = 0:np - 1
print("connecting to worker $(i + 1) out of $np\r")
local w=[]
Expand Down

0 comments on commit 91f04c1

Please sign in to comment.