diff options
author | Thomas White <taw@physics.org> | 2020-08-31 17:21:35 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-08-31 17:21:35 +0200 |
commit | cbb0d6f17a45cf9f07aab8d007fb73709d14d74f (patch) | |
tree | 81702aab88783a5e5d50a680ca707a74a14e9d48 /src/gui_backend_slurm.c | |
parent | 4803fee7cb9e02251003bbbf20ecab7e41291d78 (diff) |
SLURM: Implement cancel_task
Diffstat (limited to 'src/gui_backend_slurm.c')
-rw-r--r-- | src/gui_backend_slurm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui_backend_slurm.c b/src/gui_backend_slurm.c index 92adc391..33e35959 100644 --- a/src/gui_backend_slurm.c +++ b/src/gui_backend_slurm.c @@ -70,7 +70,12 @@ static int get_task_status(void *job_priv, static void cancel_task(void *job_priv) { - //struct slurm_job *job = job_priv; + int i; + struct slurm_job *job = job_priv; + for ( i=0; i<job->n_blocks; i++) { + STATUS("Stopping SLURM job %i\n", job->job_ids[i]); + slurm_kill_job(job->job_ids[i], SIGINT, 0); + } } |