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
a4e90456
Commit
a4e90456
authored
18 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
svn merge -r10818:10826
https://eris.llnl.gov/svn/slurm/branches/slurm-1.1
parent
b20266e3
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
+4
-0
4 additions, 0 deletions
NEWS
src/plugins/sched/wiki2/get_jobs.c
+39
-2
39 additions, 2 deletions
src/plugins/sched/wiki2/get_jobs.c
src/plugins/sched/wiki2/get_nodes.c
+5
-6
5 additions, 6 deletions
src/plugins/sched/wiki2/get_nodes.c
with
48 additions
and
8 deletions
NEWS
+
4
−
0
View file @
a4e90456
...
...
@@ -208,6 +208,10 @@ documents those changes that are of interest to users and admins.
the code)
-- Added support for OSX build.
* Changes in SLURM 1.1.26
=========================
- In sched/wiki2, fixes for support of job features.
* Changes in SLURM 1.1.25
=========================
- switch/elan: Fix for "Failed to initialise stats structure" from
...
...
This diff is collapsed.
Click to expand it.
src/plugins/sched/wiki2/get_jobs.c
+
39
−
2
View file @
a4e90456
...
...
@@ -49,6 +49,7 @@ static char * _dump_all_jobs(int *job_cnt, int state_info);
static
char
*
_dump_job
(
struct
job_record
*
job_ptr
,
int
state_info
);
static
char
*
_get_group_name
(
gid_t
gid
);
static
uint32_t
_get_job_end_time
(
struct
job_record
*
job_ptr
);
static
char
*
_get_job_features
(
struct
job_record
*
job_ptr
);
static
uint32_t
_get_job_min_disk
(
struct
job_record
*
job_ptr
);
static
uint32_t
_get_job_min_mem
(
struct
job_record
*
job_ptr
);
static
uint32_t
_get_job_min_nodes
(
struct
job_record
*
job_ptr
);
...
...
@@ -71,6 +72,8 @@ static uint32_t _get_job_time_limit(struct job_record *job_ptr);
* Response format
* ARG=<cnt>#<JOBID>;
* STATE=<state>; Moab equivalent job state
* [RFEATURES=<features>;] required features, if any,
* NOTE: OR operator not supported
* [HOSTLIST=<node1:node2>;] list of required nodes, if any
* [STARTDATE=<uts>;] earliest start time, if any
* [TASKLIST=<node1:node2>;] nodes in use, if running or completing
...
...
@@ -91,8 +94,6 @@ static uint32_t _get_job_time_limit(struct job_record *job_ptr);
* GNAME=<group_name>; group name
* [#<JOBID>;...]; additional jobs, if any
*
* NOTE: We don't report RFEATURES due to lack of support for "&" and "|"
* (logical AND and OR operators).
*/
/* RET 0 on success, -1 on failure */
extern
int
get_jobs
(
char
*
cmd_ptr
,
int
*
err_code
,
char
**
err_msg
)
...
...
@@ -205,6 +206,13 @@ static char * _dump_job(struct job_record *job_ptr, int state_info)
/* SLURM_INFO_VOLITILE or SLURM_INFO_ALL */
if
(
job_ptr
->
job_state
==
JOB_PENDING
)
{
char
*
req_features
=
_get_job_features
(
job_ptr
);
if
(
req_features
)
{
snprintf
(
tmp
,
sizeof
(
tmp
),
"RFEATURES=%s;"
,
req_features
);
xstrcat
(
buf
,
tmp
);
xfree
(
req_features
);
}
if
((
job_ptr
->
details
)
&&
(
job_ptr
->
details
->
req_nodes
)
&&
(
job_ptr
->
details
->
req_nodes
[
0
]))
{
...
...
@@ -406,6 +414,35 @@ static uint32_t _get_job_end_time(struct job_record *job_ptr)
return
(
uint32_t
)
0
;
}
/* Return a job's required features, if any joined with AND.
* If required features are joined by OR, then return NULL.
* Returned string must be xfreed. */
static
char
*
_get_job_features
(
struct
job_record
*
job_ptr
)
{
int
i
;
char
*
rfeatures
;
if
((
job_ptr
->
details
==
NULL
)
||
(
job_ptr
->
details
->
features
==
NULL
)
||
(
job_ptr
->
details
->
features
[
0
]
==
'\0'
))
return
NULL
;
rfeatures
=
xstrdup
(
job_ptr
->
details
->
features
);
/* Translate "&" to ":" */
for
(
i
=
0
;
;
i
++
)
{
if
(
rfeatures
[
i
]
==
'\0'
)
return
rfeatures
;
if
(
rfeatures
[
i
]
==
'|'
)
break
;
if
(
rfeatures
[
i
]
==
'&'
)
rfeatures
[
i
]
=
':'
;
}
/* Found '|' (OR), which is not supported by Moab */
xfree
(
rfeatures
);
return
NULL
;
}
/* returns how long job has been suspended, in seconds */
static
uint32_t
_get_job_suspend_time
(
struct
job_record
*
job_ptr
)
{
...
...
This diff is collapsed.
Click to expand it.
src/plugins/sched/wiki2/get_nodes.c
+
5
−
6
View file @
a4e90456
...
...
@@ -61,8 +61,8 @@ static char * _get_node_state(struct node_record *node_ptr);
* CMEMORY=<MB>; MB of memory on node
* CDISK=<MB>; MB of disk space on node
* CPROCS=<cpus>; CPU count on node
* [FEATURE
S
=<feature>;] features associated with node, if any,
* colon separat
e
* [FEATURE=<feature>;] features associated with node, if any,
* colon separat
or
* [#<NODEID>:...];
*/
extern
int
get_nodes
(
char
*
cmd_ptr
,
int
*
err_code
,
char
**
err_msg
)
...
...
@@ -211,12 +211,11 @@ static char * _dump_node(struct node_record *node_ptr, int state_info)
if
(
node_ptr
->
config_ptr
&&
node_ptr
->
config_ptr
->
feature
)
{
snprintf
(
tmp
,
sizeof
(
tmp
),
"FEATURE
S
=%s;"
,
snprintf
(
tmp
,
sizeof
(
tmp
),
"FEATURE=%s;"
,
node_ptr
->
config_ptr
->
feature
);
/* comma separat
ed
to colon */
/* comma separat
or
to colon */
for
(
i
=
0
;
(
tmp
[
i
]
!=
'\0'
);
i
++
)
{
if
((
tmp
[
i
]
==
','
)
||
(
tmp
[
i
]
==
'|'
))
if
(
tmp
[
i
]
==
','
)
tmp
[
i
]
=
':'
;
}
xstrcat
(
buf
,
tmp
);
...
...
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