View | Details | Raw Unified | Return to ticket 6807
Collapse All | Expand All

(-)a/src/plugins/burst_buffer/cray/burst_buffer_cray.c (-8 / +19 lines)
Lines 205-211 struct bb_total_size { Link Here
205
	uint64_t capacity;
205
	uint64_t capacity;
206
};
206
};
207
207
208
static void	_add_bb_to_script(char **script_body, char *burst_buffer_file);
208
static void	_add_bb_to_script(char **script_body,
209
				  const char *burst_buffer_file);
209
static int	_alloc_job_bb(struct job_record *job_ptr, bb_job_t *bb_job,
210
static int	_alloc_job_bb(struct job_record *job_ptr, bb_job_t *bb_job,
210
			      bool job_ready);
211
			      bool job_ready);
211
static void	_apply_limits(void);
212
static void	_apply_limits(void);
Lines 2945-2954 fini: xfree(access); Link Here
2945
}
2946
}
2946
2947
2947
/* Insert the contents of "burst_buffer_file" into "script_body" */
2948
/* Insert the contents of "burst_buffer_file" into "script_body" */
2948
static void  _add_bb_to_script(char **script_body, char *burst_buffer_file)
2949
static void  _add_bb_to_script(char **script_body,
2950
			       const char *burst_buffer_file)
2949
{
2951
{
2950
	char *orig_script = *script_body;
2952
	char *orig_script = *script_body;
2951
	char *new_script, *sep, save_char;
2953
	char *new_script, *sep, save_char;
2954
	char *bb_opt = NULL;
2952
	int i;
2955
	int i;
2953
2956
2954
	if (!burst_buffer_file || (burst_buffer_file[0] == '\0'))
2957
	if (!burst_buffer_file || (burst_buffer_file[0] == '\0'))
Lines 2959-2973 static void _add_bb_to_script(char **sc Link Here
2959
		return;
2962
		return;
2960
	}
2963
	}
2961
2964
2962
	i = strlen(burst_buffer_file) - 1;
2965
	bb_opt = xstrdup(burst_buffer_file);
2963
	if (burst_buffer_file[i] != '\n')	/* Append new line as needed */
2966
2964
		xstrcat(burst_buffer_file, "\n");
2967
	i = strlen(bb_opt) - 1;
2968
	if (bb_opt[i] != '\n')	/* Append new line as needed */
2969
		xstrcat(bb_opt, "\n");
2965
2970
2966
	if (orig_script[0] != '#') {
2971
	if (orig_script[0] != '#') {
2967
		/* Prepend burst buffer file */
2972
		/* Prepend burst buffer file */
2968
		new_script = xstrdup(burst_buffer_file);
2973
		new_script = xstrdup(bb_opt);
2969
		xstrcat(new_script, orig_script);
2974
		xstrcat(new_script, orig_script);
2975
		xfree(*script_body);
2970
		*script_body = new_script;
2976
		*script_body = new_script;
2977
		xfree(bb_opt);
2971
		return;
2978
		return;
2972
	}
2979
	}
2973
2980
Lines 2976-2991 static void _add_bb_to_script(char **sc Link Here
2976
		save_char = sep[1];
2983
		save_char = sep[1];
2977
		sep[1] = '\0';
2984
		sep[1] = '\0';
2978
		new_script = xstrdup(orig_script);
2985
		new_script = xstrdup(orig_script);
2979
		xstrcat(new_script, burst_buffer_file);
2986
		xstrcat(new_script, bb_opt);
2980
		sep[1] = save_char;
2987
		sep[1] = save_char;
2981
		xstrcat(new_script, sep + 1);
2988
		xstrcat(new_script, sep + 1);
2989
		xfree(*script_body);
2982
		*script_body = new_script;
2990
		*script_body = new_script;
2991
		xfree(bb_opt);
2983
		return;
2992
		return;
2984
	} else {
2993
	} else {
2985
		new_script = xstrdup(orig_script);
2994
		new_script = xstrdup(orig_script);
2986
		xstrcat(new_script, "\n");
2995
		xstrcat(new_script, "\n");
2987
		xstrcat(new_script, burst_buffer_file);
2996
		xstrcat(new_script, bb_opt);
2997
		xfree(*script_body);
2988
		*script_body = new_script;
2998
		*script_body = new_script;
2999
		xfree(bb_opt);
2989
		return;
3000
		return;
2990
	}
3001
	}
2991
}
3002
}
(-)a/src/plugins/node_features/knl_cray/node_features_knl_cray.c (-2 / +2 lines)
Lines 909-920 static char *_load_mcdram_type(int cache Link Here
909
			resp_msg[i-1] = '\0';
909
			resp_msg[i-1] = '\0';
910
	}
910
	}
911
	_log_script_argv(script_argv, resp_msg);
911
	_log_script_argv(script_argv, resp_msg);
912
	_free_script_argv(script_argv);
913
	if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) {
912
	if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) {
914
		error("%s: %s %s %s status:%u response:%s", __func__,
913
		error("%s: %s %s %s status:%u response:%s", __func__,
915
		      script_argv[0], script_argv[1], script_argv[2],
914
		      script_argv[0], script_argv[1], script_argv[2],
916
		      status, resp_msg);
915
		      status, resp_msg);
917
	}
916
	}
917
	_free_script_argv(script_argv);
918
	return resp_msg;
918
	return resp_msg;
919
}
919
}
920
920
Lines 970-981 static char *_load_numa_type(char *type) Link Here
970
			resp_msg[i-1] = '\0';
970
			resp_msg[i-1] = '\0';
971
	}
971
	}
972
	_log_script_argv(script_argv, resp_msg);
972
	_log_script_argv(script_argv, resp_msg);
973
	_free_script_argv(script_argv);
974
	if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) {
973
	if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) {
975
		error("%s: %s %s %s status:%u response:%s", __func__,
974
		error("%s: %s %s %s status:%u response:%s", __func__,
976
		      script_argv[0], script_argv[1], script_argv[2],
975
		      script_argv[0], script_argv[1], script_argv[2],
977
		      status, resp_msg);
976
		      status, resp_msg);
978
	}
977
	}
978
	_free_script_argv(script_argv);
979
	return resp_msg;
979
	return resp_msg;
980
}
980
}
981
981

Return to ticket 6807