Skip to content

Commit

Permalink
Merge branch 'b1' of https://github.com/KylieGong/agui into b1
Browse files Browse the repository at this point in the history
  • Loading branch information
KylieGong committed Sep 6, 2023
2 parents ec2390c + d5ff753 commit 3dab824
Show file tree
Hide file tree
Showing 34 changed files with 6,035 additions and 352 deletions.
157 changes: 111 additions & 46 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# See the INSTALL.md notes on how to use this Makefile
# See the README.md notes on how to use this Makefile

#
SHELL = /bin/bash
Expand All @@ -15,13 +15,17 @@ 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
URL2 = https://gitlab.com/theias/hpc/jmstone/athena-parthenon/athena-mini-k
URL2 = https://github.com/teuben/Athena-miniK
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
URL6 = https://github.com/teuben/pyThena

# the ATHENA executable (from athena or athenak)
# ATHENA = athena/bin/athena
Expand Down Expand Up @@ -60,84 +64,100 @@ branch:
-@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)
git clone --recursive $(URL2) athenak

nemo:
git clone $(URL3)

python: nemo anaconda3

anaconda3:
nemo/src/scripts/install_anaconda3

tkrun:
git clone $(URL4)

## build: build athenak
build: athenak
(mkdir -p athenak/build; cd athenak/build; cmake ..; make -j 4)
## build_athenak: build athenak
build_athenak: athenak
(mkdir -p athenak/build; cd athenak/build; cmake ..; make -j 8)

# See also: https://kokkos.github.io/kokkos-core-wiki/keywords.html#keywords-arch
B_ARM = -D CMAKE_CXX_COMPILER=clang++-mp-15 -D CMAKE_C_COMPILER=clang-mp-15 -D Kokkos_ARCH_ARMV81=On
arm: athenak
(mkdir -p athenak/build; cd athenak/build; cmake $(B_ARM) ..; make -j 8)

#PJT = -D CMAKE_CXX_COMPILER=clang++ -D CMAKE_C_COMPILER=clang -D Kokkos_ARCH_INTEL_DG1=On
#PJT = -D Kokkos_ARCH_INTEL_DG1=On
PJT = -D Kokkos_ENABLE_OPENMP=On
#PJT = -D Athena_ENABLE_MPI=ON
pjt: athenak
(mkdir -p athenak/build; cd athenak/build; cmake $(PJT) ..; make -j 8)

## build_athena build athena++ for the linear_wave problem
## build_athena build athena++ for the linear_wave problem
build_athena: athena
(cd athena; ./configure.py --prob linear_wave; make clean; make -j)

## build_nemo: build nemo
build_nemo: nemo
(cd nemo; ./configure ; make build check bench5)
## 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: example 1D linear_wave_hydro (athenak) [ < 1sec 1069 cycles]
run1:
$(ATHENA) -i athenak/inputs/tests/linear_wave_hydro.athinput -d run1
$(TIME) $(ATHENA) -i linear_wave_hydro.athinput -d run1
@echo ./animate1 base=run1/tab/LinWave xcol=x1v ycol=velx
# -> LinWave.hydro_w.00000.tab

## run1: example advect_hyd
## run2: example 2D orszag_tang (athenak) [ ~109" 1403 cycles]
run2:
$(ATHENA) -i athenak/inputs/tests/advect_hyd.athinput -d run2
$(TIME) $(ATHENA) -i orszag_tang.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
# 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

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
## 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

run7:
$(ATHENA) -i athenak/inputs/hydro/shu_osher.athinput -d run7
# THIS IS A KNOWN ERROR
## 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

run8:
$(ATHENA) -i athenak/inputs/hydro/viscosity.athinput -d run8
# ViscTest.hydro_w.00000.tab
# base=run8/tab/ViscTest xcol=3 ycol=6


ran1: athena
(cd athena; bin/athena -i inputs/hydro/athinput.linear_wave1d -d ran1)
@echo Results in athena/ran1

ran2: athena
(cd athena; bin/athena -i inputs/hydro/athinput.linear_wave1d -d ran2 output2/file_type=tab)
@echo Results in athena/ran2
##

test0:
./z1.sh

## test1: old tkrun via arun1
test1:
./arun1.py athinput.linear_wave1d > test1.sh
tkrun test1.sh
Expand All @@ -153,7 +173,8 @@ test3:
test4:
python pysimplegui.py

#bash format

## test5: native pyqt, tkrun style
test5:
python pyqt.py testfile.sh

Expand All @@ -169,6 +190,43 @@ test7:
test8:
python pyqt.py testfile4.csh

## 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:
./pythena.py

athena_problems.json:
./write_problems.py

# collaborations
agui_t:
git clone $(URL5a) agui_t
Expand All @@ -178,3 +236,10 @@ agui_a:

agui_k:
git clone $(URL5c) agui_k

# testing a pyThena from scratch:

pythena:
rm -rf pyThena
git clone $(URL6)
(cd pyThena; make build_athenak; make run1; make test1)
Loading

0 comments on commit 3dab824

Please sign in to comment.