From 44aaf445c47fc2faf8672a9b7b031f92892f18e2 Mon Sep 17 00:00:00 2001 From: Andy Baxter Date: Thu, 28 Sep 2023 17:59:54 +0100 Subject: [PATCH 1/2] added extra checks in sh file --- do_full_run.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) mode change 100644 => 100755 do_full_run.sh diff --git a/do_full_run.sh b/do_full_run.sh old mode 100644 new mode 100755 index b2e6807..90f35c5 --- a/do_full_run.sh +++ b/do_full_run.sh @@ -119,6 +119,23 @@ then exit_abnormal fi +if ! test -f simpaths.jar +then + echo "This must be run in the same directory as the compiled (with dependencies) \`simpaths.jar\`" + exit_abnormal +fi + +if ! test -d input +then + echo "This must be run in the same directory as the \`input/\` folder" + exit_abnormal +fi + +if ! test -d output/logs +then + mkdir -p output/logs +fi + # Runs 1,000 runs as 50 sequential runs of n=20 with 50 unique starting seeds seq 100 100 5000 | parallel java -cp simpaths.jar simpaths.experiment.SimPathsMultiRun -r {} -n $BATCH_SIZE \ -p $POPULATION_SIZE \ From 3761d721630a1319ebb7cd2eb9f624e1137804db Mon Sep 17 00:00:00 2001 From: Andy Baxter Date: Fri, 29 Sep 2023 12:41:12 +0100 Subject: [PATCH 2/2] command parsing to start run --- do_full_run.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/do_full_run.sh b/do_full_run.sh index 90f35c5..8c1dc2d 100755 --- a/do_full_run.sh +++ b/do_full_run.sh @@ -137,12 +137,12 @@ then fi # Runs 1,000 runs as 50 sequential runs of n=20 with 50 unique starting seeds -seq 100 100 5000 | parallel java -cp simpaths.jar simpaths.experiment.SimPathsMultiRun -r {} -n $BATCH_SIZE \ - -p $POPULATION_SIZE \ - -s $START_YEAR \ - -e $END_YEAR \ - -g $GUI \ - -f +seq 100 100 5000 | parallel java -jar simpaths.jar -r {} -n $BATCH_SIZE \ + -p $POPULATION_SIZE \ + -s $START_YEAR \ + -e $END_YEAR \ + -g $GUI \ + -f # Tidy output folders, removing empty database folders and redundant input folders (keeps csvs) rm -r ./output/202*/database ./output/202*/input