# Unexpected warn-related error message if jobs don't start on slurm cluster

**URL:** <https://discourse.julialang.org/t/unexpected-warn-related-error-message-if-jobs-dont-start-on-slurm-cluster/23729>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [May 1, 2019, 10:17am UTC](https://discourse.julialang.org/t/unexpected-warn-related-error-message-if-jobs-dont-start-on-slurm-cluster/23729 "2019-05-01T10:17:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jishnub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jishnub/32/33620_2.png) [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Post date:** [May 1, 2019, 10:17am UTC](https://discourse.julialang.org/t/unexpected-warn-related-error-message-if-jobs-dont-start-on-slurm-cluster/23729/1 "2019-05-01T10:17:44Z")

</div>

I am using ClusterManagers.jl to launch jobs on the university cluster. This is what happens if jobs time out

```julia
julia> addprocs_slurm(100);
srun: job 1218466 queued and waiting for resources
Error launching Slurm job:
ERROR: UndefVarError: warn not defined
Stacktrace:
 [1] wait(::Task) at ./task.jl:191
 [2] #addprocs_locked#44(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::SlurmManager) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Distributed/src/cluster.jl:418
 [3] addprocs_locked at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Distributed/src/cluster.jl:372 [inlined]
 [4] #addprocs#43(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::SlurmManager) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Distributed/src/cluster.jl:365
 [5] #addprocs_slurm#15 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Distributed/src/cluster.jl:359 [inlined]
 [6] addprocs_slurm(::Int64) at /home/jb6888/.julia/packages/ClusterManagers/7pPEP/src/slurm.jl:85
 [7] top-level scope at none:0

```

Not sure where the warn is used? It seems cluster.jl:418 is

```julia
Base.wait(t_launch)

```

and t\_launch is defined as

```julia
t_launch = @async launch(manager, params, launched, launch_ntfy)

```

I am assuming that the async\_launch is failing and raising a warning, but I’m not sure where it’s defined. A grep on the jl files in Distributed returns no result.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [May 1, 2019, 10:49am UTC](https://discourse.julialang.org/t/unexpected-warn-related-error-message-if-jobs-dont-start-on-slurm-cluster/23729/2 "2019-05-01T10:49:46Z")

</div>

Which version of Julia are you using please?  
In slurm.jl

if time() \> t0 + 60 + np  
warn(“dropping worker: file not created in $(60 + np) seconds”)  
break  
end

I think that should be @warn

---

<div class="post-metadata">

**Author:** ![jishnub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jishnub/32/33620_2.png) [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Post date:** [May 1, 2019, 12:36pm UTC](https://discourse.julialang.org/t/unexpected-warn-related-error-message-if-jobs-dont-start-on-slurm-cluster/23729/3 "2019-05-01T12:36:46Z")

</div>

This seems to fix the issue, now it’s a proper warning instead of an error. This is on julia 1.1
