Skip to content

Commit

Permalink
Merge pull request #485 from danieljprice/test-suite-issues
Browse files Browse the repository at this point in the history
fix slow test suite issue #484 + minor cleanups
  • Loading branch information
danieljprice authored Nov 27, 2023
2 parents 0b2f16d + 8c0857f commit 93286dc
Show file tree
Hide file tree
Showing 31 changed files with 591 additions and 1,211 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/mpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- yes
ntasks:
- 1
- 4
- 2
input: # [SETUP, phantom_tests]
- ['test', '']
- ['testkd', '']
Expand All @@ -43,7 +43,7 @@ jobs:

env:
OMP_STACKSIZE: 512M
OMP_NUM_THREADS: 4
OMP_NUM_THREADS: 2

steps:

Expand Down
26 changes: 19 additions & 7 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ Rebecca Nealon <[email protected]> Nealon <[email protected]
Alex Pettitt <[email protected]> Alex <[email protected]>
Alex Pettitt <[email protected]> <[email protected]>
Alex Pettitt <[email protected]> <[email protected]>
Terrence Tricco <[email protected]>
<[email protected]> <[email protected]>
<[email protected]> <tricco@solo.(none)>
<[email protected]> <tricco@rin.(none)>
<[email protected]> <[email protected]>
<[email protected]> <[email protected]>
<[email protected]> <[email protected]>
<[email protected]> <[email protected]>
<[email protected]> <tricco@solo.(none)>
<[email protected]> <tricco@rin.(none)>
<[email protected]> <[email protected]>
<[email protected]> <[email protected]>
Terrence Tricco <[email protected]> <[email protected]>
James Wurster <[email protected]> James Wurster <[email protected]>
James Wurster <[email protected]> jameswurster <[email protected]>
James Wurster <[email protected]> jameswurster <[email protected]>
Expand All @@ -46,12 +47,12 @@ Stéven Toupin <[email protected]> stoupin <devnull@localhost>
Guillaume Laibe <[email protected]> glaibe <[email protected]>
Guillaume Laibe <[email protected]> glaibe <[email protected]>
Alice Cerioli <[email protected]> ALICE CERIOLI <[email protected]>
Alice Cerioli <[email protected]> <[email protected]>
Thomas Reichardt <[email protected]>
Thomas Reichardt <[email protected]> Thomas Reichardt <[email protected]>
Thomas Reichardt <[email protected]> Mr Thomas Reichardt <[email protected]>
Roberto Iaconi <[email protected]> Roberto Iaconi <rxi552@raijin6.(none)>
Roberto Iaconi <[email protected]> Roberto Iaconi <[email protected]>
Alice Cerioli <[email protected]> <[email protected]>
Daniel Mentiplay <[email protected]> <[email protected]>
Daniel Mentiplay <[email protected]> <[email protected]>
Daniel Mentiplay <[email protected]> <[email protected]>
Expand Down Expand Up @@ -85,8 +86,13 @@ Fangyi (Fitz) Hu <[email protected]> Fitz-Hu <[email protected]
Fangyi (Fitz) Hu <[email protected]> root <root@Heartie的小电脑.localdomain>
Fangyi (Fitz) Hu <[email protected]> root <root@Heartie的小电脑.localdomain>
Fangyi (Fitz) Hu <[email protected]> fitzHu <[email protected]>
Fangyi (Fitz) Hu <[email protected]> Fitz Hu <[email protected]>
Fangyi (Fitz) Hu <[email protected]> fhu <[email protected]>
Megha Sharma <[email protected]> Megha Sharma <[email protected]>
Megha Sharma <[email protected]> megha sharma <[email protected]>
Megha Sharma <[email protected]> Megha Sharma <[email protected]>
Megha Sharma <[email protected]> Megha Sharma <[email protected]>
Megha Sharma <[email protected]> Megha Sharma <[email protected]>
Mike Lau <[email protected]> Mike Lau <[email protected]>
Elisabeth Borchert <[email protected]> emborchert <[email protected]>
Ward Homan <[email protected]> ward <[email protected]>
Expand All @@ -103,3 +109,9 @@ Sahl Rowther <[email protected]> <[email protected]>
Sahl Rowther <[email protected]> sahl95 <[email protected]>
Caitlyn Hardiman <[email protected]> caitlynhardiman <[email protected]>
Amena Faruqi <[email protected]> <[email protected]>
Amena Faruqi <[email protected]> Amena Faruqi <[email protected]>
Alison Young <[email protected]> Alison Young <[email protected]>
Simone Ceppi <[email protected]> Simone Ceppi <[email protected]>
Mats Esseldeurs <[email protected]> mats esseldeurs <[email protected]>
Mats Esseldeurs <[email protected]> MatsEsseldeurs <[email protected]>
Nicolás Cuello <[email protected]> Nicolas Cuello <[email protected]>
48 changes: 18 additions & 30 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -11,68 +11,56 @@ Conrad Chan <[email protected]>
James Wurster <[email protected]>
David Liptai <[email protected]>
Lionel Siess <[email protected]>
Fangyi (Fitz) Hu <[email protected]>
Daniel Mentiplay <[email protected]>
Megha Sharma <[email protected]>
Arnaud Vericel <[email protected]>
Mark Hutchison <[email protected]>
Fitz Hu <[email protected]>
Megha Sharma <[email protected]>
Mats Esseldeurs <[email protected]>
Rebecca Nealon <[email protected]>
Elisabeth Borchert <[email protected]>
Ward Homan <[email protected]>
Christophe Pinte <[email protected]>
Fangyi (Fitz) Hu <[email protected]>
Megha Sharma <[email protected]>
Terrence Tricco <[email protected]>
Mats Esseldeurs <[email protected]>
Terrence Tricco <[email protected]>
Simone Ceppi <[email protected]>
Stephane Michoulier <[email protected]>
Simone Ceppi <[email protected]>
MatsEsseldeurs <[email protected]>
Spencer Magnall <[email protected]>
Caitlyn Hardiman <[email protected]>
Enrico Ragusa <[email protected]>
Spencer Magnall <[email protected]>
fhu <[email protected]>
Sergei Biriukov <[email protected]>
Cristiano Longarini <[email protected]>
Giovanni Dipierro <[email protected]>
Roberto Iaconi <[email protected]>
Hauke Worpel <[email protected]>
Amena Faruqi <[email protected]>
Alison Young <[email protected]>
Simone Ceppi <[email protected]>
Amena Faruqi <[email protected]>
Stephen Neilson <[email protected]>
Martina Toscani <[email protected]>
Benedetta Veronesi <[email protected]>
Sahl Rowther <[email protected]>
Simon Glover <[email protected]>
Thomas Reichardt <[email protected]>
Simon Glover <[email protected]>
Jean-François Gonzalez <[email protected]>
Christopher Russell <[email protected]>
Phantom benchmark bot <[email protected]>
Jolien Malfait <[email protected]>
Alessia Franchini <[email protected]>
Alex Pettitt <[email protected]>
Jolien Malfait <[email protected]>
Phantom benchmark bot <[email protected]>
Kieran Hirsh <[email protected]>
Nicole Rodrigues <[email protected]>
Amena Faruqi <[email protected]>
David Trevascus <[email protected]>
Kieran Hirsh <[email protected]>
Nicolás Cuello <[email protected]>
Farzana Meru <[email protected]>
David Trevascus <[email protected]>
Chris Nixon <[email protected]>
Megha Sharma <[email protected]>
Nicolas Cuello <[email protected]>
Benoit Commercon <[email protected]>
Giulia Ballabio <[email protected]>
Joe Fisher <[email protected]>
Miguel Gonzalez-Bolivar <[email protected]>
Maxime Lombart <[email protected]>
Megha Sharma <[email protected]>
Benoit Commercon <[email protected]>
Orsola De Marco <[email protected]>
Terrence Tricco <[email protected]>
Zachary Pellow <[email protected]>
Joe Fisher <[email protected]>
s-neilson <[email protected]>
Alison Young <[email protected]>
Zachary Pellow <[email protected]>
Cox, Samuel <[email protected]>
Jorge Cuadra <[email protected]>
Miguel Gonzalez-Bolivar <[email protected]>
Nicolás Cuello <[email protected]>
Steven Rieder <[email protected]>
Stéven Toupin <[email protected]>
mats esseldeurs <[email protected]>
Jorge Cuadra <[email protected]>
2 changes: 1 addition & 1 deletion build/Makefile_defaults_gfortran
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# endif
#
FC= gfortran
FFLAGS+= -O3 -Wall -Wno-unused-dummy-argument -frecord-marker=4 -gdwarf-2 \
FFLAGS+= -O3 -Wall -Wno-unused-dummy-argument -frecord-marker=4 -g \
-finline-functions-called-once -finline-limit=1500 -funroll-loops -ftree-vectorize \
-std=f2008 -fall-intrinsics
DBLFLAG= -fdefault-real-8 -fdefault-double-8
Expand Down
2 changes: 1 addition & 1 deletion src/main/config.F90
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ module dim
logical, parameter :: nr = .true.
#else
logical, parameter :: nr = .false.
#endif
#endif

