-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
242 lines (178 loc) · 5.55 KB
/
Makefile
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
# See the README.md notes on how to use this Makefile
#
SHELL = /bin/bash
#
TIME = /usr/bin/time
# use python3 or anaconda3
PYTHON = anaconda3
# git directories we should have here
GIT_DIRS = athena athenak
# URLs that we'll need
URL0 = https://github.com/teuben/Athena-Cversion
URL1 = https://github.com/PrincetonUniversity/athena
URL2 = https://gitlab.com/theias/hpc/jmstone/athena-parthenon/athenak
URL3 = https://github.com/teuben/nemo
URL4 = https://github.com/teuben/tkrun
URL5a = https://github.com/teuben/agui
URL5b = https://github.com/anhhcao/agui
URL5c = https://github.com/KylieGong/agui
# the ATHENA executable (from athena or athenak)
# ATHENA = athena/bin/athena
ATHENA = athenak/build/src/athena
.PHONY: help install build
install: help
@echo "These are some make targets we advertise. See Makefile for details"
help:
## help: This Help
help : Makefile
@sed -n 's/^##//p' $<
## git: Get all git repos for this install
git: $(GIT_DIRS)
@echo Last git: `date` >> git.log
## pull: Update all git repos
pull:
@echo -n "lmtoy: "; git pull
-@for dir in $(GIT_DIRS); do\
(echo -n "$$dir: " ;cd $$dir; git pull); done
@echo Last pull: `date` >> git.log
status:
@echo -n "lmtoy: "; git status -uno
-@for dir in $(GIT_DIRS); do\
(echo -n "$$dir: " ;cd $$dir; git status -uno); done
branch:
@echo -n "lmtoy: "; git branch --show-current
-@for dir in $(GIT_DIRS); do\
(echo -n "$$dir: " ;cd $$dir; git branch --show-current); done
athenac:
git clone $(URL0) -b teuben1 athenac
$(MAKE) build_athenac
athena:
git clone $(URL1)
$(MAKE) build_athena
athenak:
git clone --recursive $(URL2)
nemo:
git clone $(URL3)
python: nemo anaconda3
anaconda3:
nemo/src/scripts/install_anaconda3
tkrun:
git clone $(URL4)
## build_athenak: build athenak
build_athenak: athenak
(mkdir -p athenak/build; cd athenak/build; cmake ..; make -j 8)
B_ARM =
arm: athenak
(mkdir -p athenak/build; cd athenak/build; cmake $(B_ARM) ..; make -j 8)
## build_athena build athena++ for the linear_wave problem
build_athena: athena
(cd athena; ./configure.py --prob linear_wave; make clean; make -j)
## build_athenac build AthenaC for the linear_wave problem
build_athenac: athenac
(cd athenac; autoconf; ./configure; make all)
## build_nemo: build nemo - will also build classic tkrun
build_nemo: nemo
(cd nemo; ./configure ; make build check)
## build_python: build your private anaconda3
build_python: python
# a few sample runs
## run1: example linear_wave_hydro
run1:
$(ATHENA) -i athenak/inputs/tests/linear_wave_hydro.athinput -d run1
@echo ./animate1 base=run1/tab/LinWave xcol=x1v ycol=velx
# -> LinWave.hydro_w.00000.tab
## run2: example advect_hyd
run2:
$(ATHENA) -i athenak/inputs/tests/advect_hyd.athinput -d run2
@echo ./animate1 base=run2/tab/Advect xcol=x1v ycol=dens
# -> Advect.hydro_u.00000.tab
run3:
$(ATHENA) -i athenak/inputs/tests/advect_mhd.athinput -d run3
# -> Advect.mhd_u.00000.tab
run4:
$(ATHENA) -i athenak/inputs/tests/hohlraum_1d.athinput -d run4
# -> hohlraum_1d.rad_coord.00000.tab
run5:
$(ATHENA) -i athenak/inputs/tests/rad_linwave.athinput -d run5
# -> rad_linwave.hydro_w.*.tab
# -> rad_linwave.rad_coord.*.tab
run6:
$(ATHENA) -i athenak/inputs/hydro/sod.athinput -d run6
# -> Sod.hydro_w.00000.tab
# base=run6/tab/Sod xcol=3 ycol=4
# base=run6/tab/Sod xcol=3 ycol=5
# base=run6/tab/Sod xcol=3 ycol=6
run7:
$(ATHENA) -i athenak/inputs/hydro/shu_osher.athinput -d run7
# THIS IS A KNOWN ERROR
run8:
$(ATHENA) -i athenak/inputs/hydro/viscosity.athinput -d run8
# ViscTest.hydro_w.00000.tab
# base=run8/tab/ViscTest xcol=3 ycol=6
# We use past tense for old versions of athena :-)
## ran1 and ran2 are made by ATHENA++
# ran3 by good old AthenaC
## ran1: example athena++ linear_wave1d in vtk format
ran1: athena
athena/bin/athena -i inputs/hydro/athinput.linear_wave1d -d ran1
@echo Results in ran1
## ran2: example athena++ linear_wave1d needed by some tests - will also build athena++
ran2: athena
athena/bin/athena -i inputs/hydro/athinput.linear_wave1d -d ran2 output2/file_type=tab
@echo Results in ran2
## ran3: example AthenaC linear_wave1d needed by some tests - will also build athenac
ran3: athenac
athenac/bin/athena -i athenac/tst/1D-hydro/athinput.linear_wave1d -d ran3
test0:
./z1.sh
## test1: old tkrun via arun1
test1:
./arun1.py athinput.linear_wave1d > test1.sh
tkrun test1.sh
test2:
./arun1.py linear_wave_hydro.athinput > test2.sh
tkrun test2.sh
test3:
pyuic5 -x test3.ui -o test3.py
python test3.py
test4:
python pysimplegui.py
## test5: native pyqt, tkrun style
test5:
python pyqt.py testfile
test6:
python pyqt.py testfile2
## test7: qooey, athena style
test7:
./gooey_run2.py linear_wave_hydro.athinput
# will try Qt first, else fall back to tkinter
test8:
./pysg_run.py athinput.linear_wave1d
test9: ran2
./plot1d.py -d ran2
test10:
./pysg_run.py test.athinput
test11:
./pyqt_run.py test.athinput
# will run the plot when run is clicked
## test12: pyqt native, athena style
test12:
./pyqt_run.py athinput.linear_wave1d
## test13: pysg, athena style
test13: athena_problems.json
./pysg_menu.py
## test14: pyqt, athena style
test14: athena_problems.json
./pyqt_menu.py
## test15: miniki version
test15:
./pyqt_menu_minik.py
athena_problems.json:
./write_problems.py
# collaborations
agui_t:
git clone $(URL5a) agui_t
agui_a:
git clone $(URL5b) agui_a
agui_k:
git clone $(URL5c) agui_k