launch_any.sh
:
#!/bin/bash
#SBATCH --ntasks=1
#SBATCH -c 4
#SBATCH --gres=gpu
#SBATCH --mem=12G
# ^ Flags here only are used if sbatch is invoked
# on this script directly, otherwise the sbatch
# flags are in the flow script.
# (Optional)
export RESULTS_DIR=`cd ../results_new; pwd`
# Activate environment
source activate pytorch-env
for script in "$@"
do
echo "launching $script ..."
./${script} &
done
wait
flow_submit_xx.sh
:
#!/bin/bash
echo "Submitting scripts: " "$@"
flow-submit \
--resume \
--prolog "source ../envs/env_imagenet.sh" \
--options "mem=12G;time=12:00:00;account=...;ntasks=1;cpus-per-task=4;gres=gpu:1" \
--root=`pwd` \
launch launch_any.sh "$@"