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
9c34fa32
Commit
9c34fa32
authored
18 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Port some sched/wiki2 scalability bug fixes into sched/wiki
parent
eccb3f78
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/sched/wiki/msg.c
+3
-3
3 additions, 3 deletions
src/plugins/sched/wiki/msg.c
src/plugins/sched/wiki/start_job.c
+13
-3
13 additions, 3 deletions
src/plugins/sched/wiki/start_job.c
with
16 additions
and
6 deletions
src/plugins/sched/wiki/msg.c
+
3
−
3
View file @
9c34fa32
...
@@ -315,7 +315,7 @@ static size_t _write_bytes(int fd, char *buf, const size_t size)
...
@@ -315,7 +315,7 @@ static size_t _write_bytes(int fd, char *buf, const size_t size)
static
char
*
_recv_msg
(
slurm_fd
new_fd
)
static
char
*
_recv_msg
(
slurm_fd
new_fd
)
{
{
char
header
[
10
];
char
header
[
10
];
u
int32_t
size
;
u
nsigned
long
size
;
char
*
buf
;
char
*
buf
;
if
(
_read_bytes
((
int
)
new_fd
,
header
,
9
)
!=
9
)
{
if
(
_read_bytes
((
int
)
new_fd
,
header
,
9
)
!=
9
)
{
...
@@ -325,7 +325,7 @@ static char * _recv_msg(slurm_fd new_fd)
...
@@ -325,7 +325,7 @@ static char * _recv_msg(slurm_fd new_fd)
return
NULL
;
return
NULL
;
}
}
if
(
sscanf
(
header
,
"%
u
l"
,
&
size
)
!=
1
)
{
if
(
sscanf
(
header
,
"%l
u
"
,
&
size
)
!=
1
)
{
err_code
=
-
244
;
err_code
=
-
244
;
err_msg
=
"malformed message header"
;
err_msg
=
"malformed message header"
;
error
(
"wiki: malformed message header (%s)"
,
header
);
error
(
"wiki: malformed message header (%s)"
,
header
);
...
@@ -357,7 +357,7 @@ static size_t _send_msg(slurm_fd new_fd, char *buf, size_t size)
...
@@ -357,7 +357,7 @@ static size_t _send_msg(slurm_fd new_fd, char *buf, size_t size)
debug
(
"wiki msg send:%s"
,
buf
);
debug
(
"wiki msg send:%s"
,
buf
);
(
void
)
sprintf
(
header
,
"%08l
d
\n
"
,
(
long
int
)
size
);
(
void
)
sprintf
(
header
,
"%08l
u
\n
"
,
(
unsigned
long
)
size
);
if
(
_write_bytes
((
int
)
new_fd
,
header
,
9
)
!=
9
)
{
if
(
_write_bytes
((
int
)
new_fd
,
header
,
9
)
!=
9
)
{
error
(
"wiki: failed to write message header %m"
);
error
(
"wiki: failed to write message header %m"
);
return
0
;
return
0
;
...
...
This diff is collapsed.
Click to expand it.
src/plugins/sched/wiki/start_job.c
+
13
−
3
View file @
9c34fa32
...
@@ -51,7 +51,7 @@ extern int start_job(char *cmd_ptr, int *err_code, char **err_msg)
...
@@ -51,7 +51,7 @@ extern int start_job(char *cmd_ptr, int *err_code, char **err_msg)
int
i
;
int
i
;
uint32_t
jobid
;
uint32_t
jobid
;
hostlist_t
hl
;
hostlist_t
hl
;
char
host_string
[
1024
];
char
host_string
[
2048
];
static
char
reply_msg
[
128
];
static
char
reply_msg
[
128
];
arg_ptr
=
strstr
(
cmd_ptr
,
"ARG="
);
arg_ptr
=
strstr
(
cmd_ptr
,
"ARG="
);
...
@@ -82,12 +82,22 @@ extern int start_job(char *cmd_ptr, int *err_code, char **err_msg)
...
@@ -82,12 +82,22 @@ extern int start_job(char *cmd_ptr, int *err_code, char **err_msg)
node_ptr
[
i
]
=
','
;
node_ptr
[
i
]
=
','
;
}
}
hl
=
hostlist_create
(
node_ptr
);
hl
=
hostlist_create
(
node_ptr
);
if
(
hl
==
NULL
)
{
*
err_code
=
-
300
;
*
err_msg
=
"STARTJOB TASKLIST is invalid"
;
error
(
"wiki: STARTJOB TASKLIST is invalid: %s"
,
node_ptr
");
return -1;
}
hostlist_uniq(hl); /* for now, don't worry about task layout */
hostlist_sort(hl);
i = hostlist_ranged_string(hl, sizeof(host_string), host_string);
i = hostlist_ranged_string(hl, sizeof(host_string), host_string);
hostlist_destroy(hl);
hostlist_destroy(hl);
if (i < 0) {
if (i < 0) {
*err_code = -300;
*err_code = -300;
*err_msg = "
STARTJOB
has
invalid
TASKLIST
";
*err_msg = "
STARTJOB
has
invalid
TASKLIST
";
error
(
"wiki: STARTJOB has invalid TASKLIST"
);
error("
wiki
:
STARTJOB
has
invalid
TASKLIST
:
%
s
",
host_string);
return -1;
return -1;
}
}
if (_start_job(jobid, host_string, err_code, err_msg) != 0)
if (_start_job(jobid, host_string, err_code, err_msg) != 0)
...
@@ -146,7 +156,7 @@ static int _start_job(uint32_t jobid, char *hostlist,
...
@@ -146,7 +156,7 @@ static int _start_job(uint32_t jobid, char *hostlist,
*err_msg = "
Invalid
TASKLIST
";
*err_msg = "
Invalid
TASKLIST
";
error("
wiki
:
Attempt
to
set
invalid
node
list
for
job
%
u
,
%
s
",
error("
wiki
:
Attempt
to
set
invalid
node
list
for
job
%
u
,
%
s
",
jobid, hostlist);
jobid, hostlist);
xfree
(
host
list
);
xfree(
new_node_
list);
rc = -1;
rc = -1;
goto fini;
goto fini;
}
}
...
...
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