!--------------------
! Supertimestepping
Expand Down
15 changes: 7 additions & 8 deletions src/main/extern_gr.F90
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ module extern_gr
!
! :Runtime parameters: None
!
! :Dependencies: eos, fastmath, io, metric_tools, part, physcon, timestep,
! utils_gr
! :Dependencies: eos, io, metric_tools, part, physcon, timestep, utils_gr
!
implicit none

Expand Down Expand Up @@ -87,22 +86,22 @@ subroutine dt_grforce(xyzh,fext,dtf)
real, intent(out) :: dtf
real :: r,r2,dtf1,dtf2,f2i
integer, parameter :: steps_per_orbit = 100

f2i = fext(1)*fext(1) + fext(2)*fext(2) + fext(3)*fext(3)
if (f2i > 0.) then
dtf1 = sqrt(xyzh(4)/sqrt(f2i)) ! This is not really accurate since fi is a component of dp/dt, not da/dt
if (f2i > 0.) then
dtf1 = sqrt(xyzh(4)/sqrt(f2i)) ! This is not really accurate since fi is a component of dp/dt, not da/dt
else
dtf1 = huge(dtf1)
dtf1 = huge(dtf1)
endif

select case (imetric)
case (imet_schwarzschild,imet_kerr)
r2 = xyzh(1)*xyzh(1) + xyzh(2)*xyzh(2) + xyzh(3)*xyzh(3)
r = sqrt(r2)
dtf2 = (2.*pi*sqrt(r*r2))/steps_per_orbit
case default
case default
dtf2 = huge(dtf2)
end select
end select

