diff options
Diffstat (limited to 'run_sweeps.sh')
| -rwxr-xr-x | run_sweeps.sh | 43 |
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 |
