|
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 |
} |