Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
26d00f7a
Commit
26d00f7a
authored
17 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
svn merge -r11347:11350
https://eris.llnl.gov/svn/slurm/branches/slurm-1.1
parent
54c4c39d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
NEWS
+5
-3
5 additions, 3 deletions
NEWS
src/plugins/sched/wiki2/job_modify.c
+44
-7
44 additions, 7 deletions
src/plugins/sched/wiki2/job_modify.c
testsuite/expect/test7.7.prog.c
+1
-0
1 addition, 0 deletions
testsuite/expect/test7.7.prog.c
with
50 additions
and
10 deletions
NEWS
+
5
−
3
View file @
26d00f7a
...
...
@@ -281,14 +281,16 @@ documents those changes that are of interest to users and admins.
* Changes in SLURM 1.1.35
=========================
- In sched/wiki - Add support for CMD=SIGNALJOB to accept option
of VALUE=SIGXXX in addition to VALUE=# and VALUE=XXX options
- In sched/wiki2: Add support for CMD=SIGNALJOB to accept option
of VALUE=SIGXXX in addition to VALUE=# and VALUE=XXX options.
- In sched/wiki2: Add support for CMD=MODIFYJOB to accept option of
DEPEND=afterany:<jobid>, specify jobid=0 to clear.
- Correct logic for job allocation with task count (srun -n ...) AND
FastSchedule=0 AND low CPUs count in Slurm's node configuration.
- Add new and undocumented scancel option, --ctld, to route signal
requests through slurmctld rather than directly to slurmd daemons.
Useful for testing purposes.
-
f
ixed issue with hostfile support not working in a job step
-
F
ixed issue with hostfile support not working in a job step
.
* Changes in SLURM 1.1.34
=========================
...
...
This diff is collapsed.
Click to expand it.
src/plugins/sched/wiki2/job_modify.c
+
44
−
7
View file @
26d00f7a
...
...
@@ -53,7 +53,24 @@ static void _null_term(char *str)
}
}
/* return -1 on error */
static
int32_t
_get_depend_id
(
char
*
str
)
{
/* stand-alone job_id */
if
(
isdigit
(
str
[
0
]))
return
(
int32_t
)
atol
(
str
);
if
(
strncasecmp
(
str
,
"afterany:"
,
9
)
!=
0
)
/* invalid spec */
return
(
int32_t
)
-
1
;
str
+=
9
;
if
(
!
isdigit
(
str
[
0
]))
return
(
int32_t
)
-
1
;
return
(
int32_t
)
atol
(
str
);
}
static
int
_job_modify
(
uint32_t
jobid
,
char
*
bank_ptr
,
int32_t
depend_id
,
uint32_t
new_node_cnt
,
char
*
part_name_ptr
,
uint32_t
new_time_limit
)
{
...
...
@@ -69,6 +86,11 @@ static int _job_modify(uint32_t jobid, char *bank_ptr,
return
ESLURM_DISABLED
;
}
if
(
depend_id
!=
-
1
)
{
info
(
"wiki: changing job dependency to %d"
,
depend_id
);
job_ptr
->
dependency
=
depend_id
;
}
if
(
new_time_limit
)
{
time_t
old_time
=
job_ptr
->
time_limit
;
job_ptr
->
time_limit
=
new_time_limit
;
...
...
@@ -125,8 +147,10 @@ static int _job_modify(uint32_t jobid, char *bank_ptr,
/* RET 0 on success, -1 on failure */
extern
int
job_modify_wiki
(
char
*
cmd_ptr
,
int
*
err_code
,
char
**
err_msg
)
{
char
*
arg_ptr
,
*
bank_ptr
,
*
nodes_ptr
,
*
part_ptr
,
*
time_ptr
,
*
tmp_char
;
char
*
arg_ptr
,
*
bank_ptr
,
*
depend_ptr
,
*
nodes_ptr
;
char
*
part_ptr
,
*
time_ptr
,
*
tmp_char
;
int
slurm_rc
;
int
depend_id
=
-
1
;
uint32_t
jobid
,
new_node_cnt
=
0
,
new_time_limit
=
0
;
static
char
reply_msg
[
128
];
/* Locks: write job, read node and partition info */
...
...
@@ -151,15 +175,28 @@ extern int job_modify_wiki(char *cmd_ptr, int *err_code, char **err_msg)
error
(
"wiki: MODIFYJOB has invalid jobid"
);
return
-
1
;
}
bank_ptr
=
strstr
(
cmd_ptr
,
"BANK="
);
nodes_ptr
=
strstr
(
cmd_ptr
,
"NODES="
);
part_ptr
=
strstr
(
cmd_ptr
,
"PARTITION="
);
time_ptr
=
strstr
(
cmd_ptr
,
"TIMELIMIT="
);
bank_ptr
=
strstr
(
cmd_ptr
,
"BANK="
);
depend_ptr
=
strstr
(
cmd_ptr
,
"DEPEND="
);
nodes_ptr
=
strstr
(
cmd_ptr
,
"NODES="
);
part_ptr
=
strstr
(
cmd_ptr
,
"PARTITION="
);
time_ptr
=
strstr
(
cmd_ptr
,
"TIMELIMIT="
);
if
(
bank_ptr
)
{
bank_ptr
[
4
]
=
':'
;
bank_ptr
+=
5
;
_null_term
(
bank_ptr
);
}
if
(
depend_ptr
)
{
depend_ptr
[
6
]
=
':'
;
depend_ptr
+=
7
;
depend_id
=
_get_depend_id
(
depend_ptr
);
if
(
depend_id
==
-
1
)
{
*
err_code
=
-
300
;
*
err_msg
=
"MODIFYJOB has invalid DEPEND specificiation"
;
error
(
"wiki: MODIFYJOB has invalid DEPEND spec: %s"
,
depend_ptr
);
return
-
1
;
}
}
if
(
nodes_ptr
)
{
nodes_ptr
[
5
]
=
':'
;
nodes_ptr
+=
6
;
...
...
@@ -186,8 +223,8 @@ extern int job_modify_wiki(char *cmd_ptr, int *err_code, char **err_msg)
}
lock_slurmctld
(
job_write_lock
);
slurm_rc
=
_job_modify
(
jobid
,
bank_ptr
,
new_node_cnt
,
part_ptr
,
new_time_limit
);
slurm_rc
=
_job_modify
(
jobid
,
bank_ptr
,
depend_id
,
new_node_cnt
,
part_ptr
,
new_time_limit
);
unlock_slurmctld
(
job_write_lock
);
if
(
slurm_rc
!=
SLURM_SUCCESS
)
{
*
err_code
=
-
700
;
...
...
This diff is collapsed.
Click to expand it.
testsuite/expect/test7.7.prog.c
+
1
−
0
View file @
26d00f7a
...
...
@@ -330,6 +330,7 @@ static void _modify_job(long my_job_id)
"TS=%u AUTH=root DT=CMD=MODIFYJOB ARG=%ld "
/* "PARTITION=pdebug " */
/* "NODES=2 " */
/* "DEPEND=afterany:3 " */
/* "INVALID=123 " */
"TIMELIMIT=10 BANK=test_bank"
,
(
uint32_t
)
now
,
my_job_id
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment