-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-im
executable file
·102 lines (82 loc) · 2.59 KB
/
run-im
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/bin/bash
set -e #Fail on any error
cores=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu || echo "$NUMBER_OF_PROCESSORS")
if [ -n "$1" ]; then
proj=$1
shift;
else
proj="template"
fi
if [ -n "$1" ]; then
cores=$1
shift;
fi
echo "About to use $cores cores";
cmake --build build --target ${proj}-im; #-v for verbose
cd examples/$proj
# module load intelMPI
# [ $(uname) = "Linux" ] && source /opt/intel/Compiler/19.0/bin/compilervars.sh arch intel64
set -x
[ $(uname) = "Linux" ] && mpirun -np $cores ./qsf-${proj}-im $@
# [ $(uname) = "Linux" ] && mpirun -np 2 valgrind --leak-check=yes --show-leak-kinds=all --verbose ./${what}
[ $(uname) = "Darwin" ] && mpirun --host localhost:$cores ./qsf-${proj}-im $@
# [ $(uname) = "Darwin" ] && mpirun --mca btl vader,self,tcp -np 8 ./${what} $3
# [ $(uname) = "Darwin" ] && [ $(uname -m) = "arm64" ] && mpirun -np 2 ./${what} $3
# [ $(uname) = "Darwin" ] && [ $(uname -m) = "x86_64" ] && mpirun -np 4 ./${what} $3
# skipplots=false
# autoopen=true
# autoopenmerged=false
# [ "$skipplots" = true ] && exit 0
# REL="../../../"
# cd Results
# shopt -s nullglob
#1D
# FILES=mom*x.dat
# for f in $FILES
# do
# echo "Processing $f file..."
# gnuplot -e "filename='$f'" -e "xaxis=\"p [au]\"" "${REL}plots/wf1d.gnu"
# [ "$autoopen" = true ] && open "${f%.*}.pdf"
# done
# FILES=psi*x.dat
# for f in $FILES
# do
# echo "Processing $f file..."
# gnuplot -e "filename='$f'" -e "xaxis=\"x [au]\"" "${REL}plots/wf1d.gnu"
# [ "$autoopen" = true ] && open "${f%.*}.pdf"
# done
# # 2D
# FILES=mom*xy.dat
# for f in $FILES
# do
# echo "Processing $f file..."
# gnuplot -e "filename='$f'" -e "xaxis=\"p_x [au]\"" -e "yaxis=\"p_y [au]\"" "${REL}plots/wf2d.gnu"
# [ "$autoopen" = true ] && open "${f%.*}.pdf"
# done
# FILES=$(ls psi*xy.dat | sort -n -t _ -k 2)
# # FILES=psi*xy.dat
# for f in $FILES
# do
# echo "Processing $f file..."
# gnuplot -e "filename='$f'" -e "xaxis=\"x [au]\"" -e "yaxis=\"y [au]\"" "${REL}plots/wf2d.gnu"
# [ "$autoopen" = true ] && open "${f%.*}.pdf"
# done
# #JOIN
# gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -sOutputFile=psi_xy_merged.pdf psi*xy.pdf
# [ "$autoopenmerged" = true ] && open psi_xy_merged.pdf
#HHG'S
# FILES=hhg*.dat
# for f in $FILES
# do
# echo "Processing $f file..."
# gnuplot -e "filename='$f'" "${REL}plots/hhg.gnu"
# [ "$autoopen" = true ] && open "${f%.*}.pdf"
# done
# Fields
# FILES=exf*.dat
# for f in $FILES
# do
# echo "Processing $f file..."
# gnuplot -e "filename='$f'" "${REL}plots/exf.gnu"
# [ "$autoopen" = true ] && open "${f%.*}.pdf"
# done