Skip to content

Commit

Permalink
use tmpdir
Browse files Browse the repository at this point in the history
  • Loading branch information
mwalmsley committed Nov 19, 2023
1 parent 84eb547 commit 5ac6be9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion only_for_me/narval/gpu_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def configure_optimizers(self):
def main():

logging.basicConfig(level=logging.INFO)
logging.warning('Script start')

parser = argparse.ArgumentParser()
parser.add_argument('--save-dir', dest='save_dir', type=str)
Expand All @@ -67,7 +68,7 @@ def main():
save_dir = '/home/walml/repos/temp'

else:
save_dir = '/project/def-bovy/walml/temp'
save_dir = os.environ['SLURM_TMPDIR']

schema = schemas.decals_all_campaigns_ortho_schema

Expand Down
3 changes: 2 additions & 1 deletion only_for_me/narval/gpu_split.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
#SBATCH --time=0:05:0
#SBATCH --time=0:15:0
#SBATCH --nodes=1
#SBATCH --ntasks=2
#SBATCH --ntasks-per-node=2
Expand All @@ -20,6 +20,7 @@ export NCCL_BLOCKING_WAIT=1 #Set this environment variable if you wish to use t
# echo "r$SLURM_NODEID master: $MASTER_ADDR"
# echo "r$SLURM_NODEID Launching python script"

echo 'Running script'
REPO_DIR=/project/def-bovy/walml/zoobot
srun $PYTHON $REPO_DIR/only_for_me/narval/gpu_split.py --gpus 1

0 comments on commit 5ac6be9

Please sign in to comment.