-
Notifications
You must be signed in to change notification settings - Fork 2
/
runme_diff1D.sh
42 lines (27 loc) · 947 Bytes
/
runme_diff1D.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# -> to make it executable: chmod +x runme.sh or chmod 755 runme.sh
module purge > /dev/null 2>&1
module load julia
module load cuda/11.2
julia_=$(which julia)
RESOL_1D=( 32 64 128 256 512 1024 2048 4096 8192 16384 )
declare -a RUN_1D=( "diff_1D_lin" "diff_1D_linstep" "diff_1D_nonlin" )
USE_GPU=true
DO_VIZ=false
DO_SAVE=true
DO_SAVE_VIZ=false
# Read the array values with space
for name in "${RUN_1D[@]}"; do
if [ "$DO_SAVE" = "true" ]; then
FILE=../output/out_"$name".txt
if [ -f "$FILE" ]; then
echo "Systematic results (file $FILE) already exists. Remove to continue."
exit 0
else
echo "Launching systematics (saving results to $FILE)."
fi
fi
for i in "${RESOL_1D[@]}"; do
USE_GPU=$USE_GPU DO_VIZ=$DO_VIZ DO_SAVE=$DO_SAVE DO_SAVE_VIZ=$DO_SAVE_VIZ NX=$i $julia_ --project -O3 --check-bounds=no "$name".jl
done
done