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
e9062ff0
Commit
e9062ff0
authored
13 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Change cgroup printing of uint64_t to use %"PRIu64""
parent
d263ad6e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/xcgroup.c
+6
-7
6 additions, 7 deletions
src/common/xcgroup.c
src/plugins/task/cgroup/task_cgroup_memory.c
+1
-1
1 addition, 1 deletion
src/plugins/task/cgroup/task_cgroup_memory.c
with
7 additions
and
8 deletions
src/common/xcgroup.c
+
6
−
7
View file @
e9062ff0
...
...
@@ -709,9 +709,9 @@ int xcgroup_set_uint64_param(xcgroup_t* cg, char* param, uint64_t value)
fstatus
=
_file_write_uint64s
(
file_path
,
&
value
,
1
);
if
(
fstatus
!=
XCGROUP_SUCCESS
)
debug2
(
"unable to set parameter '%s' to "
"'%
llu
' for '%s'"
,
param
,
value
,
cpath
);
"'%
"
PRIu64
"
' for '%s'"
,
param
,
value
,
cpath
);
else
debug3
(
"parameter '%s' set to '%
llu
' for '%s'"
,
debug3
(
"parameter '%s' set to '%
"
PRIu64
"
' for '%s'"
,
param
,
value
,
cpath
);
return
fstatus
;
...
...
@@ -809,11 +809,10 @@ int _file_write_uint64s(char* file_path, uint64_t* values, int nb)
value
=
values
[
i
];
rc
=
snprintf
(
tstr
,
sizeof
(
tstr
),
"%llu"
,
(
long
long
unsigned
int
)
value
);
rc
=
snprintf
(
tstr
,
sizeof
(
tstr
),
"%"
PRIu64
""
,
value
);
if
(
rc
<
0
)
{
debug2
(
"unable to build %
llu
string value,
skipping"
,
value
);
debug2
(
"unable to build %
"
PRIu64
"
string value,
"
"skipping"
,
value
);
fstatus
=
XCGROUP_ERROR
;
continue
;
}
...
...
@@ -885,7 +884,7 @@ int _file_read_uint64s(char* file_path, uint64_t** pvalues, int* pnb)
}
}
/* build uint
32
_t list */
/* build uint
64
_t list */
if
(
i
>
0
)
{
pa
=
(
uint64_t
*
)
xmalloc
(
sizeof
(
uint64_t
)
*
i
);
p
=
buf
;
...
...
This diff is collapsed.
Click to expand it.
src/plugins/task/cgroup/task_cgroup_memory.c
+
1
−
1
View file @
e9062ff0
...
...
@@ -285,7 +285,7 @@ extern int task_cgroup_memory_create(slurmd_job_t *job)
"memory.limit_in_bytes"
,
mlb
);
xcgroup_set_uint64_param
(
&
job_memory_cg
,
"memory.memsw.limit_in_bytes"
,
mls
);
debug
(
"task/cgroup: job mem.limit=%
llu
MB memsw.limit=%
llu
MB"
,
debug
(
"task/cgroup: job mem.limit=%
"
PRIu64
"
MB memsw.limit=%
"
PRIu64
"
MB"
,
mlb
/
(
1024
*
1024
),
mls
/
(
1024
*
1024
));
/*
...
...
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