From 6123bf77e4bb45d5e0d15cfc5156d8b1e09240cb Mon Sep 17 00:00:00 2001 From: Jin Lee Date: Tue, 11 Jun 2019 12:12:47 -0700 Subject: [PATCH] fix for slurm + singularity (wrong check-alive shell script) --- caper/caper_backend.py | 4 +++- setup.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/caper/caper_backend.py b/caper/caper_backend.py index 85ed8224..18858068 100644 --- a/caper/caper_backend.py +++ b/caper/caper_backend.py @@ -299,7 +299,9 @@ class CaperBackendSLURM(dict): ${if defined(gpu) then '--nv' else ''} \ ${singularity} /bin/bash ${script}" """ - CHECK_ALIVE = "squeue -j ${job_id}" + CHECK_ALIVE = """CHK_ALIVE=$(squeue --noheader -j ${job_id} --format=%i | grep ${job_id}); if [ -z "$CHK_ALIVE" ]; \ +then /bin/bash -c 'exit 1'; else echo $CHK_ALIVE; fi""" + TEMPLATE = { "backend": { "providers": { diff --git a/setup.py b/setup.py index 0d902844..5c97edcc 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name='caper', - version='v0.2.6', + version='v0.2.7', python_requires='>3.4.1', scripts=['bin/caper', 'mysql/run_mysql_server_docker.sh', 'mysql/run_mysql_server_singularity.sh'],