Skip to content

Commit

Permalink
fix for slurm + singularity (wrong check-alive shell script)
Browse files Browse the repository at this point in the history
  • Loading branch information
leepc12 committed Jun 11, 2019
1 parent 7dd1782 commit 6123bf7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion caper/caper_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down

0 comments on commit 6123bf7

Please sign in to comment.