Skip to content

Commit

Permalink
merge master->implicit-radiation
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljprice committed Jan 30, 2023
2 parents cbed92c + 68efa59 commit 3a5c616
Show file tree
Hide file tree
Showing 405 changed files with 10,256 additions and 3,160 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
name: bench

on:
push:
branches: [ master ]
paths-ignore:
- 'docs/**'
- 'README.md'
pull_request:
branches: [ master ]
paths-ignore:
- 'docs/**'
- 'README.md'
schedule:
- cron: "0 0 * * *"
push:
branches: [ master ]
paths-ignore:
- 'docs/**'
- 'README.md'
pull_request:
branches: [ master ]
paths-ignore:
- 'docs/**'
- 'README.md'

env:
OMP_STACKSIZE: 512M
Expand Down
46 changes: 23 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
paths-ignore:
- 'docs/**'
- 'README.md'
schedule:
- cron: "0 0 * * *"
# schedule:
# - cron: "0 0 * * *"

env:
OMP_STACKSIZE: 512M
Expand Down Expand Up @@ -115,11 +115,11 @@ jobs:
if: github.event_name == 'schedule'
run: mkdir logs

- name: "Grab previous build logs from web server"
if: github.event_name == 'schedule'
env:
WGET: wget --recursive --no-parent --reject "index.html*" --cut-dirs=2 --no-host-directories
run: ${WGET} -A '*${{ matrix.system[1] }}.txt' http://${WEB_SERVER}${BUILD_LOG_DIR}/ || true
# - name: "Grab previous build logs from web server"
# if: github.event_name == 'schedule'
# env:
# WGET: wget --recursive --no-parent --reject "index.html*" --cut-dirs=2 --no-host-directories
# run: ${WGET} -A '*${{ matrix.system[1] }}.txt' http://${WEB_SERVER}${BUILD_LOG_DIR}/ || true

- name: "Run buildbot.sh"
run: ./buildbot.sh --maxdim 17000000 --url http://${WEB_SERVER}/${BUILD_LOG_DIR} --parallel ${{ matrix.batch }} ${{ env.NPARALLEL }}
Expand All @@ -128,22 +128,22 @@ jobs:
SYSTEM: ${{ matrix.system }}
RETURN_ERR: yes

- name: "Install SSH Key"
if: github.event_name == 'schedule'
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.RUNNER_PRIVATE_KEY }}

