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
67c23eb6
Commit
67c23eb6
authored
9 years ago
by
Josko Plazonic
Committed by
David Bigagli
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add hv_to_qos_cond to Perl interface
parent
90e2e552
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
contribs/perlapi/libslurmdb/perl/cluster.c
+53
-0
53 additions, 0 deletions
contribs/perlapi/libslurmdb/perl/cluster.c
with
53 additions
and
0 deletions
contribs/perlapi/libslurmdb/perl/cluster.c
+
53
−
0
View file @
67c23eb6
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
extern
char
*
slurm_xstrdup
(
const
char
*
str
);
extern
char
*
slurm_xstrdup
(
const
char
*
str
);
extern
int
slurmdb_report_set_start_end_time
(
time_t
*
start
,
time_t
*
end
);
extern
int
slurmdb_report_set_start_end_time
(
time_t
*
start
,
time_t
*
end
);
extern
char
*
slurmdb_get_qos_complete_str_bitstr
(
List
qos_list
,
bitstr_t
*
valid_qos
);
int
int
av_to_cluster_grouping_list
(
AV
*
av
,
List
grouping_list
)
av_to_cluster_grouping_list
(
AV
*
av
,
List
grouping_list
)
...
@@ -778,3 +779,55 @@ job_rec_to_hv(slurmdb_job_rec_t* rec, HV* hv)
...
@@ -778,3 +779,55 @@ job_rec_to_hv(slurmdb_job_rec_t* rec, HV* hv)
return
0
;
return
0
;
}
}
int
hv_to_qos_cond
(
HV
*
hv
,
slurmdb_qos_cond_t
*
qos_cond
)
{
AV
*
element_av
;
char
*
str
=
NULL
;
int
i
,
elements
=
0
;
FETCH_FIELD
(
hv
,
qos_cond
,
preempt_mode
,
uint16_t
,
FALSE
);
FETCH_FIELD
(
hv
,
qos_cond
,
with_deleted
,
uint16_t
,
FALSE
);
FETCH_LIST_FIELD
(
hv
,
qos_cond
,
description_list
);
FETCH_LIST_FIELD
(
hv
,
qos_cond
,
id_list
);
FETCH_LIST_FIELD
(
hv
,
qos_cond
,
name_list
);
return
0
;
}
int
qos_rec_to_hv
(
slurmdb_qos_rec_t
*
rec
,
HV
*
hv
,
List
all_qos
)
{
char
*
preempt
=
NULL
;
preempt
=
slurmdb_get_qos_complete_str_bitstr
(
all_qos
,
rec
->
preempt_bitstr
);
hv_store_charp
(
hv
,
"preempt"
,
preempt
);
STORE_FIELD
(
hv
,
rec
,
description
,
charp
);
STORE_FIELD
(
hv
,
rec
,
id
,
uint32_t
);
STORE_FIELD
(
hv
,
rec
,
flags
,
uint32_t
);
STORE_FIELD
(
hv
,
rec
,
grace_time
,
uint32_t
);
STORE_FIELD
(
hv
,
rec
,
grp_jobs
,
uint32_t
);
STORE_FIELD
(
hv
,
rec
,
grp_submit_jobs
,
uint32_t
);
STORE_FIELD
(
hv
,
rec
,
grp_tres
,
charp
);
STORE_FIELD
(
hv
,
rec
,
grp_tres_mins
,
charp
);
STORE_FIELD
(
hv
,
rec
,
grp_tres_run_mins
,
charp
);
STORE_FIELD
(
hv
,
rec
,
grp_wall
,
uint32_t
);
STORE_FIELD
(
hv
,
rec
,
max_jobs_pu
,
uint32_t
);
STORE_FIELD
(
hv
,
rec
,
max_submit_jobs_pu
,
uint32_t
);
STORE_FIELD
(
hv
,
rec
,
max_tres_mins_pj
,
charp
);
STORE_FIELD
(
hv
,
rec
,
max_tres_pj
,
charp
);
STORE_FIELD
(
hv
,
rec
,
max_tres_pn
,
charp
);
STORE_FIELD
(
hv
,
rec
,
max_tres_pu
,
charp
);
STORE_FIELD
(
hv
,
rec
,
max_tres_run_mins_pu
,
charp
);
STORE_FIELD
(
hv
,
rec
,
max_wall_pj
,
uint32_t
);
STORE_FIELD
(
hv
,
rec
,
min_tres_pj
,
charp
);
STORE_FIELD
(
hv
,
rec
,
name
,
charp
);
STORE_FIELD
(
hv
,
rec
,
preempt_mode
,
uint16_t
);
STORE_FIELD
(
hv
,
rec
,
priority
,
uint32_t
);
STORE_FIELD
(
hv
,
rec
,
usage_factor
,
double
);
STORE_FIELD
(
hv
,
rec
,
usage_thres
,
double
);
return
0
;
}
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