Open Lightup1 opened 1 year ago
One can try some thing like
using Distributed, SlurmClusterManager
addprocs(SlurmManager(),exeflags=["--project=.", "-t$(ENV["SLURM_CPUS_PER_TASK"])", "--color=yes", "--startup-file=no"])
@everywhere function sleep_println(s)
sleep(10)
println("hello world")
flush(stdout)
end
pmap(sleep_println,1:parse(Int64,ENV["SLURM_NTASKS"]))
Even when I add
flush(stdout)
after allprintln
s executed by workers. Ther slurm-xxx.out still does not show the output in real time.