From 72e64d3e73ec5af03f13c0357c8414598b585d6b Mon Sep 17 00:00:00 2001 From: Robert Izzard <r.izzard@surrey.ac.uk> Date: Mon, 24 Jan 2022 17:55:51 +0000 Subject: [PATCH] update start_at in slurm bash script to do the arithmetic properly --- binarycpython/utils/population_extensions/slurm.py | 2 +- install.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/binarycpython/utils/population_extensions/slurm.py b/binarycpython/utils/population_extensions/slurm.py index b19ed1c07..5dc8234b3 100644 --- a/binarycpython/utils/population_extensions/slurm.py +++ b/binarycpython/utils/population_extensions/slurm.py @@ -291,7 +291,7 @@ class slurm: ] + sys.argv[1:] + [ - "start_at=" + str(jobarrayindex) + "-1", # do we need the -1? + "start_at=$((" + str(jobarrayindex) + "-1))", "modulo=" + str(self.grid_options["slurm_njobs"]), "slurm_njobs=" + str(self.grid_options["slurm_njobs"]), "slurm_dir=" + self.grid_options["slurm_dir"], diff --git a/install.sh b/install.sh index f204a7922..b9171547d 100755 --- a/install.sh +++ b/install.sh @@ -5,14 +5,14 @@ VERSION_NUMBER=$(cat "VERSION") echo "installing binarcpython version $VERSION_NUMBER" # Clean up all the stuff from before -python setup.py clean --all +python3 setup.py clean --all # Go into a directory that doesnt contain 'binarycpython' so pip will uninstall the one in the venv, not the local one. cd src -pip uninstall -y binarycpython +pip3 uninstall -y binarycpython cd ../ # Create build, sdist and install it into the venv -python setup.py build --force -python setup.py sdist -pip install -v dist/binarycpython-$VERSION_NUMBER.tar.gz +python3 setup.py build --force +python3 setup.py sdist +pip3 install -v dist/binarycpython-$VERSION_NUMBER.tar.gz -- GitLab