Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/slurmmanager.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@ function launch(manager::SlurmManager, params::Dict, instances_arr::Array, c::Co
exename = params[:exename]
exeflags = params[:exeflags]

srun_cmd = `srun -D $exehome $exename $exeflags --worker=$(cluster_cookie())`
manager.srun_proc = open(srun_cmd)
# Pass cookie as stdin to srun; srun forwards stdin to process
# This way the cookie won't be visible in ps, top, etc on the compute node
srun_cmd = `srun -D $exehome $exename $exeflags --worker`
manager.srun_proc = open(srun_cmd, write=true, read=true)
write(manager.srun_proc, cluster_cookie())
write(manager.srun_proc, "\n")

t = @async for i in 1:manager.ntasks
manager.verbose && println("connecting to worker $i out of $(manager.ntasks)")
Expand Down