Skip to content

Commit

Permalink
update scripts for supercomputer
Browse files Browse the repository at this point in the history
  • Loading branch information
djpasseyjr committed Apr 11, 2024
1 parent c703f3b commit a7bb086
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion experiments/exp2/runner/exp_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
DYN_PARAM_FNAME = "dynamic_models"
METH_PARAM_FNAME = "inference_methods"
FILE_PREFIX = "exp2"
SAVE_DIR = Path(__file__).parents[0] # Path("/work/users/d/j/djpassey/interfere_exp1.1")
SAVE_DIR = Path("/work/users/d/j/djpassey/interfere_exp2.0")

def save_file_path(idx):
return SAVE_DIR / Path(f"{FILE_PREFIX}_output{idx}.pkl")
Expand Down
2 changes: 1 addition & 1 deletion experiments/exp2/runner/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
OPT_ALL = False

# Toggles a test run vs. a full run.
IS_TEST_RUN = False
IS_TEST_RUN = False

# Read the dynamic models param array and access at the command line arg index.
# Read in the list of inference methods.
Expand Down
2 changes: 1 addition & 1 deletion experiments/exp2/runner/single_slurm_job.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module purge
module load anaconda
conda activate interfere
conda activate interfere_exp2

python /nas/longleaf/home/djpassey/interfere/experiments/exp2/runner/run.py $1
10 changes: 5 additions & 5 deletions experiments/exp2/runner/slurm_submit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

# Expected number of hours to run one simulation (always overestimate so that slurm doesnt kill the sim)
HOURS_PER_SIM=48
GIGS=32
GIGS=16

# Arguments for sbatch. Sets the appropriate time limit and directory
FLAGS="--ntasks=1 --mem=${GIGS}G --cpus-per-task=1 --time=$HOURS_PER_SIM:00:00 --chdir=$DATADIR"
FLAGS="--ntasks=1 --mem=${GIGS}G --cpus-per-task=1 --time=$HOURS_PER_SIM:00:00"
# Total number of jobs
NJOBS=$(python3 -c "import exp_tools as ex; ex.print_num_jobs()")
for((n=0; n<$NJOBS; n+=1)); do
Expand All @@ -14,10 +14,10 @@ for((n=0; n<$NJOBS; n+=1)); do

if [[ "$incomplete" == 'True' ]]; then
# Submit the multiple parameter job script to the clusters
sbatch $FLAGS /nas/longleaf/home/djpassey/interfere/experiments/exp1/runner/single_slurm_job.sh $n
echo "Submitted exp_output$n.ipynb"
sbatch $FLAGS /nas/longleaf/home/djpassey/interfere/experiments/exp2/runner/single_slurm_job.sh $n
echo "Submitted exp2 - $n"
else
echo "exp_output$n.ipynb is NOT SUBMITTED"
echo "exp2 - $n is NOT SUBMITTED"
fi

done

0 comments on commit a7bb086

Please sign in to comment.