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 Oct 21, 2021
2 parents 85078c5 + ef402a5 commit 133801b
Show file tree
Hide file tree
Showing 5 changed files with 215 additions and 189 deletions.
16 changes: 10 additions & 6 deletions Makefile.Defines
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ COLLRESOLVE_HOME = $(ROOT_DIR)/collresolve/

# DO NOT include in FFLAGS the "-c" option to compile object only
# this is done explicitly as needed in the Makefile
ADVIXE_DIR = /apps/cent7/intel/advisor_2019
ADVIXE_FLAGS = -g -O2 -qopt-report=5 -vecabi=cmdtarget -simd -shared-intel -debug inline-debug-info -DTBB_DEBUG -DTBB_USE_THREADING_TOOLS -xhost -traceback

VTUNE_FLAGS = -g -O2 -qopt-report=5 -simd -shared-intel -qopenmp -debug inline-debug-info -parallel-source-info=2 -parallel -DTBB_DEBUG -DTBB_USE_THREADING_TOOLS -qopenmp -fp-model no-except -mp1 -xhost -traceback
#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 -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
Expand All @@ -61,27 +66,26 @@ 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)


MKL_ROOT = /apps/spack/bell/apps/intel-parallel-studio/cluster.2019.5-intel-19.0.5-4brgqlf/mkl/lib
IMKL = -I$(MKLROOT)/include
LMKL = -L$(MKLROOT)/lib/intel64 -qopt-matmul

FSTRICTFLAGS = $(IPRODUCTION) $(STRICTREAL) $(OPTREPORT)
FFLAGS = $(IPRODUCTION) -fp-model=fast $(OPTREPORT)
FSTRICTFLAGS = $(IDEBUG) #$(SIMDVEC) $(PAR)
FFLAGS = $(IDEBUG) #$(SIMDVEC) $(PAR)
FORTRAN = ifort
AR = xiar
CC = icc

#FORTRAN = gfortran
#FFLAGS = $(GDEBUG) $(GMEM) #$(GPAR)
#FFLAGS = $(GPRODUCTION) #-g -fbacktrace -fcheck=all #-Wall
#FSTRICTFLAGS= $(GPRODUCTION) #-g -fbacktrace -fcheck=all #-Wall
#FSTRICTFLAGS = $(GDEBUG) $(GMEM) #$(GPAR)
#AR = ar
#CC = cc

# DO NOT include in CFLAGS the "-c" option to compile object only
# this is done explicitly as needed in the Makefile

CC = icc
#CC = cc
CFLAGS = -O3 -w -m64 -std=c99

64_BIT_REALS = -r8
Expand Down
4 changes: 2 additions & 2 deletions src/io/io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ module subroutine io_dump_particle_info_base(self, param, idx)

close(unit = LUN, err = 667, iomsg = errmsg)
else if ((param%out_type == NETCDF_FLOAT_TYPE) .or. (param%out_type == NETCDF_DOUBLE_TYPE)) then
call self%write_particle_info(param%nciu)
call self%write_particle_info(param%nciu, param)
end if

return
Expand Down Expand Up @@ -1932,7 +1932,7 @@ module subroutine io_write_discard(self, param)

! Record the discarded body metadata information to file
if ((param%out_type == NETCDF_FLOAT_TYPE) .or. (param%out_type == NETCDF_DOUBLE_TYPE)) then
call tp_discards%write_particle_info(param%nciu)
call tp_discards%write_particle_info(param%nciu, param)
end if

if (param%discard_out == "") return
Expand Down
12 changes: 7 additions & 5 deletions src/modules/swiftest_classes.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1008,10 +1008,11 @@ module subroutine netcdf_read_hdr_system(self, iu, param)
class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters
end subroutine netcdf_read_hdr_system

module subroutine netcdf_read_particle_info_system(self, iu, plmask, tpmask)
module subroutine netcdf_read_particle_info_system(self, iu, param, plmask, tpmask)
implicit none
class(swiftest_nbody_system), intent(inout) :: self !! Swiftest nbody system object
class(netcdf_parameters), intent(inout) :: iu !! Parameters used to identify a particular NetCDF dataset
class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters
logical, dimension(:), intent(in) :: plmask !! Logical array indicating which index values belong to massive bodies
logical, dimension(:), intent(in) :: tpmask !! Logical array indicating which index values belong to test particles
end subroutine netcdf_read_particle_info_system
Expand All @@ -1020,27 +1021,28 @@ module subroutine netcdf_write_frame_base(self, iu, param)
implicit none
class(swiftest_base), intent(in) :: self !! Swiftest base object
class(netcdf_parameters), intent(inout) :: iu !! Parameters used to for writing a NetCDF dataset to file
class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters
class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters
end subroutine netcdf_write_frame_base

module subroutine netcdf_write_frame_system(self, iu, param)
implicit none
class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object
class(netcdf_parameters), intent(inout) :: iu !! Parameters used to for writing a NetCDF dataset to file
class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters
class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters
end subroutine netcdf_write_frame_system

module subroutine netcdf_write_hdr_system(self, iu, param)
implicit none
class(swiftest_nbody_system), intent(in) :: self !! Swiftest nbody system object
class(netcdf_parameters), intent(inout) :: iu !! Parameters used to for writing a NetCDF dataset to file
class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters
class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters
end subroutine netcdf_write_hdr_system

module subroutine netcdf_write_particle_info_base(self, iu)
module subroutine netcdf_write_particle_info_base(self, iu, param)
implicit none
class(swiftest_base), intent(in) :: self !! Swiftest particle object
class(netcdf_parameters), intent(inout) :: iu !! Parameters used to identify a particular NetCDF dataset
class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters
end subroutine netcdf_write_particle_info_base

module subroutine obl_acc_body(self, system)
Expand Down
Loading

0 comments on commit 133801b

Please sign in to comment.