- name: "Copy new build logs to web server"
if: ${{ (success() || failure()) && github.event_name == 'schedule' }}
run: rsync -vau logs/*.txt ${WEB_USER}@${WEB_SERVER}:${WEB_HTML_DIR}/${BUILD_LOG_DIR}

- name: "Copy HTML files to web server"
if: ${{ (success() || failure()) && github.event_name == 'schedule' }}
run: |
export WEB_BUILD_DIR=${WEB_HTML_DIR}/nightly/build/$(date "+%Y%m%d")
ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null" ${WEB_USER}@${WEB_SERVER} -- mkdir -p ${WEB_BUILD_DIR}
rsync -vau logs/*.html ${WEB_USER}@${WEB_SERVER}:${WEB_BUILD_DIR}/
# - name: "Install SSH Key"
# if: github.event_name == 'schedule'
# uses: webfactory/[email protected]
# with:
# ssh-private-key: ${{ secrets.RUNNER_PRIVATE_KEY }}

# - name: "Copy new build logs to web server"
# if: ${{ (success() || failure()) && github.event_name == 'schedule' }}
# run: rsync -vau logs/*.txt ${WEB_USER}@${WEB_SERVER}:${WEB_HTML_DIR}/${BUILD_LOG_DIR}

# - name: "Copy HTML files to web server"
# if: ${{ (success() || failure()) && github.event_name == 'schedule' }}
# run: |
# export WEB_BUILD_DIR=${WEB_HTML_DIR}/nightly/build/$(date "+%Y%m%d")
# ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null" ${WEB_USER}@${WEB_SERVER} -- mkdir -p ${WEB_BUILD_DIR}
# rsync -vau logs/*.html ${WEB_USER}@${WEB_SERVER}:${WEB_BUILD_DIR}/

- name: logs/build-failures-${{ matrix.system }}.txt
if: always()
Expand Down
4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
repos:
- repo: local
hooks:
- id: bots
name: Run bots
entry: scripts/bots.sh --apply --file
entry: scripts/bots.sh --apply --files
language: script
require_serial: true
40 changes: 23 additions & 17 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -9,51 +9,57 @@ Daniel Price <[email protected]>
David Liptai <[email protected]>
Conrad Chan <[email protected]>
James Wurster <[email protected]>
Mike Lau <[email protected]>
Lionel Siess <[email protected]>
Mike Lau <[email protected]>
Daniel Mentiplay <[email protected]>
Arnaud Vericel <[email protected]>
Mark Hutchison <[email protected]>
Terrence Tricco <[email protected]>
Fitz Hu <[email protected]>
Rebecca Nealon <[email protected]>
Christophe Pinte <[email protected]>
Ward Homan <[email protected]>
Elisabeth Borchert <[email protected]>
Fitz Hu <[email protected]>
Fangyi (Fitz) Hu <[email protected]>
Sergei Biriukov <[email protected]>
Mats Esseldeurs <[email protected]>
Enrico Ragusa <[email protected]>
Giovanni Dipierro <[email protected]>
Hauke Worpel <[email protected]>
Roberto Iaconi <[email protected]>
Thomas Reichardt <[email protected].edu.au>
Caitlyn Hardiman <caitlyn.hardiman1@monash.edu>
Simon Glover <[email protected]>
Jean-François Gonzalez <[email protected]>
Thomas Reichardt <[email protected]>
MatsEsseldeurs <[email protected]>
Martina Toscani <[email protected]>
Jean-François Gonzalez <[email protected]>
Simone Ceppi <[email protected]>
Benedetta Veronesi <[email protected]>
Christopher Russell <[email protected]>
Alessia Franchini <[email protected]>
Alex Pettitt <[email protected]>
Caitlyn Hardiman <[email protected]>
Megha Sharma <[email protected]>
Stephen Neilson <[email protected]>
Alex Pettitt <[email protected]>
Alessia Franchini <[email protected]>
fitzHu <[email protected]>
Kieran Hirsh <[email protected]>
Nicole Rodrigues <[email protected]>
fitzHu <[email protected]>
Phantom benchmark bot <[email protected]>
Jolien128 <[email protected]>
Chris Nixon <[email protected]>
Nicolas Cuello <[email protected]>
Phantom benchmark bot <[email protected]>
Benoit Commercon <[email protected]>
David Trevascus <[email protected]>
Cristiano Longarini <[email protected]>
Joe Fisher <[email protected]>
Orsola De Marco <[email protected]>
Giulia Ballabio <[email protected]>
Cristiano Longarini <[email protected]>
Benoit Commercon <benoit.commercon@gmail.com>
Orsola De Marco <[email protected]>
caitlynhardiman <[email protected].com>
Zachary Pellow <[email protected]>
Steven Rieder <[email protected]>
Stéven Toupin <[email protected]>
James <[email protected]>
Maxime Lombart <[email protected]>
Jorge Cuadra <[email protected]>
s-neilson <[email protected]>
Alison Young <[email protected]>
Cox, Samuel <[email protected]>
James <[email protected]>
Jorge Cuadra <[email protected]>
Maxime Lombart <[email protected]>
Steven Rieder <[email protected]>
Stéven Toupin <[email protected]>
87 changes: 70 additions & 17 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ SHELL = /bin/bash
VPATH = "${RUNDIR}" ../src/main ../src/utils ../src/setup ../src/tests ../src/lib/NICIL/src
BINDIR= ../bin
UNAME=${shell uname}
UNAMEP=${shell uname -p}
#----------------------------------------------------------------
# Sensible defaults for phantom configuration
#----------------------------------------------------------------
Expand Down Expand Up @@ -117,13 +118,33 @@ ifeq ($(MCFOST), yes)
ISOTHERMAL=no
MCFOST=yes

MCFOST_LIBS = $(MCFOST_INSTALL)/lib/$(FC)
MCFOST_INCLUDE = $(MCFOST_INSTALL)/include
#--if PREFIX is set (e.g. to /usr/local) set all the flags needed for mcfost
ifneq ("X$(PREFIX)", "X")
MCFOST_LIBS = $(PREFIX)/lib
MCFOST_LIB = $(PREFIX)/lib
MCFOST_INCLUDE = $(PREFIX)/include
ifeq ("X$(HDF5ROOT)","X")
HDF5ROOT=$(PREFIX)
endif
else
#--otherwise assume the source code is lying around somewhere
MCFOST_LIBS = $(MCFOST_INSTALL)/lib/$(FC)
MCFOST_INCLUDE = $(MCFOST_INSTALL)/include
ifeq ("X$(MCFOST_LIB)","X")
MCFOST_LIB = $(MCFOST_DIR)/src
endif
endif
ifeq ($(MCFOST_XGBOOST), yes)
LXGBOOST= -lxgboost -ldmlc -lrabit
else
LXGBOOST=""
endif

FPPFLAGS+= -DMCFOST
LDFLAGS+= -I$(MCFOST_INCLUDE) -I$(MCFOST_INCLUDE)/voro++ -I$(MCFOST_INCLUDE)/hdf5 -I$(MCFOST_INCLUDE)/$(FC) \
-L$(MCFOST_DIR)/src -lmcfost -L$(MCFOST_LIBS) $(LIBCXX) -lcfitsio -lvoro++ -lsprng \
-L$(HDF5ROOT)/lib/Intel -lhdf5_fortran -L$(HDF5ROOT)/lib -lhdf5 -lz -lxgboost -ldmlc -lrabit -lhdf5_fortran -lhdf5 -lz
-L$(MCFOST_LIB) -lmcfost -L$(MCFOST_LIBS) $(LIBCXX) -lcfitsio -lvoro++ -lsprng \
-L$(HDF5ROOT) -lhdf5_fortran -lhdf5 -lz #$(LXGBOOST)
#-L$(HDF5ROOT)/lib/Intel -lhdf5_fortran
endif

include Makefile_systems
Expand Down Expand Up @@ -260,6 +281,14 @@ ifeq ($(RADIATION), yes)
FPPFLAGS += -DRADIATION
endif

ifeq ($(DUST_NUCLEATION), yes)
FPPFLAGS += -DDUST_NUCLEATION
endif

ifeq ($(SINK_RADIATION), yes)
FPPFLAGS += -DSINK_RADIATION
endif

ifdef SRCTURB
FPPFLAGS += -DDRIVING
endif
Expand Down Expand Up @@ -372,7 +401,11 @@ ifeq ($(MPI), cray)
endif

ifeq ($(USEMPI), yes)
RUNMPI=$(MPIEXEC)
ifeq (X$(MPIEXEC), X)
RUNMPI=mpirun -np 2
else
RUNMPI=$(MPIEXEC)
endif
FPPFLAGS += -DMPI
else
RUNMPI=
Expand Down Expand Up @@ -467,14 +500,21 @@ else
endif
SRCGR=inverse4x4.f90 $(SRCMETRIC) metric_tools.f90 utils_gr.f90
#
# chemistry
# chemistry and cooling
#
SRCCHEM= fs_data.f90 mol_data.f90 utils_spline.f90 h2cooling.f90 cooling_molecular.f90 h2chem.f90 cooling.F90
SRCCHEM= fs_data.f90 mol_data.f90 utils_spline.f90 \
cooling_gammie.f90 \
cooling_koyamainutsuka.f90 \
cooling_ism.f90 \
cooling_molecular.f90 \
cooling_functions.f90 \
cooling_solver.f90 \
h2chem.f90 cooling.F90
#
# equations of state
#
SRCMESA= eos_mesa_microphysics.f90 eos_mesa.f90
SRCEOS = eos_barotropic.f90 eos_piecewise.f90 ${SRCMESA} eos_shen.f90 eos_helmholtz.f90 eos_idealplusrad.f90 ionization.F90 eos_gasradrec.f90 eos.F90
SRCEOS = eos_barotropic.f90 eos_stratified.f90 eos_piecewise.f90 ${SRCMESA} eos_shen.f90 eos_helmholtz.f90 eos_idealplusrad.f90 ionization.F90 eos_gasradrec.f90 eos.F90

ifeq ($(HDF5), yes)
SRCREADWRITE_DUMPS= utils_hdf5.f90 utils_dumpfiles_hdf5.f90 readwrite_dumps_common.F90 readwrite_dumps_fortran.F90 readwrite_dumps_hdf5.F90 readwrite_dumps.F90
Expand All @@ -496,13 +536,13 @@ SOURCES= physcon.f90 ${CONFIG} ${SRCKERNEL} io.F90 units.f90 boundary.f90 \
utils_sort.f90 utils_supertimestep.F90 utils_tables.f90 utils_gravwave.f90 \
utils_sphNG.f90 utils_vectors.f90 utils_datafiles.f90 datafiles.f90 \
gitinfo.f90 ${SRCFASTMATH} random.f90 ${SRCEOS} cullendehnen.f90 ${SRCNIMHD} ${SRCGR} \
checkoptions.F90 viscosity.f90 options.f90 cons2primsolver.f90 radiation_utils.f90 cons2prim.f90 \
checkoptions.F90 viscosity.f90 options.f90 cons2primsolver.f90 radiation_utils.f90 cons2prim.f90 \
centreofmass.f90 ${SRCPOT} damping.f90 checkconserved.f90 \
partinject.F90 utils_inject.f90 utils_filenames.f90 utils_summary.F90 ${SRCCHEM}\
${SRCDUST} dust_formation.F90 ptmass_radiation.F90 ptmass_heating.F90 \
utils_filenames.f90 utils_summary.F90 ${SRCCHEM} ${SRCDUST} \
partinject.F90 utils_inject.f90 dust_formation.F90 ptmass_radiation.F90 ptmass_heating.F90 \
mpi_dens.F90 mpi_force.F90 mpi_memory.F90 mpi_derivs.F90 kdtree.F90 linklist_kdtree.F90 \
radiation_implicit.f90 ${SRCTURB} \
${SRCPHOTO} ${SRCINJECT} ${SRCKROME} memory.F90 ${SRCREADWRITE_DUMPS} \
radiation_implicit.f90 ${SRCTURB} \
${SRCPHOTO} ${SRCINJECT} utils_healpix.f90 utils_raytracer.f90 ${SRCKROME} memory.F90 ${SRCREADWRITE_DUMPS} \
quitdump.f90 ptmass.F90 \
readwrite_infile.F90 dens.F90 force.F90 utils_deriv.f90 deriv.F90 energies.F90 sort_particles.F90 \
utils_shuffleparticles.F90 evwrite.F90 step_leapfrog.F90 writeheader.F90 ${SRCAN} step_supertimestep.F90 \
Expand Down Expand Up @@ -579,7 +619,7 @@ SRCDUMP= physcon.f90 ${CONFIG} ${SRCKERNEL} io.F90 units.f90 boundary.f90 mpi_ut
utils_dumpfiles.f90 utils_vectors.f90 utils_mathfunc.f90 \
utils_datafiles.f90 utils_filenames.f90 utils_system.f90 utils_tables.f90 datafiles.f90 gitinfo.f90 \
centreofmass.f90 \
timestep.f90 ${SRCEOS} cullendehnen.f90 \
timestep.f90 ${SRCEOS} cullendehnen.f90 dust_formation.F90 \
${SRCGR} ${SRCPOT} ${SRCPHOTO} \
memory.F90 \
utils_sphNG.f90 \
Expand Down Expand Up @@ -640,14 +680,21 @@ cleansetup:
#----------------------------------------------------
# phantom test suite
#
ifeq ($(MPI),yes)
SRCTESTMPI = test_mpi.F90
else
SRCTESTMPI =
endif

SRCTESTS=utils_testsuite.f90 ${TEST_FASTMATH} test_kernel.f90 \
test_dust.F90 test_growth.F90 test_smol.F90 \
test_nonidealmhd.F90 directsum.f90 test_gravity.F90 \
test_derivs.F90 test_cooling.f90 test_eos.f90 test_externf.f90 test_rwdump.f90 \
test_derivs.F90 test_cooling.f90 test_eos_stratified.f90 \
test_eos.f90 test_externf.f90 test_rwdump.f90 \
test_step.F90 test_indtstep.F90 set_disc.F90 test_setdisc.F90 \
test_link.F90 test_kdtree.F90 test_part.f90 test_ptmass.f90 test_luminosity.F90\
test_gnewton.f90 test_corotate.f90 test_geometry.f90 \
test_sedov.F90 test_poly.f90 test_radiation.F90 \
${SRCTESTMPI} test_sedov.F90 test_poly.f90 test_radiation.F90 \
testsuite.F90 phantomtest.f90

ifeq (X$(SRCTEST), X)
Expand Down Expand Up @@ -949,7 +996,7 @@ phantom2mcfost: checkmcfost
ANALYSISBIN=$@ ANALYSISONLY=yes LDFLAGS="-L$(MCFOST_DIR)/src -lmcfost $(LIBCXX)"

analysis_mcfost.o: analysis_mcfost.f90
$(FC) -c $(FFLAGS) -I$(MCFOST_DIR)/src $< -o $@
$(FC) -c $(FFLAGS) -I$(MCFOST_INCLUDE) $< -o $@

analysis_mcfost.o: checkmcfost

Expand Down Expand Up @@ -1231,6 +1278,12 @@ testgrowth:
testnimhd:
${MAKE} SETUP=testnimhd phantomtest && $(RUNMPI) $(BINDIR)/phantomtest nimhd

testmpi:
${MAKE} MPI=yes _testmpi

_testmpi:
${MAKE} SETUP=test phantomtest && $(RUNMPI) $(BINDIR)/phantomtest mpi

testall: test test2 testcyl testgrav

include Makefile_fastmath
Expand Down
6 changes: 5 additions & 1 deletion build/Makefile_checks
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ checkmcfost:
ifneq ("X$(MCFOST_DIR)","X")
@echo; echo "MCFOST directory is "$(MCFOST_DIR); echo;
else
@echo; echo "ERROR: cannot find MCFOST directory for linking - set this using MCFOST_DIR"; echo; ${MAKE} err
ifneq ("X$(PREFIX)","X")
@echo; echo "assuming MCFOST directory is "$(PREFIX)" from PREFIX env variable"; echo;
else
@echo; echo "ERROR: cannot find MCFOST directory for linking - set this using MCFOST_DIR"; echo; ${MAKE} err
endif
endif

checksmol:
Expand Down
4 changes: 2 additions & 2 deletions build/Makefile_setups
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ endif
ifeq ($(SETUP), sphereinbox)
# sphere-in-box setup
PERIODIC=yes
SETUPFILE= velfield_fromcubes.f90 setup_sphereinbox.f90
SETUPFILE= velfield_fromcubes.f90 setup_sphereinbox.f90
KNOWN_SETUP=yes
endif

Expand Down Expand Up @@ -748,7 +748,7 @@ endif
ifeq ($(SETUP), wind)
# wind setup with dust nucleation
FPPFLAGS= -DWIND -DSINK_RADIATION -DDUST_NUCLEATION
ANALYSIS= analysis_dustywind.F90 dust_formation.F90
ANALYSIS= analysis_cooling.F90
WIND=yes
endif

Expand Down
Loading

0 comments on commit 3a5c616

Please sign in to comment.