dtf = min(dtf1,dtf2)

Expand Down
15 changes: 8 additions & 7 deletions src/main/initial.F90
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ module initial
!
! :Dependencies: analysis, boundary, boundary_dyn, centreofmass,
! checkconserved, checkoptions, checksetup, cons2prim, cooling, cpuinfo,
! damping, densityforce, deriv, dim, dust, dust_formation, energies, eos,
! evwrite, extern_gr, externalforces, fastmath, fileutils, forcing,
! growth, inject, io, io_summary, krome_interface, linklist,
! metric_tools, mf_write, mpibalance, mpidomain, mpimemory, mpitree,
! mpiutils, nicil, nicil_sup, omputils, options, part, partinject,
! ptmass, radiation_utils, readwrite_dumps, readwrite_infile, timestep,
! timestep_ind, timestep_sts, timing, units, writeheader
! damping, densityforce, deriv, dim, dust, dust_formation,
! einsteintk_utils, energies, eos, evwrite, extern_gr, externalforces,
! fastmath, fileutils, forcing, growth, inject, io, io_summary,
! krome_interface, linklist, metric_tools, mf_write, mpibalance,
! mpidomain, mpimemory, mpitree, mpiutils, nicil, nicil_sup, omputils,
! options, part, partinject, ptmass, radiation_utils, readwrite_dumps,
! readwrite_infile, timestep, timestep_ind, timestep_sts, timing,
! tmunu2grid, units, writeheader
!

