Skip to content

Commit b9329a1

Browse files
authored
Update slurmmanager.jl
1 parent a3027cc commit b9329a1

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/slurmmanager.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,23 @@ function warn_if_unexpected_params(params::Dict)
159159
# and there is no problem.
160160
end
161161
end
162+
elseif k == :custom_worker_flag
163+
# We special-case `:custom_worker_flag`, because our support status depends on the Julia version
164+
if v == `--worker`
165+
# Either the user didn't provide the `:env` kwarg,
166+
# or the user provided `custom_worker_flag=`--worker``.
167+
#
168+
# Either way, in this case, we don't print a log message.
169+
# @debug "k == :custom_worker_flag and v == `--worker`" k v
170+
else
171+
# In this case, the user has provided the `:custom_worker_flag` kwarg, and it is something other than `--worker`.
172+
if Base.VERSION < v"1.6.0"
173+
@warn "The user provided the `custom_worker_flag` kwarg, but SlurmClusterManager.jl's support for the `custom_worker_flag` kwarg requires Julia 1.6 or later" Base.VERSION
174+
else
175+
# Here, the Julia version is >= 1.6, so we do support `:custom_worker_flag`,
176+
# and there is no problem.
177+
end
178+
end
162179
elseif k in params_that_we_support
163180
# We support this param, so no problem.
164181
else

0 commit comments

Comments
 (0)