From 56d1629e0a8c7f6c242b623d40484477470a6a7c Mon Sep 17 00:00:00 2001 From: Morris Jette <jette@schedmd.com> Date: Wed, 25 Jan 2017 13:38:30 -0700 Subject: [PATCH] Add back function Commit 5e18d6662f7165db49870ac4a95ab515bc656eee was incomplete, missing a function and not buildable. --- .../burst_buffer/cray/burst_buffer_cray.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/plugins/burst_buffer/cray/burst_buffer_cray.c b/src/plugins/burst_buffer/cray/burst_buffer_cray.c index 52d15e9744b..c0b0ac3ffdd 100644 --- a/src/plugins/burst_buffer/cray/burst_buffer_cray.c +++ b/src/plugins/burst_buffer/cray/burst_buffer_cray.c @@ -213,6 +213,7 @@ static bb_pools_t *_bb_get_pools(int *num_ent, bb_state_t *state_ptr, uint32_t timeout); static bb_sessions_t *_bb_get_sessions(int *num_ent, bb_state_t *state_ptr, uint32_t timeout); +static int _build_bb_script(struct job_record *job_ptr, char *script_file); static int _create_bufs(struct job_record *job_ptr, bb_job_t *bb_job, bool job_ready); static void * _create_persistent(void *x); @@ -2730,6 +2731,21 @@ fini: xfree(access); return rc; } +/* For interactive jobs, build a script containing the relevant DataWarp + * commands, as needed by the Cray API */ +static int _build_bb_script(struct job_record *job_ptr, char *script_file) +{ + char *out_buf = NULL; + int rc; + + xstrcat(out_buf, "#!/bin/bash\n"); + xstrcat(out_buf, job_ptr->burst_buffer); + rc = _write_file(script_file, out_buf); + xfree(out_buf); + + return rc; +} + /* * init() is called when the plugin is loaded, before any other functions * are called. Read and validate configuration file here. Spawn thread to -- GitLab