Skip to content
Snippets Groups Projects
Commit ec25747c authored by Danny Auble's avatar Danny Auble
Browse files

Fixed bad commit 34f7ab28

parent 833aafff
No related branches found
No related tags found
No related merge requests found
...@@ -571,7 +571,8 @@ static int _merge_step_files(void) ...@@ -571,7 +571,8 @@ static int _merge_step_files(void)
char *step_dir = NULL; char *step_dir = NULL;
char *step_path = NULL; char *step_path = NULL;
char *stepno = NULL; char *stepno = NULL;
int node_cnt; int node_cnt = -1;
int last_step = -1, step_cnt = 0;
int job_id; int job_id;
int rc = SLURM_SUCCESS; int rc = SLURM_SUCCESS;
ListIterator itr; ListIterator itr;
...@@ -647,8 +648,6 @@ static int _merge_step_files(void) ...@@ -647,8 +648,6 @@ static int _merge_step_files(void)
goto endit; goto endit;
} }
put_int_attribute(fid_job, ATTR_NSTEPS, list_count(file_list));
jgid_steps = make_group(fid_job, GRP_STEPS); jgid_steps = make_group(fid_job, GRP_STEPS);
if (jgid_steps < 0) { if (jgid_steps < 0) {
error("Failed to create group %s", error("Failed to create group %s",
...@@ -666,8 +665,9 @@ static int _merge_step_files(void) ...@@ -666,8 +665,9 @@ static int _merge_step_files(void)
//info("got file of %s", sh5util_file->file_name); //info("got file of %s", sh5util_file->file_name);
/* make a group for each step */ /* make a group for each step */
if ((sh5util_file->step_id == -2) || if (sh5util_file->step_id != last_step) {
(sh5util_file->step_id > max_step)) { last_step = sh5util_file->step_id;
step_cnt++;
/* on to the next step, close down the last one */ /* on to the next step, close down the last one */
if (jgid_step) { if (jgid_step) {
put_int_attribute( put_int_attribute(
...@@ -677,14 +677,13 @@ static int _merge_step_files(void) ...@@ -677,14 +677,13 @@ static int _merge_step_files(void)
node_cnt = 0; node_cnt = 0;
} }
if (sh5util_file->step_id == NO_VAL) { if (sh5util_file->step_id == -2)
jgrp_step_name = xstrdup_printf( jgrp_step_name = xstrdup_printf(
"/%s/batch", GRP_STEPS); "/%s/batch", GRP_STEPS);
} else { else
jgrp_step_name = xstrdup_printf( jgrp_step_name = xstrdup_printf(
"/%s/%d", GRP_STEPS, "/%s/%d", GRP_STEPS,
sh5util_file->step_id); sh5util_file->step_id);
}
// info("making group for step %d", sh5util_file->step_id); // info("making group for step %d", sh5util_file->step_id);
jgid_step = make_group(fid_job, jgrp_step_name); jgid_step = make_group(fid_job, jgrp_step_name);
...@@ -722,6 +721,8 @@ static int _merge_step_files(void) ...@@ -722,6 +721,8 @@ static int _merge_step_files(void)
} }
list_iterator_destroy(itr); list_iterator_destroy(itr);
put_int_attribute(fid_job, ATTR_NSTEPS, step_cnt);
endit: endit:
FREE_NULL_LIST(file_list); FREE_NULL_LIST(file_list);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment