Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Merge branch 'debug'
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Dec 8, 2021
2 parents 522cfd6 + 56a5b3e commit 995d1f6
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 20 deletions.
18 changes: 13 additions & 5 deletions Makefile.Defines
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,20 @@ SWIFTEST_HOME = $(ROOT_DIR)
USER_MODULES =
COLLRESOLVE_HOME = $(ROOT_DIR)/collresolve/

#NETCDF_FORTRAN_HOME = /home/daminton/local


# Compiler definitions

# DO NOT include in FFLAGS the "-c" option to compile object only
# this is done explicitly as needed in the Makefile
ADVIXE_FLAGS = -g -O2 -qopt-report=5 -vecabi=cmdtarget -simd -shared-intel -debug inline-debug-info -DTBB_DEBUG -DTBB_USE_THREADING_TOOLS -xhost -traceback -parallel-source-info=2
#Be sure to set the environment variable KMP_FORKJOIN_FRAMES=1 for OpenMP debuging in vtune

IDEBUG = -O0 -init=snan,arrays -nogen-interfaces -no-pie -no-ftz -fpe-all=0 -g -traceback -mp1 -qopt-matmul -fp-model strict -fpe0 -debug all -align all -pad -ip -prec-div -prec-sqrt -assume protect-parens -CB -no-wrap-margin
STRICTREAL = -fp-model=precise -prec-div -prec-sqrt -assume protect-parens
SIMDVEC = -simd -xhost -align all -assume contiguous_assumed_shape -vecabi=cmdtarget -fp-model no-except -fma
PAR = -qopenmp -parallel
PAR = -qopenmp -parallel -parallel-source-info=2
HEAPARR = -heap-arrays 4194304
OPTREPORT = -qopt-report=5
IPRODUCTION = -no-wrap-margin -O3 -qopt-prefetch=0 -qopt-matmul -sox $(PAR) $(SIMDVEC) #$(HEAPARR)
Expand All @@ -60,11 +66,13 @@ GMEM = -fsanitize-address-use-after-scope -fstack-check -fsanitize=bounds-stri
GWARNINGS = -Wall -Warray-bounds -Wimplicit-interface -Wextra -Warray-temporaries
GPRODUCTION = -O3 -ffree-line-length-none $(GPAR)

INCLUDES = -I$(SWIFTEST_HOME)/include -I$(NETCDF_FORTRAN_HOME)/include -I$(MKLROOT)/include
LINKS = -L$(MKLROOT)/lib/intel64 -L$(NETCDF_FORTRAN_HOME)/lib -lswiftest -lnetcdf -lnetcdff -qopt-matmul $(PAR)
INCLUDES = -I$(SWIFTEST_HOME)/include -I$(NETCDF_FORTRAN_HOME)/include -I$(MKLROOT)/include
LINKS = -L$(MKLROOT)/lib/intel64 -L$(NETCDF_FORTRAN_HOME)/lib -lswiftest -lnetcdf -lnetcdff -qopt-matmul #$(PAR)

FSTRICTFLAGS = $(IPRODUCTION) $(STRICTREAL)
FFLAGS = $(IPRODUCTION) -fp-model=fast
FSTRICTFLAGS = $(IDEBUG) #$(SIMDVEC) $(PAR) $(HEAPARR)
FFLAGS = $(IDEBUG) #$(SIMDVEC) $(PAR) $(HEAPARR)
#FSTRICTFLAGS = $(IPRODUCTION) $(STRICTREAL) -g -traceback
#FFLAGS = $(IPRODUCTION) -fp-model=fast -g -traceback

FORTRAN = ifort
AR = xiar
Expand Down
11 changes: 4 additions & 7 deletions examples/symba_energy_momentum/param.sun.in
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
!Parameter file for the SyMBA-RINGMOONS test
T0 0.0
TSTOP 3.0e-2
TSTOP 3.0e-1
DT 1e-3
CB_IN cb.in
PL_IN sun.in
TP_IN tp.in
IN_TYPE ASCII
ISTEP_OUT 1
ISTEP_DUMP 1
BIN_OUT bin.sun.dat
BIN_OUT bin.sun.nc
PARTICLE_OUT particle.sun.dat
OUT_TYPE REAL8
OUT_FORM XV ! osculating element output
OUT_TYPE NETCDF_DOUBLE
OUT_FORM XVEL ! osculating element output
OUT_STAT REPLACE
ISTEP_DUMP 1 ! system dump cadence
CHK_CLOSE yes ! check for planetary close encounters
CHK_RMIN 0.005
CHK_RMAX 1e2
CHK_EJECT -1.0 ! ignore this check
CHK_QMIN -1.0 ! ignore this check
ENC_OUT enc.sun.dat
DISCARD_OUT discard.sun.dat
EXTRA_FORCE no ! no extra user-defined forces
BIG_DISCARD no ! output all planets if anything discarded
RHILL_PRESENT no ! Hill's sphere radii in input file
Expand All @@ -30,6 +28,5 @@ MU2KG 1.98908e30
TU2S 3.1556925e7
DU2M 1.49598e11
ENERGY yes
ENERGY_OUT energy.sun.out
ROTATION yes
SEED 8 1230834 2346113 123409874 -123121105 -767545 -534058022 343309814 -12535638
4 changes: 2 additions & 2 deletions examples/symba_swifter_comparison/8pl_16tp_encounters/cb.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Sun
0.00029591220819207774
0.004650467260962157
4.7535806948127355e-12
-2.2473967953572827e-18
0.0
0.0
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Sun
0.00029591220819207774
0.004650467260962157
4.7535806948127355e-12
-2.2473967953572827e-18
0.0
0.0
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ FRAGMENTATION NO
ROTATION NO
TIDES NO
ENERGY NO
GR NO
GR YES
GMTINY 1e-12
ENCOUNTER_CHECK SORTSWEEP
ENCOUNTER_CHECK TRIANGULAR
INTERACTION_LOOPS TRIANGULAR
8 changes: 6 additions & 2 deletions src/symba/symba_step.f90
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,26 @@ module subroutine symba_step_interp_system(self, param, t, dt)
call pl%vh2vb(cb)
call pl%lindrift(cb, dth, lbeg=.true.)
call pl%kick(system, param, t, dth, lbeg=.true.)
if (param%lgr) call pl%gr_pos_kick(param, dth)
call pl%drift(system, param, dt)

call tp%vh2vb(vbcb = -cb%ptbeg)
call tp%lindrift(cb, dth, lbeg=.true.)
call tp%kick(system, param, t, dth, lbeg=.true.)
if (param%lgr) call tp%gr_pos_kick(param, dth)
call tp%drift(system, param, dt)

call system%recursive_step(param, t, 0)

call pl%kick(system, param, t, dth, lbeg=.false.)
call pl%vb2vh(cb)
if (param%lgr) call pl%gr_pos_kick(param, dth)
call pl%lindrift(cb, dth, lbeg=.false.)
call pl%vb2vh(cb)

call tp%kick(system, param, t, dth, lbeg=.false.)
call tp%vb2vh(vbcb = -cb%ptend)
if (param%lgr) call tp%gr_pos_kick(param, dth)
call tp%lindrift(cb, dth, lbeg=.false.)
call tp%vb2vh(vbcb = -cb%ptend)
end select
end select
end select
Expand Down

0 comments on commit 995d1f6

Please sign in to comment.