From a7bb086c5910f1bed7a07c15eabd914a7f0335d3 Mon Sep 17 00:00:00 2001 From: DJ Passey Date: Thu, 11 Apr 2024 09:33:34 -0400 Subject: [PATCH] update scripts for supercomputer --- experiments/exp2/runner/exp_tools.py | 2 +- experiments/exp2/runner/run.py | 2 +- experiments/exp2/runner/single_slurm_job.sh | 2 +- experiments/exp2/runner/slurm_submit.sh | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/experiments/exp2/runner/exp_tools.py b/experiments/exp2/runner/exp_tools.py index 173eb2e..d253952 100755 --- a/experiments/exp2/runner/exp_tools.py +++ b/experiments/exp2/runner/exp_tools.py @@ -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") diff --git a/experiments/exp2/runner/run.py b/experiments/exp2/runner/run.py index 8f98927..4162e72 100755 --- a/experiments/exp2/runner/run.py +++ b/experiments/exp2/runner/run.py @@ -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. diff --git a/experiments/exp2/runner/single_slurm_job.sh b/experiments/exp2/runner/single_slurm_job.sh index 9b46cd4..c899b84 100755 --- a/experiments/exp2/runner/single_slurm_job.sh +++ b/experiments/exp2/runner/single_slurm_job.sh @@ -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 diff --git a/experiments/exp2/runner/slurm_submit.sh b/experiments/exp2/runner/slurm_submit.sh index c5a7f32..77dfb72 100755 --- a/experiments/exp2/runner/slurm_submit.sh +++ b/experiments/exp2/runner/slurm_submit.sh @@ -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 @@ -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