summaryrefslogtreecommitdiff
path: root/run_sweeps.sh
diff options
context:
space:
mode:
authorConnor Moore <connor@hhmoore.ca>2026-04-25 17:47:35 -0400
committerConnor Moore <connor@hhmoore.ca>2026-04-25 17:47:35 -0400
commit0fbccda615fa0b15b048b5723e5bfb359f95cd9a (patch)
tree7ad4b42d8f73ae099c7f3f3c1f198134fc4d7e28 /run_sweeps.sh
Initial commit with code and start of report
Diffstat (limited to 'run_sweeps.sh')
-rwxr-xr-xrun_sweeps.sh43
1 files changed, 43 insertions, 0 deletions
diff --git a/run_sweeps.sh b/run_sweeps.sh
new file mode 100755
index 0000000..ebb229b
--- /dev/null
+++ b/run_sweeps.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+
+#N_MATRIX="1024 2048 4096 8192 16384"
+N_MATRIX="1024 2048 4096"
+N_DATAPTS="64 128 256 512 1024 2048"
+
+GREEN='\033[0;32m'
+RESET='\033[0m'
+
+mkdir -p results/logs
+touch results/wtable
+
+
+for N in $N_MATRIX; do
+ # Change the manager file to use the correct matrix size
+ echo -e "${GREEN}Updating matrix size to $N...${RESET}"
+ sed "s/n=[0-9]\+/n=$N/" manager.f90 -i
+ for L in $N_DATAPTS; do
+ # Change the worker file to use the correct number of datapts
+ echo -e "Setting data size to $L!"
+ sed "s/ndat=[0-9]\+/ndat=$L/" manager.f90 -i
+
+ # Print to double check
+ cat manager.f90 | grep "n="
+ cat manager.f90 | grep "ndat="
+
+ # And compile the new binary + run
+ LOGFILE=results/logs/$N\_$L.log
+ make > $LOGFILE
+
+ WTIME=$(cat $LOGFILE | grep "wtime=" | cut -d "=" -f 2 | cut -d "(" -f 1)
+ echo -e "Wall time was $WTIME\n"
+
+ # Append to wall time file
+ echo $N $L $WTIME >> results/wtable
+
+
+ # Move the results to the proper file
+ mv eigs results/eigs_$N\_$L.out
+
+ done
+done