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 Nov 15, 2021
2 parents dbb735e + 4260a05 commit 516478c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Makefile.Defines
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ COLLRESOLVE_HOME = $(ROOT_DIR)/collresolve/
ADVIXE_FLAGS = -g -O2 -qopt-report=5 -vecabi=cmdtarget -simd -shared-intel -debug inline-debug-info -DTBB_DEBUG -DTBB_USE_THREADING_TOOLS -xhost -traceback -I$(ADVISOR_2019_DIR)/include/intel64 -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
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 Down
1 change: 0 additions & 1 deletion src/io/io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,6 @@ subroutine io_read_in_cb(self, param)
close(iu, err = 667, iomsg = errmsg)

if (ierr == 0) then


if (self%j2rp2 /= 0.0_DP) param%loblatecb = .true.
if (param%rmin < 0.0) param%rmin = self%radius
Expand Down
2 changes: 1 addition & 1 deletion src/kick/kick.f90
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ module subroutine kick_getacch_int_all_triangular_pl(npl, nplm, x, Gmass, radius
end do
!$omp end parallel do
else
!$omp parallel do default(private) schedule(static)&
!$omp parallel do default(private) schedule(static)&
!$omp shared(npl, nplm, x, Gmass, radius) &
!$omp lastprivate(rji2, xr, yr, zr) &
!$omp reduction(+:ahi) &
Expand Down
22 changes: 21 additions & 1 deletion src/netcdf/netcdf.f90
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ module function netcdf_get_old_t_final_system(self, param) result(old_t_final)
integer(I4B) :: itmax, idmax
real(DP), dimension(:), allocatable :: vals
real(DP), dimension(1) :: val
real(DP), dimension(NDIM) :: rot0
real(DP) :: KE_orb_orig, KE_spin_orig, PE_orig, Ltmp

call param%nciu%open(param)
Expand All @@ -74,7 +75,8 @@ module function netcdf_get_old_t_final_system(self, param) result(old_t_final)
allocate(vals(idmax))
call check( nf90_get_var(param%nciu%ncid, param%nciu%time_varid, val, start=[1], count=[1]) )

old_t_final = val(1)
!old_t_final = val(1)
old_t_final = param%t0 ! For NetCDF it is safe to overwrite the final t value on a restart

if (param%lenergy) then
call check( nf90_get_var(param%nciu%ncid, param%nciu%KE_orb_varid, val, start=[1], count=[1]) )
Expand Down Expand Up @@ -107,6 +109,24 @@ module function netcdf_get_old_t_final_system(self, param) result(old_t_final)
call check( nf90_get_var(param%nciu%ncid, param%nciu%Gmass_varid, vals, start=[1,1], count=[idmax,1]) )
self%GMtot_orig = vals(1) + sum(vals(2:idmax), vals(2:idmax) == vals(2:idmax))

select type(cb => self%cb)
class is (symba_cb)
cb%GM0 = vals(1)
cb%dGM = cb%Gmass - cb%GM0

call check( nf90_get_var(param%nciu%ncid, param%nciu%radius_varid, val, start=[1,1], count=[1,1]) )
cb%R0 = val(1)

call check( nf90_get_var(param%nciu%ncid, param%nciu%rotx_varid, val, start=[1,1], count=[1,1]) )
rot0(1) = val(1)
call check( nf90_get_var(param%nciu%ncid, param%nciu%roty_varid, val, start=[1,1], count=[1,1]) )
rot0(2) = val(1)
call check( nf90_get_var(param%nciu%ncid, param%nciu%rotz_varid, val, start=[1,1], count=[1,1]) )
rot0(3) = val(1)

cb%L0(:) = cb%Ip(3) * cb%GM0 * cb%R0**2 * rot0(:)
end select

end if

deallocate(vals)
Expand Down

0 comments on commit 516478c

Please sign in to comment.