implicit none
Expand Down
23 changes: 14 additions & 9 deletions src/main/inject_windtunnel.f90
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@ module inject
! Handles injection for gas sphere in wind tunnel
!
!
! :References: None
!
! :Owner: Mike Lau
!
! :Runtime parameters:
! - lattice_type : *0: cubic distribution, 1: closepacked distribution*
! - handled_layers : *(integer) number of handled BHL wind layers*
! - v_inf : *BHL wind speed*
! - Rstar : *BHL star radius (in accretion radii)*
! - BHL_radius : *radius of the wind cylinder (in star radii)*
! - Rstar : *sphere radius (code units)*
! - handled_layers : *(integer) number of handled BHL wind layers*
! - lattice_type : *0: cubic distribution, 1: closepacked distribution*
! - nstar : *No. of particles making up sphere*
! - pres_inf : *ambient pressure (code units)*
! - rho_inf : *ambient density (code units)*
! - v_inf : *wind speed (code units)*
! - wind_injection_x : *x position of the wind injection boundary (in star radii)*
! - wind_length : *crude wind length (in star radii)*
!
Expand Down Expand Up @@ -84,7 +89,7 @@ subroutine init_inject(ierr)
if (lattice_type == 1) then
psep = (sqrt(2.)*element_volume)**(1./3.)
elseif (lattice_type == 0) then
psep = element_volume**(1./3.)
psep = element_volume**(1./3.)
else
call fatal("init_inject",'unknown lattice_type (must be 0 or 1)')
endif
Expand Down Expand Up @@ -263,16 +268,16 @@ subroutine print_summary(v_inf,cs_inf,rho_inf,pres_inf,mach,pmass,distance_betwe
integer, intent(in) :: max_layers,nstar,max_particles

print*, 'wind speed: ',v_inf * unit_velocity / 1e5," km s^-1"
print*, 'wind cs: ',cs_inf * unit_velocity / 1e5," km s^-1"
print*, 'wind density: ',rho_inf * unit_density," g cm^-3"
print*, 'wind pressure: ',pres_inf * unit_pressure," dyn cm^-2"
print*, 'wind cs: ',cs_inf * unit_velocity / 1e5," km s^-1"
print*, 'wind density: ',rho_inf * unit_density," g cm^-3"
print*, 'wind pressure: ',pres_inf * unit_pressure," dyn cm^-2"
print*, 'wind mach number: ', mach

print*, 'maximum wind layers: ', max_layers
print*, 'pmass: ',pmass
print*, 'nstar: ',nstar
print*, 'nstar + max. wind particles: ', max_particles
print*, 'distance_between_layers: ',distance_between_layers
print*, 'distance_between_layers: ',distance_between_layers
print*, 'time_between_layers: ',time_between_layers

print*, 'planet crossing time: ',2*Rstar/v_inf
Expand Down
2 changes: 1 addition & 1 deletion src/main/interp_metric.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. !
! Copyright (c) 2007-2023 The Authors (see AUTHORS) !
! See LICENCE file for usage and distribution conditions !
! http://phantomsph.bitbucket.io/ !
! http://phantomsph.github.io/ !
!--------------------------------------------------------------------------!
module metric_interp
!
Expand Down
4 changes: 2 additions & 2 deletions src/main/metric_et.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. !
! Copyright (c) 2007-2023 The Authors (see AUTHORS) !
! See LICENCE file for usage and distribution conditions !
! http://phantomsph.bitbucket.io/ !
! http://phantomsph.github.io/ !
!--------------------------------------------------------------------------!
module metric
!
Expand All @@ -20,7 +20,7 @@ module metric
character(len=*), parameter :: metric_type = 'et'
integer, parameter :: imetric = 6
! This are dummy parameters to stop the compiler complaing
! Not used anywhere in the code - Needs a fix!
! Not used anywhere in the code - Needs a fix!
real, public :: mass1 = 1. ! mass of central object
real, public :: a = 0.0 ! spin of central object
contains
Expand Down
2 changes: 1 addition & 1 deletion src/main/metric_flrw.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. !
! Copyright (c) 2007-2023 The Authors (see AUTHORS) !
! See LICENCE file for usage and distribution conditions !
! http://phantomsph.bitbucket.io/ !
! http://phantomsph.github.io/ !
!--------------------------------------------------------------------------!
module metric
!
Expand Down
Loading

0 comments on commit 93286dc

Please sign in to comment.