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
0e4494c5
Commit
0e4494c5
authored
7 years ago
by
Morris Jette
Browse files
Options
Downloads
Patches
Plain Diff
Add error check
Coverity CID 44723
parent
fcb20f02
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/acct_gather_profile/hdf5/acct_gather_profile_hdf5.c
+10
-4
10 additions, 4 deletions
...ugins/acct_gather_profile/hdf5/acct_gather_profile_hdf5.c
with
10 additions
and
4 deletions
src/plugins/acct_gather_profile/hdf5/acct_gather_profile_hdf5.c
+
10
−
4
View file @
0e4494c5
...
@@ -324,7 +324,8 @@ extern int acct_gather_profile_p_node_step_start(stepd_step_rec_t* job)
...
@@ -324,7 +324,8 @@ extern int acct_gather_profile_p_node_step_start(stepd_step_rec_t* job)
_create_directories
();
_create_directories
();
/* Use a more user friendly string "batch" rather
/*
* Use a more user friendly string "batch" rather
* then 4294967294.
* then 4294967294.
*/
*/
if
(
g_job
->
stepid
==
NO_VAL
)
{
if
(
g_job
->
stepid
==
NO_VAL
)
{
...
@@ -347,20 +348,25 @@ extern int acct_gather_profile_p_node_step_start(stepd_step_rec_t* job)
...
@@ -347,20 +348,25 @@ extern int acct_gather_profile_p_node_step_start(stepd_step_rec_t* job)
profile_str
,
profile_file_name
);
profile_str
,
profile_file_name
);
}
}
// Create a new file using the default properties.
/*
* Create a new file using the default properties
*/
file_id
=
H5Fcreate
(
profile_file_name
,
H5F_ACC_TRUNC
,
H5P_DEFAULT
,
file_id
=
H5Fcreate
(
profile_file_name
,
H5F_ACC_TRUNC
,
H5P_DEFAULT
,
H5P_DEFAULT
);
H5P_DEFAULT
);
if
(
chown
(
profile_file_name
,
(
uid_t
)
g_job
->
uid
,
if
(
chown
(
profile_file_name
,
(
uid_t
)
g_job
->
uid
,
(
gid_t
)
g_job
->
gid
)
<
0
)
(
gid_t
)
g_job
->
gid
)
<
0
)
error
(
"chown(%s): %m"
,
profile_file_name
);
error
(
"chown(%s): %m"
,
profile_file_name
);
chmod
(
profile_file_name
,
0600
);
if
(
chmod
(
profile_file_name
,
0600
)
<
0
)
error
(
"chmod(%s): %m"
,
profile_file_name
);
xfree
(
profile_file_name
);
xfree
(
profile_file_name
);
if
(
file_id
<
1
)
{
if
(
file_id
<
1
)
{
info
(
"PROFILE: Failed to create Node group"
);
info
(
"PROFILE: Failed to create Node group"
);
return
SLURM_FAILURE
;
return
SLURM_FAILURE
;
}
}
/* fd_set_close_on_exec(file_id); Not supported for HDF5 */
/*
* fd_set_close_on_exec(file_id); Not supported for HDF5
*/
sprintf
(
group_node
,
"/%s"
,
g_job
->
node_name
);
sprintf
(
group_node
,
"/%s"
,
g_job
->
node_name
);
gid_node
=
make_group
(
file_id
,
group_node
);
gid_node
=
make_group
(
file_id
,
group_node
);
if
(
gid_node
<
0
)
{
if
(
gid_node
<
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